fix float comparision failure in math tests

FAIL: math.nim
Test "lib/pure/math.nim" in category "lib"
Failure: reExitcodesDiffer
Expected:
exitcode: 0
Gotten:
exitcode: 1
Output:
Traceback (most recent call last)
math.nim(478)            math
system.nim(3343)         failedAssertImpl
system.nim(3335)         raiseAssert
system.nim(2531)         sysFatal
Error: unhandled exception: tgamma(5.0'f64) == 24.0'f64  [AssertionError]
This commit is contained in:
Aman Gupta
2015-10-02 18:34:04 -07:00
parent 5b9465acf6
commit 2fbdf9320c

View File

@@ -475,7 +475,7 @@ when isMainModule and not defined(JS):
return sqrt(num)
# check gamma function
assert(tgamma(5.0) == 24.0) # 4!
assert($tgamma(5.0) == $24.0) # 4!
assert(lgamma(1.0) == 0.0) # ln(1.0) == 0.0
assert(erf(6.0) > erf(5.0))
assert(erfc(6.0) < erfc(5.0))