Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2010 02 12 maths fun - one example applies to many lanugages #173

Open
shailen-naidoo opened this issue May 26, 2024 · 0 comments
Open

2010 02 12 maths fun - one example applies to many lanugages #173

shailen-naidoo opened this issue May 26, 2024 · 0 comments

Comments

@shailen-naidoo
Copy link

shailen-naidoo commented May 26, 2024

It is important to note that in this one https://wtfjs.com/wtfs/2010-02-12-maths-fun even the case where:

0.1 + 02 === 0.3 // false

is the same for Python:

0.1 + 0.2 == 0.3 // False

So this is not a quirk of just JS but it also stems to other languages like Python and it is not a problem of the language but more so an issue that stems from the way that computers store numbers (binary). I believe that this example should be removed because it is not specific to JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant