PLUTO  4.4-patch2
Functions
quartic.c File Reference

Solve quartic and cubic equations. More...

#include "pluto.h"

Functions

int QuarticSolve (double b, double c, double d, double e, double *z)
 

Detailed Description

THIS FILE HAS BEEN DISMISSED ON October 4 2016. RELEVANT FUNCTIONS INCORPORATED INSIDE math_root_finders.c

Author
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
Oct 4, 2016

Function Documentation

◆ QuarticSolve()

int QuarticSolve ( double  b,
double  c,
double  d,
double  e,
double *  z 
)

Solve a quartic equation in the form

\[ z^4 + bz^3 + cz^2 + dz + e = 0 \]

For its purpose, it is assumed that ALL roots are double. This makes things faster.

Parameters
[in]bcoefficient of the quartic
[in]ccoefficient of the quartic
[in]dcoefficient of the quartic
[in]ecoefficient of the quartic
[out]zvector containing the (double) roots of the quartic

Reference:

http://www.1728.com/quartic2.htm

Returns
Return 0 on success, 1 if cubic solver fails, 2 if NaN has been found and 3 if quartic is not satisfied.