Post Reply 
HP35S - Cubic (and incidentally quadratic) equations solver
05-13-2023, 10:33 AM
Post: #9
RE: HP35S - Cubic (and incidentally quadratic) equations solver
(05-12-2023 07:49 AM)Roberto Volpi Wrote:  … it is ok, except when a cubic polynomial with multiple roots is entered.

Thank you for pointing that out.
In these cases the derivative at this root is zero leading to the \(y \div 0\) error in line 32.
You can wiggle the coefficients a bit to get roots that are close to the exact roots.

Example

1.000000001
ENTER
3
ENTER
ENTER
1

f C
-0.999031396

R/S
-1.000484301

f (i)
0.000839643

x<>y
-1.000484301

f (i)
0.000839643

As you can see they might turn out to be complex though.

How do you handle this special case in your program?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP35S - Cubic (and incidentally quadratic) equations solver - Thomas Klemm - 05-13-2023 10:33 AM



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