in reply to cos (100000000.0)
and why it does not truncate it to what it knows it is the last precision it can correctly calculate?
To know how many digits it can calculate correctly it would have to track rounding errors, resulting a large performance penalty. So it doesn't do that, and neither does C++ or Java.
C++ just uses a much more defensive default precision.
|
|---|