Il serait très pratique a utiliser... s'il ne finissait pas systématiquement sur une erreur "NO SIGN CHNG" après avoir trouvé la (les) solutions.
C'est dommage, parce qu'il est vraiment performant...
Une idée, quelqu'un ?
Je n'ose pas trop bidouiller, je n'ai pas bien compris la syntaxe en listes du "guess" de la fonction solve...
- Code: Select all
:ClrHome
:Input Str1
:For(I,1,length(Str1
:sub(Str1,I,1→Str0
:If inString("=≠>≥<≤",Str0
:Then
:I→A
:length(Str1→I
:End
:End
:sub(Str1,1,A-1→Y1
:sub(Str1,A+1,length(Str1)-A→Y2
:"Y1-Y2→Y3
:solve(Y3,X,1,{‾300,300→A
:nDeriv(Y3,X,A+E‾3→E
:Output(4,3,A
:4→I
:Disp "
:Goto 4
:Lbl 1
:solve(Y3/(X-A),X,{‾2,2},{‾E3,E3→B
:nDeriv(Y3,X,B+E‾3→E
:Output(5,3,B
:Goto 4
:Lbl 2
:solve(Y3/(X-A)/(X-B),X,{‾E2,E2},{‾E3,E3→C
:nDeriv(Y3,X,C+E‾3→E
:Output(6,3,C
:Goto 4
:Lbl 3
:solve(Y3/(X-A)/(X-B)/(X-C),X,0,{‾E3,E3→D
:nDeriv(Y3,X,D+E‾3→E
:Output(7,3,D
:Lbl 4
:Disp "
:Output(I,1,"X
:Output(I,2,"=
:If Str0="≠
:Output(I,2,"≠
:If Str0=">" or Str0="<
:Then
:Output(I,2,">
:If E<0 and Str0=">" or E>0 and Str0="<
:Output(I,2,"<
:End
:If Str0="≥" or Str0="≤
:Then
:Output(I,2,"≥
:If E<0 and Str0="≥" or E>0 and Str0="≤
:Output(I,2,"≤
:End
:I+1→I
:If I=5
:Goto 1
:If I=6
:Goto 2
:If I=7
:Goto 3
:Pause
:"
Les E utilisés sont souvent les E de la puissance de 10, a ne pas confondre avec la variable E dans laquelle on stocke les nombres dérivés.