HP Forums
CAS, negative numbers, and ROUND - 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: CAS, negative numbers, and ROUND (/thread-4716.html)



CAS, negative numbers, and ROUND - Helge Gabert - 09-14-2015 02:07 AM

[attachment=2533]

This doesn't look right, when compared to ROUND() in Home.

Firmware 8151.


RE: CAS, negative numbers, and ROUND - roadrunner - 09-14-2015 12:06 PM

Xcas does the same thing:

[attachment=2534]

I have no point or conclusion, however, just Xcas does the same thing.

-road


RE: CAS, negative numbers, and ROUND - Helge Gabert - 09-14-2015 04:53 PM

Seems like one has to add 1 in order to get the correct result (assuming rounding to 0 significant digits is desired).

Take -0.2:

ROUND(-0.2) should result in -0.2.
ROUND(-0.2,0) should result in 0.
ROUND(-0.2,1) should result in -0.2
ROUND(-0.2,2) should result in -0.2
ROUND(-0.2,3) should result in -0.2

And that is what Home shows, but not CAS.