module Gsl_poly:sig
..end
Polynomials
typepoly =
float array
val eval : poly -> float -> float
eval p x
returns p.(0) +. p.(1) *. x +. p.(2) *. x**2 +. ... +. p.(n)
*. x**n
where n = Array.length p
.
type
quad_sol =
| |
Quad_0 |
| |
Quad_2 of |
val solve_quadratic : a:float -> b:float -> c:float -> quad_sol
val complex_solve_quadratic : a:float -> b:float -> c:float -> Gsl_complex.complex * Gsl_complex.complex
type
cubic_sol =
| |
Cubic_0 |
| |
Cubic_1 of |
| |
Cubic_3 of |
val solve_cubic : a:float -> b:float -> c:float -> cubic_sol
val complex_solve_cubic : a:float ->
b:float ->
c:float -> Gsl_complex.complex * Gsl_complex.complex * Gsl_complex.complex
val solve : poly -> Gsl_complex.complex_array