Roots of a function: Difference between revisions

Content added Content deleted
m (Spelling correction in task.)
(-> Maple)
Line 153: Line 153:
... EXACTLY at +1.00000000000000000020, f(x) = -2.168e-19
... EXACTLY at +1.00000000000000000020, f(x) = -2.168e-19
.... MAY-BE at +1.99999999999999999950, f(x) = -8.674e-19</pre>
.... MAY-BE at +1.99999999999999999950, f(x) = -8.674e-19</pre>

=={{header|Maple}}==

f := x^3-3*x^2+2*x;
roots(f,x);

outputs:

[[0, 1], [1, 1], [2, 1]]

which means there are three roots. Each root is named as a pair where the first element is the value (0, 1, and 2), the second one the multiplicity (=1 for each means none of the three are degenerate).


=={{header|Perl}}==
=={{header|Perl}}==