Subversion Repositories wimsdev

Rev

Rev 16120 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 reyssat 1
!set methtit=Add an equation to an inequality
2
!set methenv=ZZ QQ RR
3
!set methparmtype=function, parm equation >,parm inequality
4
!set methhelp=This method applies the following property on inequalities,\
5
 to deduce a new inequality:\
5976 bpr 6
<p class="wimscenter">\
20 reyssat 7
 If \(a = b), then \(c > b <=> f*a+c > f*b+d) for whatever \(f).\
5976 bpr 8
</p>
20 reyssat 9
 
10
!if $wims_read_parm iswordof form check
16120 bpr 11
  !goto $wims_read_parm
20 reyssat 12
!endif
13
 
14
!exit
15
:form
16
 Add
16120 bpr 17
!default methparm1=1
18
!read deduc/methparm.phtml 1,10
16207 bpr 19
$ times the equation
16120 bpr 20
!read deduc/methparm.phtml 2
16207 bpr 21
$ to the inequality
16120 bpr 22
!read deduc/methparm.phtml 3
20 reyssat 23
 
24
!exit
25
:check
16120 bpr 26
!distribute items $methparmobj2 into data,left1,sign1,right1
27
!distribute items $methparmobj3 into data,left2,sign2,right2
28
methexp=Add \(($methparm1)*($left1 $sign1 $right1)) to \($left2 $sign2 $right2)
29
 
30
!read deduc/sub/simplify ($methparm1)*($left1) + ($left2)\
20 reyssat 31
	($methparm1)*($right1) + ($right2)
16120 bpr 32
!distribute lines $out into newleft, newright
33
!if $newleft=$empty or $newright=$empty
20 reyssat 34
  error=bad_data
35
  !exit
16120 bpr 36
!endif
20 reyssat 37
 
16120 bpr 38
newobject3=$newleft $sign2 $newright
39
oldobject=3
20 reyssat 40
 
41
!exit