You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but if we instead go through the Ord API we can observe different behavior that is not compatible with IEEE 754:
compare 1.0 nan == GT
In addition to just being wrong, the more practical issue is that any alternative backend that does not inline the use of comparison operators to operators that implement IEEE 754 correctly won't pass the prelude test suite. For example backend-es does not pass the prelude test suite.
One simple fix that was floated around in Discord is to just remove the tests using NaN from the test suite and leave the behavior undefined.
The text was updated successfully, but these errors were encountered:
purs
compiles the following:to
but if we instead go through the
Ord
API we can observe different behavior that is not compatible with IEEE 754:In addition to just being wrong, the more practical issue is that any alternative backend that does not inline the use of comparison operators to operators that implement IEEE 754 correctly won't pass the prelude test suite. For example
backend-es
does not pass the prelude test suite.One simple fix that was floated around in Discord is to just remove the tests using
NaN
from the test suite and leave the behavior undefined.The text was updated successfully, but these errors were encountered: