Rev 20 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 20 | Rev 17066 | ||
---|---|---|---|
Line 18... | Line 18... | ||
18 | the equivalent inequality \(A*n > B*n), where \(n) is a number\ |
18 | the equivalent inequality \(A*n > B*n), where \(n) is a number\ |
19 | that must be non-zero in order to guarantee the equivalence between the\ |
19 | that must be non-zero in order to guarantee the equivalence between the\ |
20 | original inequality and the transformed one. |
20 | original inequality and the transformed one. |
21 | 21 | ||
22 | !if $wims_read_parm iswordof form check |
22 | !if $wims_read_parm iswordof form check |
23 | !goto $wims_read_parm |
23 | !goto $wims_read_parm |
24 | !endif |
24 | !endif |
25 | 25 | ||
26 | !! You can add more preliminary processing code here. |
26 | !! You can add more preliminary processing code here. |
27 | 27 | ||
28 | 28 | ||
Line 35... | Line 35... | ||
35 | by the number |
35 | by the number |
36 | !read deduc/methparm.phtml 1,10 |
36 | !read deduc/methparm.phtml 1,10 |
37 | 37 | ||
38 | !exit |
38 | !exit |
39 | 39 | ||
40 | !! Main method processing code. Many parameter verifications are |
40 | !! Main method processing code. Many parameter verifications are |
41 | !! already done automatically. |
41 | !! already done automatically. |
42 | :check |
42 | :check |
43 | !distribute items $methparmobj2 into data,left,sign,right |
43 | !distribute items $methparmobj2 into data,left,sign,right |
44 | !if $methparm1=0 |
44 | !if $methparm1=0 |
45 | error=Multiply an inequality by 0 makes you lose information, and is therefore\ |
45 | error=Multiply an inequality by 0 makes you lose information, and is therefore\ |
46 | prohibited. |
46 | prohibited. |
47 | !advance penalty |
47 | !advance penalty |
48 | !exit |
48 | !exit |
49 | !endif |
49 | !endif |
50 | 50 | ||
51 | !! methexp is the explanation of the method in the history list. |
51 | !! methexp is the explanation of the method in the history list. |
52 | methexp=Multiply \($left $sign $right) by \($methparm1) |
52 | methexp=Multiply \($left $sign $right) by \($methparm1) |
53 | 53 | ||
54 | !! call a standard script in deduc/sub. |
54 | !! call a standard script in deduc/sub. |
55 |
|
55 | !read deduc/sub/simplify ($left) * ($methparm1)\ |
56 | ($right) * ($methparm1) |
56 | ($right) * ($methparm1) |
57 |
|
57 | !distribute lines $out into newleft,newright |
58 |
|
58 | !if $newleft=$empty or $newright=$empty |
59 | error=bad_data |
59 | error=bad_data |
60 | !exit |
60 | !exit |
61 |
|
61 | !endif |
62 |
|
62 | !if $methparm1<0 |
63 | newsign=!translate internal <> to >< in $sign |
63 | newsign=!translate internal <> to >< in $sign |
64 |
|
64 | !else |
65 | newsign=$sign |
65 | newsign=$sign |
66 |
|
66 | !endif |
67 | 67 | ||
68 | !! oldobject=2 means that the new object can replace the second parameter |
68 | !! oldobject=2 means that the new object can replace the second parameter |
69 | !! object, whenever possible. |
69 | !! object, whenever possible. |
70 | newobject2=$newleft $newsign $newright |
70 | newobject2=$newleft $newsign $newright |
71 | oldobject=2 |
71 | oldobject=2 |
72 | 72 | ||
73 | !! These lines are used to ask the user for the good context. |
73 | !! These lines are used to ask the user for the good context. |
74 | !! Optional. |
74 | !! Optional. |
75 | !! The first line must be the good choice. |
75 | !! The first line must be the good choice. |
76 | contextlist=$ct_Onlywhen the multiplier is non-zero,\ |
76 | contextlist=$ct_Onlywhen the multiplier is non-zero,\ |
77 | $ct_Onlywhen the multiplier is positive,\ |
77 | $ct_Onlywhen the multiplier is positive,\ |
78 | $ct_Onlywhen the two sides are positive,\ |
78 | $ct_Onlywhen the two sides are positive,\ |
79 | $ct_Onlywhen the two sides are of the same sign,\ |
79 | $ct_Onlywhen the two sides are of the same sign,\ |
80 | $ct_Onlywhen the inequality is strict |
80 | $ct_Onlywhen the inequality is strict |
81 | 81 | ||
82 | badsign=!translate internal <> to >< in $newsign |
82 | badsign=!translate internal <> to >< in $newsign |
83 | 83 | ||
84 | !! These lines are used to ask the user for the good result. |
84 | !! These lines are used to ask the user for the good result. |
85 | !! Optional. |
85 | !! Optional. |
86 | !! The first line must be the good choice. |
86 | !! The first line must be the good choice. |
87 | resultlist=$newobject2,\ |
87 | resultlist=$newobject2,\ |
88 | $newright $newsign $newleft,\ |
88 | $newright $newsign $newleft,\ |
89 | $newleft $badsign $newright |
89 | $newleft $badsign $newright |
90 | !exit |
90 | !exit |
91 | - |