Copyright | (c) 2011 diagrams-lib team (see LICENSE) |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | diagrams-discuss@googlegroups.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Exact solving of low-degree (n <= 4) polynomials.
- quadForm :: (Floating d, Ord d) => d -> d -> d -> [d]
- cubForm :: (Floating d, Ord d) => d -> d -> d -> d -> [d]
- quartForm :: (Floating d, Ord d) => d -> d -> d -> d -> d -> [d]
- cubForm' :: (Floating d, Ord d) => d -> d -> d -> d -> d -> [d]
- quartForm' :: (Floating d, Ord d) => d -> d -> d -> d -> d -> d -> [d]
Documentation
cubForm :: (Floating d, Ord d) => d -> d -> d -> d -> [d] Source
Solve the cubic equation ax^3 + bx^2 + cx + d = 0, returning a list of all real roots within 1e-10 tolerance (although currently it's closer to 1e-5)
quartForm :: (Floating d, Ord d) => d -> d -> d -> d -> d -> [d] Source
Solve the quartic equation c4 x^4 + c3 x^3 + c2 x^2 + c1 x + c0 = 0, returning a list of all real roots within 1e-10 tolerance (although currently it's closer to 1e-5)
cubForm' :: (Floating d, Ord d) => d -> d -> d -> d -> d -> [d] Source
Solve the cubic equation ax^3 + bx^2 + cx + d = 0, returning a list of all real roots. First argument is tolerance.
quartForm' :: (Floating d, Ord d) => d -> d -> d -> d -> d -> d -> [d] Source
Solve the quartic equation c4 x^4 + c3 x^3 + c2 x^2 + c1 x + c0 = 0, returning a list of all real roots. First argument is tolerance.