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
Previously we only needed to generate integers in comparisons, but now we have plenty of places where it would be useful to generate integers. I'm now getting test failures only with the F17 field, because the Arbitrary instance of Rational is just extremely unlikely to produce an integer at all:
arbitrarySizedFractional::Fractionala=>Gena
arbitrarySizedFractional =
sized $\n ->let n' =toInteger n indo b <- choose (1, precision)
a <- choose ((-n') * b, n' * b)
return (fromRational (a % b))
where
precision =9999999999999::IntegerinstanceIntegrala=>Arbitrary (Ratioa) where
arbitrary = arbitrarySizedFractional
This begs to be resolved.
The text was updated successfully, but these errors were encountered:
Previously we only needed to generate integers in comparisons, but now we have plenty of places where it would be useful to generate integers. I'm now getting test failures only with the
F17
field, because theArbitrary
instance ofRational
is just extremely unlikely to produce an integer at all:This begs to be resolved.
The text was updated successfully, but these errors were encountered: