I have tried this on my Windows 7 calculator with $\sqrt9 -3 $ it too gives some weird answer- ie$1.1546388020691628168216106791278e-37$. And so for any $n$(positive) $\sqrt n^2-n= wierd_ .answer$
Why does this happen?
2026-03-26 22:58:26.1774565906
In my calculator why does $\sqrt4 -2=-8.1648465955514287168521180122928e-39?$
490 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
Presumable, the Windows 7 calculator uses floating point arithmetic to do these computations.
The IEEE 754 floating point standard requires that basic arithmetic operations (which include sqrt) are correctly rounded: the result should be as if it was computed with infinite precision and then correctly rounded to fit in a double.
Apparently, the Windows 7 calculator has a bug: instead of the correct answer 2 (which is of course exactly representable in a double) it seems to come up with the largest double smaller than 2. If you then subtract 2, you get something very close to but not exactly equal to 0.