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:
parent
5b9465acf6
commit
2fbdf9320c
1 changed files with 1 additions and 1 deletions
|
|
@ -475,7 +475,7 @@ when isMainModule and not defined(JS):
|
||||||
return sqrt(num)
|
return sqrt(num)
|
||||||
|
|
||||||
# check gamma function
|
# 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(lgamma(1.0) == 0.0) # ln(1.0) == 0.0
|
||||||
assert(erf(6.0) > erf(5.0))
|
assert(erf(6.0) > erf(5.0))
|
||||||
assert(erfc(6.0) < erfc(5.0))
|
assert(erfc(6.0) < erfc(5.0))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue