Rev 16321 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
16321 | bpr | 1 | !set methtit=Reescribir una desigualdad |
20 | reyssat | 2 | !set methenv=ZZ QQ RR |
3 | !set methparmtype=parm inequality, function, choice 5, function |
||
16321 | bpr | 4 | !set methhelp=VPuede usar este método para transformar una\ |
5 | desigualdad existente (ecuación) en un equivalente, mediante una \ |
||
6 | combinación de suma de términos, intercambio de lados y multiplicación por una constante distinta de cero. |
||
20 | reyssat | 7 | |
8 | !if $wims_read_parm iswordof form check |
||
16321 | bpr | 9 | !goto $wims_read_parm |
20 | reyssat | 10 | !endif |
11 | |||
12 | !exit |
||
13 | :form |
||
16321 | bpr | 14 | Reescribir la desigualdad |
15 | !read deduc/methparm.phtml 1 |
||
17187 | bpr | 16 | $ en <br> |
17 | <input size="15" name="methparm2" value="$methparm2"> |
||
16321 | bpr | 18 | !formselect methparm3 from 1 to 5 prompt =,<,>,<=,>= |
17187 | bpr | 19 | <input size="15" name="methparm4" value="$methparm4"> |
16321 | bpr | 20 | !set methremark=Tu nueva desigualdad debe\ |
21 | ser equivalente a la anterior. |
||
20 | reyssat | 22 | !exit |
23 | :check |
||
16321 | bpr | 24 | !distribute items $methparmobj1 into data,left1,sign1,right1 |
25 | sign2=!item $methparm3 of =,<,>,<=,>= |
||
26 | sign3=!item $methparm3 of =,>,<,>=,<= |
||
27 | !if $sign2 notsametext $sign1 and $sign3 notsametext $sign1 |
||
20 | reyssat | 28 | :badequiv |
16321 | bpr | 29 | error=¡Tu nueva desigualdad no es equivalente a la anterior! |
20 | reyssat | 30 | !advance penalty |
31 | !exit |
||
16321 | bpr | 32 | !endif |
33 | |||
34 | check1=($left1) - ($right1) |
||
35 | !if $sign2 issametext $sign1 |
||
20 | reyssat | 36 | check2=($methparm2) - ($methparm4) |
16321 | bpr | 37 | !else |
20 | reyssat | 38 | check2=($methparm4) - ($methparm2) |
16321 | bpr | 39 | !endif |
40 | |||
41 | !read deduc/sub/checkzero $check1\ |
||
20 | reyssat | 42 | $check2 |
16321 | bpr | 43 | !distribute line $out into out1, out2 |
44 | !read deduc/sub/_Simplify ($check1) / ($check2) |
||
45 | out3=$out |
||
46 | !if $out1=yes or $out2=yes |
||
20 | reyssat | 47 | !if $out1!=yes or $out2!=yes |
16321 | bpr | 48 | !goto badequiv |
20 | reyssat | 49 | !endif |
16321 | bpr | 50 | !else |
20 | reyssat | 51 | out3=$[$out3] |
52 | !if NaN isin $out3 or Inf isin $out3 |
||
16321 | bpr | 53 | !goto badequiv |
20 | reyssat | 54 | !endif |
55 | !if $out3<=0 and $sign2 notsametext $sign3 |
||
16321 | bpr | 56 | !goto badequiv |
20 | reyssat | 57 | !endif |
16321 | bpr | 58 | !endif |
59 | methexp=Reescritura de \($left1 $sign1 $right1) |
||
20 | reyssat | 60 | |
16321 | bpr | 61 | newobject1=$methparm2 $sign2 $methparm4 |
62 | oldobject=1 |
||
20 | reyssat | 63 | |
64 | !exit |