Rev 20 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 20 | Rev 16120 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | !set methhelp=This method transforms an inequality of the form \(a > b)\ |
4 | !set methhelp=This method transforms an inequality of the form \(a > b)\ |
5 | into the equivalent inequality \(a + f > b + f), where \(f) is an algebraic\ |
5 | into the equivalent inequality \(a + f > b + f), where \(f) is an algebraic\ |
6 | expression. |
6 | expression. |
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 | Add the expression |
14 | Add the expression |
15 |
|
15 | !read deduc/methparm.phtml 1,15 |
16 | to the two sides of the inequality |
16 | to the two sides of the inequality |
17 |
|
17 | !read deduc/methparm.phtml 2 |
18 | 18 | ||
19 | !exit |
19 | !exit |
20 | :check |
20 | :check |
21 |
|
21 | !distribute items $methparmobj2 into data,left,sign,right |
22 |
|
22 | methexp=Add \($methparm1) to two sides of \($left $sign $right) |
23 | 23 | ||
24 |
|
24 | !read deduc/sub/simplify $left + ($methparm1)\ |
25 |
|
25 | $right + ($methparm1) |
26 |
|
26 | !distribute lines $out into newleft,newright |
27 |
|
27 | !if $newleft=$empty or $newright=$empty |
28 | error=bad_data |
28 | error=bad_data |
29 | !exit |
29 | !exit |
30 |
|
30 | !endif |
31 |
|
31 | newsign=$sign |
32 |
|
32 | newobject2=$newleft $newsign $newright |
33 |
|
33 | oldobject=2 |
34 | 34 | ||
35 |
|
35 | contextlist=$ct_Always,\ |
36 | $ct_Onlywhen the added term is of constant sign,\ |
36 | $ct_Onlywhen the added term is of constant sign,\ |
37 | $ct_Onlywhen the added term is positive,\ |
37 | $ct_Onlywhen the added term is positive,\ |
38 | $ct_Onlywhen the inequality is strict,\ |
38 | $ct_Onlywhen the inequality is strict,\ |
39 | $ct_Onlywhen the inequality is not strict |
39 | $ct_Onlywhen the inequality is not strict |
40 | 40 | ||
41 |
|
41 | !if $askresult>1 |
42 | !read deduc/sub/simplify $left - ($methparm1)\ |
42 | !read deduc/sub/simplify $left - ($methparm1)\ |
43 | $right - ($methparm1) |
43 | $right - ($methparm1) |
44 | !distribute lines $out into badleft, badright |
44 | !distribute lines $out into badleft, badright |
45 | badsign=!translate internal <> to >< in $newsign |
45 | badsign=!translate internal <> to >< in $newsign |
46 | 46 | ||
47 | resultlist=$newobject2,\ |
47 | resultlist=$newobject2,\ |
48 | $newleft $newsign $badright,\ |
48 | $newleft $newsign $badright,\ |
49 | $badleft $newsign $newright,\ |
49 | $badleft $newsign $newright,\ |
50 | $newleft $badsign $newright,\ |
50 | $newleft $badsign $newright,\ |
51 | $newleft $badsign $badright |
51 | $newleft $badsign $badright |
52 |
|
52 | !endif |
53 | 53 | ||
54 | !exit |
54 | !exit |
55 | - |