Post Reply 
Issue using EXACT() command.
04-26-2018, 09:43 AM
Post: #1
Issue using EXACT() command.
Hi,

An old program wich was running well on my real Prime, REV A version 12066,
present issue with version 13441 virtual Prime.

The EXACT() command give me result I don't can explain even the results are
good.

In attachement you'll see what happens.

In 13441 I've to remove all EXACT() commands to have the good presentation
I had in the old firmware 12066.

Here is the "old" program :

Code:

EXPORT DELTAold12066()
//EXPORT DELT()
BEGIN
//Syntaxe : DELTA()
//Auteur : Mic
//Version v1.02 (2013)
//Utilisation : entrer les 3 valeurs des coefficients A, B et C du trinôme AX²+BX+C.
INPUT(A,"dans AX²+BX+C","A=");
INPUT(B,"dans AX²+BX+C","B=");
INPUT(C,"dans AX²+BX+C","C=");
C▶X0;
RECT_P();
TEXTOUT_P("Tableau de variation",1,1,2,RGB(0,148,255));
LINE_P(1,12,108,12,RGB(0,148,255));
TEXTOUT_P("f(X)="+A+"X²+"+B+"X+"+C,1,18,2,1);
RECT_P(10,40,300,150,#FFD3A8);
TEXTOUT_P("−∞",13,41,0,3);
TEXTOUT_P("+∞",280,41,0,3);
LINE_P(10,60,300,60,3);
IF A≠0 THEN
−B/(2*A)▶X0;
A*X0^2+B*X0+C▶E;
ROUND(E,2)▶E;
IF 2*A*(X0−0.1)+B<0 THEN
LINE_P(15,65,143,144,RGB(255,0,0));
LINE_P(152,144,295,65,RGB(0,127,14));
TEXTOUT_P(E,143,120,0,3);
TEXTOUT_P("+∞",15,80);
TEXTOUT_P("+∞",280,80);
ELSE
LINE_P(15,144,143,65,RGB(0,127,14));
LINE_P(152,65,295,144,RGB(255,0,0));
TEXTOUT_P(exact(E),143,65,0,3);
TEXTOUT_P("−∞",15,120);
TEXTOUT_P("-∞",280,120);
END;
ELSE
IF B==0 THEN
TEXTOUT_P("Fonction constante",95,80,3);
FREEZE;
BREAK;
END;
IF B<0 THEN 
LINE_P(15,65,295,144,RGB(255,0,0));
FREEZE;
BREAK;
ELSE IF B>0 THEN
LINE_P(15,144,295,65,RGB(0,127,14));
FREEZE;
BREAK;
END;
END;
END;
TEXTOUT_P(exact(X0),142,41,0);
TEXTOUT_P("Dérivée :",1,160,1,RGB(255,0,110));
TEXTOUT_P("f'(X) = "+2*A+"X+"+B,60,160,1,RGB(127,0,55));
TEXTOUT_P("Discriminant :",1,175,1,RGB(255,0,110));
B*B−4*A*C▶D;
TEXTOUT_P("Δ = B² − 4AC = ("+B+")² − 4."+A+"."+C+" = "+D,70,175,1,RGB(127,0,55));

{"négatif","nul","positif"}▶L1;
{"2 solutions complexes","1 solution réelle","2 solutions réelles"}▶L2;
SIGN(D)+2▶N;
TEXTOUT_P("Le discriminant est "+L1(N)+".",70,185,1,RGB(127,0,55));
TEXTOUT_P("f(X)=0 admet donc "+L2(N)+" : ",70,195,1,RGB(127,0,55));
{"X = (−B−√(−Δ))/(2A) et X = (−B+√(−Δ))/(2A)","X = −B/(2A)","X = (−B−√Δ)/(2A) et X = (−B+√Δ)/(2A)"}▶L3;
TEXTOUT_P(L3(N),70,205,1,RGB(127,0,55));
"X = "+((−B−*√ABS(D))/(2*A))▶X1;
"X = "+((−B+*√ABS(D))/(2*A))▶X2;
"X = "+(−B/(2*A))▶X3;
"X = "+((−B−√ABS(D))/(2*A))▶X4;
"X = "+((−B+√ABS(D))/(2*A))▶X5;
{{exact(X1),exact(X2)},exact(X3),{exact(X4),exact(X5)}}▶L4;
//PRINT(L4);
TEXTOUT_P(L4(N),70,215,1,RGB(255,0,110)); 
TEXTOUT_P("par Mic",280,228,1,RGB(0,148,255));
//FREEZE();
WAIT;
END;

Maybe someone can explain me this strange behavior ?

Thanks.


Attached File(s) Thumbnail(s)
       

Gérard.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Issue using EXACT() command. - ggauny@live.fr - 04-26-2018 09:43 AM



User(s) browsing this thread: 1 Guest(s)