cubic (<num1>,<num2>,<num3>,<num4>)
numeric
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
<num1>
Cubic coefficient a.
<num2>
Cubic coefficient
b.
<num3>
Cubic coefficient
c.
<num4>
Cubic coefficient
d. Default value is 0.
The following provides the solution for x**3-6x**2+11x-6=0.
numeric roots[] = cubic(1,-6,11,-6)
Functions: |
|
Identifiers: |
num_roots (numeric) |