> import math ... > x.real = -(b) + pow(b**2 - 4(a)(c)) / 2 If the discriminant (b**2-4.0*a*c)/2 is >=0, you can replace pow with math.sqrt. If negative, you must use cmath.sqrt. However, for serious quadratic root finding, the above formula is NOT the one to use for actual computation. A fairly standard alternative is given in many numerical analysis books, with explanation.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4