summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2015-10-02 18:34:04 -0700
committerAman Gupta <aman@tmm1.net>2015-10-02 18:34:04 -0700
commit2fbdf9320c43b1a8b8ca0a7b28ffdda6680c5237 (patch)
treeedb0502df3c1b893b01641aba11da104e5e5df9d /lib/pure
parent5b9465acf615e0513defa074673c6da46b27fe28 (diff)
downloadNim-2fbdf9320c43b1a8b8ca0a7b28ffdda6680c5237.tar.gz
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]
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/math.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/math.nim b/lib/pure/math.nim
index 06a018d9f..391a880ae 100644
--- a/lib/pure/math.nim
+++ b/lib/pure/math.nim
@@ -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))