Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2071 | zjchen | 1 | !set methtit2=用非零数除不等式 |
2 | !set methtit=用数除不等式 |
||
3 | !set methenv=ZZ QQ RR |
||
4 | !set methparmtype=number,parm inequality |
||
5 | !set methhelp=此方法把不等式 \(A > B)\ |
||
6 | 转换成等价不等式 \(A/n > B/n) (或 \(A/n < B/n)),\ |
||
7 | 其中 \(n) 是非零数. |
||
8 | |||
9 | !if $wims_read_parm iswordof form check |
||
10 | !goto $wims_read_parm |
||
11 | !endif |
||
12 | |||
13 | !exit |
||
14 | :form |
||
15 | 把不等式 |
||
16 | !read deduc/methparm.phtml 2 |
||
17 | 除以数 |
||
18 | !read deduc/methparm.phtml 1,10 |
||
19 | |||
20 | !exit |
||
21 | :check |
||
22 | !distribute items $methparmobj2 into data,left,sign,right |
||
23 | !ifval $methparm1=0 |
||
24 | error=除数为零! |
||
25 | !advance penalty |
||
26 | !exit |
||
27 | !endif |
||
28 | methexp=把 \($left $sign $right) 除以 \($methparm1) |
||
29 | |||
30 | !read deduc/sub/simplify ($left) / ($methparm1)\ |
||
31 | ($right) / ($methparm1) |
||
32 | !distribute lines $out into newleft, newright |
||
33 | !if $newleft=$empty or $newright=$empty |
||
34 | error=bad_data |
||
35 | !exit |
||
36 | !endif |
||
37 | !if $methparm1<0 |
||
38 | newsign=!translate internal <> to >< in $sign |
||
39 | !else |
||
40 | newsign=$sign |
||
41 | !endif |
||
42 | newobject2=$newleft $newsign $newright |
||
43 | oldobject=2 |
||
44 | |||
45 | contextlist=$ct_Onlywhen除数非零,\ |
||
46 | $ct_Onlywhen除数是正的,\ |
||
47 | $ct_Always,\ |
||
48 | $ct_Onlywhen两边是正的,\ |
||
49 | $ct_Onlywhen两边同号,\ |
||
50 | $ct_Onlywhen不等式是严格的 |
||
51 | |||
52 | badsign=!translate internal <> to >< in $newsign |
||
53 | resultlist=$newobject2,\ |
||
54 | $newright $newsign $newleft,\ |
||
55 | $newleft $badsign $newright |
||
56 | |||
57 | !exit |
||
58 |