Post Reply 
(HP-67) Barkers's Equation
12-06-2019, 06:39 PM (This post was last modified: 03-21-2021 04:12 PM by Albert Chan.)
Post: #2
RE: (HP-67) Barkers's Equation
Solving cubic with Cardano's formula, x³ + 3x - 2W = 0

y = ³√(W + √(W²+1))
x = y - 1/y


Note: discriminant = W²+1 > 0, we have only 1 real root for x

If W<0, y may be hit with subtraction cancellation.
We can avoid catastrophic cancellation by solving x'³ + 3x' - 2|W| = 0

x = sign(W) x'

Or, we can go for the big |y|:       // assumed acot(W) = atan(1/W)

y = ³√(W + sign(W) √(W²+1)) = ³√(cot(acot(W)/2))

We still have the cancellation error issue when y ≈ 1
A better non-iterative formula is to use hyperbolics.

x = 2 sinh(sinh-1(W)/3)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(HP-67) Barkers's Equation - SlideRule - 12-06-2019, 01:27 PM
RE: (HP-67) Barkers's Equation - Albert Chan - 12-06-2019 06:39 PM



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