Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trees.nim: compare floating points by their bitpatterns because NaN c…
…omparisions are always false (WORST design in the history of computing!)
- Loading branch information
bcccb74
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that correct wrt denormalization?
0.0 == -0.0
butcast[uint64](0.0) != cast[uint64](-0.0)
(curious also what nim code has been fixed by that commit)
bcccb74
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we want to differentiate between
0.0
and-0.0
here probably, but it shouldn't matter (I think) since this is in sameTree, and-
is an unary template.bcccb74
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> #13730