quadratic equations

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
netpipe
Posts: 670
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

quadratic equations

Post by netpipe »

https://www.popularmechanics.com/scienc ... equations/ a new way to do quadratic equations. is this faster aswell as easier ?
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
chronologicaldot
Competition winner
Posts: 688
Joined: Mon Sep 10, 2012 8:51 am

Re: quadratic equations

Post by chronologicaldot »

Not to me. Looks more complicated than necessary, actually. But maybe I just had a better math book than everyone else in highschool. ¯\_(ツ)_/¯
EDIT: As a "proof" I guess it's better than the original "convenient guess" that made the original derivation work smoothly. But for kids in highschool, it's too abstract.
Hybrid Dog
Posts: 4
Joined: Sun Apr 22, 2018 7:18 am

Re: quadratic equations

Post by Hybrid Dog »

If we know that there is a solution and we have an approximate initial guess, is it faster to apply the Newton rule multiple times instead of calculating the solutions with the quadratic formula (-b±sqrt(b*b-4*a*c))/(2*a)?

x[0] = x0, x[k+1] = (a * x[k] * x[k] - c) / (2 * a * x[k] + b)
x1 ≈ x[10]
x2 ≈ -b / a - x1

example:
x0 = 1, a = 4, b = 6, c = -5
x[1] = 0.64285714285714
x[2] = 0.5970695970696
x[3] = 0.59629142667892
x[4] = 0.59629120178364
x[5] = 0.59629120178363
x[6] = 0.59629120178363
x[7] = 0.59629120178363
x[8] = 0.59629120178363
x[9] = 0.59629120178363
x[10] = 0.59629120178363
x1 = x[10]
x2 = -2.0962912017836
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: quadratic equations

Post by devsh »

nope IEEE754 sqrt is much faster than floating point division applied multiple times.
Post Reply