Rev 5763 | Rev 16135 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5763 | Rev 16120 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | !set methhelp=You can use this method to transform an existing equation\ |
4 | !set methhelp=You can use this method to transform an existing equation\ |
5 | into an equivalent one, by a composition of addition of terms,\ |
5 | into an equivalent one, by a composition of addition of terms,\ |
6 | exchange of sides and multiplication by a non-zero constant. |
6 | exchange of sides and multiplication by a non-zero constant. |
7 | 7 | ||
8 | !if $wims_read_parm iswordof form check |
8 | !if $wims_read_parm iswordof form check |
9 | !goto $wims_read_parm |
9 | !goto $wims_read_parm |
10 | !endif |
10 | !endif |
11 | 11 | ||
12 | !exit |
12 | !exit |
13 | :form |
13 | :form |
14 | Rewrite the equation |
14 | Rewrite the equation |
15 | !read deduc/methparm.phtml 1 |
15 | !read deduc/methparm.phtml 1 |
16 | to <br/> |
16 | to <br/> |
17 | <input |
17 | <input size="15" name="methparm2" value="$methparm2"/> |
18 | = |
18 | = |
19 | <input |
19 | <input size="15" name="methparm4" value="$methparm4"/> |
20 | !set methremark=Your new equation must be equivalent to the original one. |
20 | !set methremark=Your new equation must be equivalent to the original one. |
21 | !exit |
21 | !exit |
22 | :check |
22 | :check |
23 |
|
23 | !distribute items $methparmobj1 into data,left1,sign1,right1 |
24 |
|
24 | sign2== |
25 |
|
25 | sign3== |
26 |
|
26 | !if $sign2 notsametext $sign1 and $sign3 notsametext $sign1 |
27 | :badequiv |
27 | :badequiv |
28 | error=Your new equation is not equivalent to the original one! |
28 | error=Your new equation is not equivalent to the original one! |
29 | !advance penalty |
29 | !advance penalty |
30 | !exit |
30 | !exit |
31 |
|
31 | !endif |
32 | 32 | ||
33 | check1=($left1) - ($right1) |
33 | check1=($left1) - ($right1) |
34 | check2=($methparm2) - ($methparm4) |
34 | check2=($methparm2) - ($methparm4) |
35 | 35 | ||
36 | !read deduc/sub/checkzero $check1\ |
36 | !read deduc/sub/checkzero $check1\ |
37 | $check2 |
37 | $check2 |
38 | !distribute line $out into out1, out2 |
38 | !distribute line $out into out1, out2 |
39 | !read deduc/sub/_Simplify ($check1) / ($check2) |
39 | !read deduc/sub/_Simplify ($check1) / ($check2) |
40 | out3=$out |
40 | out3=$out |
Line 52... | Line 52... | ||
52 | 52 | ||
53 | newobject1=$methparm2 = $methparm4 |
53 | newobject1=$methparm2 = $methparm4 |
54 | oldobject=1 |
54 | oldobject=1 |
55 | 55 | ||
56 | !exit |
56 | !exit |
57 | - |