[Jprogramming] Square Roots and Extended Arithmetic
Don Guinn
donguinn at gmail.com
Thu Nov 1 23:10:22 UTC 2018
If the number is not a perfect square, square root always converts the
result to float. b is not an integer. It is float. And there are digits
after the decimal.
0j6":b
35136418287882.219000
But when b is squared only the first 16 (approx) digits are kept.
0j3":b^2
1234567890101024100000000000.000
a
1234567890101020405060708090
b goes far beyond the precision of float double. So large values for error
beyond the 16 significant digits is no surprise.
More information about the Programming
mailing list