I want use quickcheck in a function that tests if a Maclaurin series is equal to 1/x
, for x>1
and x<2
. However, for small values of n, quickcheck returns false tests. Additionally, if I put n>100
restriction, for example, quickcheck returns:
"Gave up! Passed only 0 tests.".
Here's my code:
prop_inv :: Float -> Int -> Property
prop_inv x n = (x>1 && x<2) && n>100 ==> inv x n == 1/x
(inv x n
is the function that calculates the Maclaurin series.)