I wrote quickcheck
tests for a Haskell program that optimizes and evaluates a function.
The problem is quickcheck
generates expressions resulting in NaN
like:
> acos(2)
NaN
Haskell evaluates the following statement as false:
> acos(2)==acos(2)
False
So my quickcheck
tests fail with this comparison.
Is there any way to compare NaN
values?