sig
type poly = float array
external eval : Gsl_poly.poly -> float -> float = "ml_gsl_poly_eval"
type quad_sol = Quad_0 | Quad_2 of float * float
external solve_quadratic :
a:float -> b:float -> c:float -> Gsl_poly.quad_sol
= "ml_gsl_poly_solve_quadratic"
external complex_solve_quadratic :
a:float ->
b:float -> c:float -> Gsl_complex.complex * Gsl_complex.complex
= "ml_gsl_poly_complex_solve_quadratic"
type cubic_sol =
Cubic_0
| Cubic_1 of float
| Cubic_3 of float * float * float
external solve_cubic : a:float -> b:float -> c:float -> Gsl_poly.cubic_sol
= "ml_gsl_poly_solve_cubic"
external complex_solve_cubic :
a:float ->
b:float ->
c:float ->
Gsl_complex.complex * Gsl_complex.complex * Gsl_complex.complex
= "ml_gsl_poly_complex_solve_cubic"
val solve : Gsl_poly.poly -> Gsl_complex.complex_array
end