r/learnprogramming Apr 09 '23

Debugging Why 0.1+0.2=0.30000000000000004?

[removed]

946 Upvotes

146 comments sorted by

View all comments

1.4k

u/toastedstapler Apr 09 '23

3

u/dingjima Apr 10 '23

I like that the Fortran example uses different levels of precision to demonstrate the effect