Hacker News new | past | comments | ask | show | jobs | submit login

>Likewise when we say "numerical issues", it's understood that we're talking about situations in which the usual approximation of real numbers by floating point representations breaks down.

Guys, try this in your desktop or mobile app calculator:

do square root of 2.

then subtract from it the result that you see on screen.

for me:

√2−1.41421356237

i get:

3.095048801E−12

i.e. not 0.

I discovered this on a physical Casio electronic calculator long back, and also verified it just now on a stock Android mobile calculator app.

what is your result, and interpretation of it?




It's just the difference between internal and displayed precision.

sqrt(2) ≈ 1.414213562373095048801

So if you type in sqrt(2) - 1.41421356237, you're just getting the next 10 digits after that.

      1.414213562373095048801
    - 1.41421356237
    _________________________
      0.000000000003095048801
= 3.095048801e12


yes, exactly :)

that's what i figured out when i first came across this, in school.


> what is your result, and interpretation of it?

that the square root of 2 is not 1.41421356237.


true, because the √2 is an irrational number.

but I was looking for an answer more along the lines that anamexis gave.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: