Post Reply 
new way to make quadratic equations easy
08-01-2021, 07:56 AM
Post: #7
RE: new way to make quadratic equations easy
Updated version (using stack only) to handle real and complex solutions for real values of B and C.

Code:
LBL A
CF 00
STO Z
2
/
X^2
-
CHS
X<0?
GTO 00
SQRT 
STO Z
X<>Y
2
/
CHS
STO T
X<>Y
-
X<>Y
RCL T
+
RTN
LBL 00
CHS
SQRT 
X<>Y
-2
/
SF 00
RTN

If flag 00 remains clear at the end of the calculations you have two real roots in the X and Y registers. If flag 00 is set at the end of the calculations thenn you have the solutions:

x1 = regX + i regY
x2 = regX - i regY

Namir
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: new way to make quadratic equations easy - Namir - 08-01-2021 07:56 AM



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