This pull request fixes the Ord instance for FP and FloatingPoint. The operator (>=) and (<=) will give True when comparing NaNs.
I originally thought that this comes from the underlying libBF library, as I've fixed a bug there yesterday. (https://github.com/GaloisInc/libBF-hs/pull/32). However, after I switch to the fixed version, the bug is still there.
My theory for this bug in the sbv repo is that the instance derived by the compiler may look like this:
a <= b = not $ a > b
And the fix would be manually implementing the operators.
This pull request fixes the Ord instance for FP and FloatingPoint. The operator
(>=)
and(<=)
will giveTrue
when comparingNaN
s.I originally thought that this comes from the underlying libBF library, as I've fixed a bug there yesterday. (https://github.com/GaloisInc/libBF-hs/pull/32). However, after I switch to the fixed version, the bug is still there.
My theory for this bug in the sbv repo is that the instance derived by the compiler may look like this:
And the fix would be manually implementing the operators.