ROUND() Results
04-07-2022, 09:09 PM
Post: #1
 matalog Senior Member Posts: 349 Joined: May 2021
ROUND() Results
In Home view on my G2, ROUND(7979*464664664,2) Results in 3.70755935406E12.

That seems a rather long result for a figure rounded to 2 dp. Is that ROUND working as expected?
04-07-2022, 10:26 PM (This post was last modified: 04-07-2022 10:27 PM by Joe Horn.)
Post: #2
 Joe Horn Senior Member Posts: 2,002 Joined: Dec 2013
RE: ROUND() Results
Yes, that is the expected result. Here's why. 7979*464664664 = 3707559354056, which is a 13-digit integer, as can be verified in CAS. Home view rounds all numeric calculations to a 12-digit mantissa, which as you saw is 3.70755935406 × 10^12. Rounding this to "two decimal places" has no effect, since it has no fractional part. If you want to round it to two significant digits instead, use -2 instead of 2 in the ROUND command.

<0|ɸ|0>
-Joe-
04-07-2022, 10:41 PM
Post: #3
 matalog Senior Member Posts: 349 Joined: May 2021
RE: ROUND() Results
It seems then that in this case, I want to round the scientific notation to 2 decimal places. Is that possible?
04-08-2022, 04:21 AM
Post: #4
 Joe Horn Senior Member Posts: 2,002 Joined: Dec 2013
RE: ROUND() Results
(04-07-2022 10:41 PM)matalog Wrote:  It seems then that in this case, I want to round the scientific notation to 2 decimal places. Is that possible?

Yes: ROUND(n,-3)

Suggestion: Type ROUND and then, while the cursor is still blinking there, press the Help key, it'll tell you all you want to know about the ROUND function. Ditto for other functions and operators.

<0|ɸ|0>
-Joe-
 « Next Oldest | Next Newest »