Solve quartic and cubic equations-. More...
#include "pluto.h"
Functions | |
int | QuarticSolve (double b, double c, double d, double e, double *z) |
int | CubicSolve (double b, double c, double d, double z[]) |
int CubicSolve | ( | double | b, |
double | c, | ||
double | d, | ||
double | z[] | ||
) |
Solve a cubic equation in the form
For its purpose, it is assumed that ALL roots are double. This makes things faster.
[in] | b | coefficient of the cubic |
[in] | c | coefficient of the cubic |
[in] | d | coefficient of the cubic |
[out] | z | vector containing the roots of the cubic. Roots should be sorted in increasing order. |
Reference: http://www.1728.com/cubic2.htm
int QuarticSolve | ( | double | b, |
double | c, | ||
double | d, | ||
double | e, | ||
double * | z | ||
) |
Solve a quartic equation in the form
For its purpose, it is assumed that ALL roots are double. This makes things faster.
[in] | b | coefficient of the quartic |
[in] | c | coefficient of the quartic |
[in] | d | coefficient of the quartic |
[in] | e | coefficient of the quartic |
[out] | z | vector containing the (double) roots of the quartic |
Reference:
http://www.1728.com/quartic2.htm