in reply to Re^10: RFC: Large Floating Point Numbers - Rounding Errors
in thread RFC: Large Floating Point Numbers - Rounding Errors

it simply intentionally inserts an error, which is a really dangerous way to try to correct a problem.

Hm. Sorry, but rounding for output is a cosmetic operation. And solutions to cosmetic operations are never "dangerous".

If the accuracy of the value was important enough to be dangerous, then you wouldn't be rounding it. Rather you'd be printing it to it's full internal accuracy with an estimate of error deviation; or seeking a method of achieving higher accuracy storage.

As is, you are discarding up to an extra 18 digits of accuracy for the sake of cosmetic appearance.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^11: RFC: Large Floating Point Numbers - Rounding Errors