mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 21:43:33 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user