0 Members and 2 Guests are viewing this topic.
:ClrHome:Pause "JFGI
:Pause "JFGI
"JFGI
"GI
:Prompt A,B,C :(-B+sqrt(B^2-4AC))/(2A :Disp Ans, -B/A-Ans
:ClrHome:Disp "AX²+BX+C=0
As long as we are keeping the list output (as a pause) and theCode: [Select]:ClrHome:Disp "AX²+BX+C=0Then here is a smaller version (by 1 byte)::ClrHome:Disp "AX²+BX+C=0:Prompt A,B,C:√(B²+4i²AC:Pause .5A-1(-B+{Ans,-Ans(The code box didn't allow the -1)
Having i2 forces the calculator to evaluate the expression as complex numbers, so the square root function won't throw an error and you can find imaginary roots.
couln't you set the mode to a+bi at the beginning?