Post Reply 
Quadratic Solver for Casio FX-3650P
11-11-2018, 05:44 PM (This post was last modified: 03-15-2019 09:06 PM by Albert Chan.)
Post: #9
RE: Quadratic Solver for Casio FX-3650P
(11-10-2018 08:14 PM)Albert Chan Wrote:  Discovered a trivia: discriminant is the same if quadratic is "shifted"

AX² + BX + C, let Y = X - k

Using synthetic division, we get: AY² + B'Y + C', where B' = 2Ak + B, C' = Ak² + Bk + C

Using this trivia, calculator can get a more precise √2, positive root of X² - 2
Start with k ~ √2 = 1.414213562, Y = X - k

A = 1
B' = 2k = 2.828427124
C' = k² - 2 ~ -1.06e-9, but we need this exact ...
D = B² - 4 A C = 0 - 4(1)(-2) = 8

C' = (1.4142 + 13562e-9)² - 2
= -2 + 1.4142² + 2*1.4142*13562e-9 + (13562e-9)²
= -1.055272156e-9

Another approach is reduce B² and AC, a bit at a time:

1e18 C'
= 1414213562² - (1e10)(2e8) -- n = 7, b-nc = 14213562
= 14213562² - (2e8)(1e10 - 7*(1414213562+14213562))
= 14213562² - (2e8)(1010132)
= 14213562² - (2e3)(1010132)(1e5) -- n = 142, b-nc = 13562
= 13562² - (1e5)(2020264e3 - 142*(14213562 + 13562))
= -1055272156

Modulo math, using Chinese Remainder Theorem, also work well:

Let a ≡ 1e18 C' (mod 1e5) ≡ 13562² ≡ 27844
Let b ≡ 1e18 C' (mod 1e5 + 1) ≡ (-14142+13562)² - (1)(-2e3) ≡ 38397
→ 1e18 C' (mod 1e10 + 1e5) ≡ (a-b)*1e5 + a ≡ -1055272156

Enter A, B', C', and D to the Solver, we get Y correction = 3.730950488e-10

√2 ~ 1.414213562 3730950488
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Quadratic Solver for Casio FX-3650P - Albert Chan - 11-11-2018 05:44 PM



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