HP Forums
Puzzling results from CAS - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Puzzling results from CAS (/thread-7674.html)

Puzzling results from CAS - KeithB - 01-27-2017 05:14 PM

I just saw this on the HP Prime forum, but it did not get an answer.

Trying to find the roots of this polynomial:
f(x) = x^4 - 3x^3 - 2.75x² + 12x - 5
which are 2.5, -2, 2, and 0.5.

Both proot() and zeros() return: 2.5, 2, -2 and 0.

Graphing it makes it very clear that the root is at 0.5 and nowhere near 0.

BTW, how do you enter the coefficients in proot()? I tried entering only the coefficients and got really weird results.

RE: Puzzling results from CAS - Tim Wessman - 01-27-2017 05:50 PM

I'm guessing the approximate numbers in there are messing the cas up. If you enclose it in an exact() call to convert the decimal approximates to fractions then it works fine.

RE: Puzzling results from CAS - KeithB - 01-27-2017 06:02 PM

Or just make the 2.75 11/4.

(I found my problem with the coefficients, I just entered them, I did not make them a vector.)


RE: Puzzling results from CAS - Fortin - 01-27-2017 06:45 PM

The [a b/c] key will also enclose the last ans in exact(). It's very handy to be able to just press the fraction key when one needs fractions.

RE: Puzzling results from CAS - parisse - 01-27-2017 06:55 PM

This bug was reported a few weeks ago, it is now fixed in the source code.