Subversion Repositories wimsdev

Rev

Rev 20 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
16321 bpr 1
!set methtit=Sumar un número a ambos lados de una desigualdad
20 reyssat 2
!set methenv=ZZ QQ RR
3
!set methparmtype=number,parm inequality
16321 bpr 4
!set methhelp=Este método transforma una desigualdad del estilo \(a > b)\
5
  en la desigualdad equivalente \(a + n > b + n), donde \(n) es un número.
20 reyssat 6
 
7
!if $wims_read_parm iswordof form check
16321 bpr 8
  !goto $wims_read_parm
20 reyssat 9
!endif
10
 
11
!exit
12
:form
16321 bpr 13
Añade el número
14
!read deduc/methparm.phtml 1,15
15
$ a ambos lados de la desigualdad
16
!read deduc/methparm.phtml 2
20 reyssat 17
 
18
!exit
19
:check
16321 bpr 20
!distribute items $methparmobj2 into data,left,sign,right
21
methexp=Añadir \(methparm1) a ambos lados de \($left $sign $right)
20 reyssat 22
 
16321 bpr 23
!read deduc/sub/simplify $left + ($methparm1)\
24
  $right + ($methparm1)
25
!distribute lines $out into newleft,newright
26
!if $newleft=$empty or $newright=$empty
20 reyssat 27
  error=bad_data
28
  !exit
16321 bpr 29
!endif
30
newsign=$sign
31
newobject2=$newleft $newsign $newright
32
oldobject=2
20 reyssat 33
 
16321 bpr 34
contextlist=$ct_Always,\
35
	$ct_Onlywhen el número sumado es positivo,\
36
	$ct_Onlywhen la desigualdad es estricta,\
37
	$ct_Onlywhen la desigualdad no es estricta
38
 
39
!if $askresult>1
20 reyssat 40
  !read deduc/sub/simplify $left - ($methparm1)\
41
	$right - ($methparm1)
42
  !distribute lines $out into badleft, badright
43
  badsign=!translate internal <> to >< in $newsign
16321 bpr 44
 
20 reyssat 45
  resultlist=$newobject2,\
46
	$newleft $newsign $badright,\
47
	$badleft $newsign $newright,\
48
	$newleft $badsign $newright,\
49
	$newleft $badsign $badright
16321 bpr 50
!endif
20 reyssat 51
 
52
!exit