Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2071 | zjchen | 1 | !set methtit=方程两边加一个代数式 |
2 | !set methparmtype=function,parm equation |
||
3 | !set methhelp=此方法把方程 \(a = b)\ |
||
4 | 变成等价方程 \(a + f = b + f), 其中 \(f) 是一个代数式. |
||
5 | |||
6 | !if $wims_read_parm iswordof form check |
||
7 | !goto $wims_read_parm |
||
8 | !endif |
||
9 | |||
10 | !exit |
||
11 | :form |
||
12 | 把代数式 |
||
13 | !read deduc/methparm.phtml 1,15 |
||
14 | 加到方程的两边 |
||
15 | !read deduc/methparm.phtml 2 |
||
16 | |||
17 | !exit |
||
18 | :check |
||
19 | !distribute items $methparmobj2 into data,left,sign,right |
||
20 | methexp=把 \($methparm1) 加到 \($left $sign $right) 的两边 |
||
21 | |||
22 | !read deduc/sub/simplify $left + ($methparm1)\ |
||
23 | $right + ($methparm1) |
||
24 | !distribute lines $out into newleft,newright |
||
25 | !if $newleft=$empty or $newright=$empty |
||
26 | error=bad_data |
||
27 | !exit |
||
28 | !endif |
||
29 | newsign=$sign |
||
30 | newobject2=$newleft $newsign $newright |
||
31 | oldobject=2 |
||
32 | |||
33 | contextlist=$ct_Always,\ |
||
34 | $ct_Onlywhen加项有固定符号,\ |
||
35 | $ct_Onlywhen加项是正的 |
||
36 | |||
37 | !if $askresult>1 |
||
38 | !read deduc/sub/simplify $left - ($methparm1)\ |
||
39 | $right - ($methparm1) |
||
40 | !distribute lines $out into badleft, badright |
||
41 | |||
42 | resultlist=$newobject2,\ |
||
43 | $newleft $newsign $badright,\ |
||
44 | $badleft $newsign $newright |
||
45 | !endif |
||
46 | |||
47 | !exit |
||
48 |