Hacker News new | ask | show | jobs
by avgcorrection 1258 days ago
> If you knew more about the details of binary64 aka float64, you could confidently say that "2.3" means 2.29999995231628417969 […]"

Then I think writing

    let f = 2.3;
Should be a compile error. The compiler should force you to write the “snapped” value in order to not mislead. :)
1 comments

Now try writing the "snapped" value for 2.3 as a finite decimal. :-)
Something other than 2.29999995231628417969 ?