Subversion Repositories wimsdev

Rev

Rev 20 | Blame | Compare with Previous | Last modification | View Log | RSS feed

!set methtit2=Dividir una ecuación por un número distinto de cero
!set methtit=Dividir una ecuación por un número
!set methenv=ZZ QQ RR CC
!set methparmtype=number,parm equation
!set methhelp=Este método transforma una ecuación \(A = B)\
 en la ecuación equivalente \(A/n = B/n), donde \(n) es un número\
 distinto de cero.

!if $wims_read_parm iswordof form check
  !goto $wims_read_parm
!endif

!exit
:form
 Dividir la ecuacion
 !read deduc/methparm.phtml 2
por un número
 !read deduc/methparm.phtml 1,10

!exit
:check
!distribute items $methparmobj2 into data,left,sign,right
!ifval $methparm1=0
  error=¡División por cero!
  !advance penalty
  !exit
!endif
methexp=Dividir \($left $sign $right) entre \($methparm1)

!read deduc/sub/simplify ($left) / ($methparm1)\
        ($right) / ($methparm1)
!distribute lines $out into newleft, newright
!if $newleft=$empty or $newright=$empty
  error=bad_data
  !exit
!endif
newsign=$sign
newobject2=$newleft $newsign $newright
oldobject=2

contextlist=$ct_Onlywhen el divisor no es nulo,\
        $ct_Onlywhen el divisor es positivo,\
        $ct_Always,\
        $ct_Onlywhen ambos lados son positivos,\
        $ct_Onlywhen ambos lados tienen el mismo signo

!exit