![]() |
|
We don't bite newbies here... much | |
PerlMonks |
Re: solve cubic equationsby no_slogan (Deacon) |
on May 03, 2017 at 16:33 UTC ( #1189416=note: print w/replies, xml ) | Need Help?? |
BTW, the some of the solutions returned by the second if branch may be the same. Mathematicians call these "multiple roots." If $u == 0, there is a triple root at $x = $s. If $t == 0, there is a single root at $x = $s - $u and a double root at x = $s + $u/2 (because cos(2/3*pi) == cos(-2/3*pi) == -1/2).
In Section
Cool Uses for Perl
|
|