Function: cubic

Syntax

cubic (<num1>,<num2>,<num3>,<num4>)

Type

numeric

Returns

The solution to a cubic equation. Three values are returned, these being the roots of the equation. If there are fewer than three unique roots, then the actual number can be found by querying the system numeric num_roots.

A cubic equation is of the form:

ax**3 + bx**2 + cx + d = 0

Parameters

Example

The following provides the solution for x**3-6x**2+11x-6=0.

numeric roots[] = cubic(1,-6,11,-6)

See Also

Functions:

quadratic (numeric), quartic (numeric)

Identifiers:

num_roots (numeric)