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

Blog post about comparison 0.0 and -0.0 #43

Closed
maxonfjvipon opened this issue Sep 26, 2023 · 0 comments · Fixed by #46
Closed

Blog post about comparison 0.0 and -0.0 #43

maxonfjvipon opened this issue Sep 26, 2023 · 0 comments · Fixed by #46
Assignees

Comments

@maxonfjvipon
Copy link
Member

In EO we have the next results of comparison 0.0 and -0.0:

0.0.eq -0.0 # FALSE
-0.0.eq 0.0 # FALSE
0.0.gt -0.0 # FALSE
-0.0.gt 0.0 # FALSE
0.0.lt -0.0 # FALSE
-0.0.lt 0.0 # FALSE
0.0.gte -0.0 # FALSE
-0.0.gte 0.0 # FALSE
0.0.lte -0.0 # FALSE
-0.0.lte 0.0 # FALSE

So they are not incomparable at all. It seems that such situation is unique in comparison with other programming languages.
It would be nice to make a little experiment how it works in some other programming languages (python, java, c++, ruby, ...) and write a short blog post about it.

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

Successfully merging a pull request may close this issue.

2 participants