summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-08-05 20:11:12 +0200
committerGitHub <noreply@github.com>2016-08-05 20:11:12 +0200
commit64ce8c411e1b2d83cdc15ab8757aec738df0c963 (patch)
treec5b9563b6b63d4a3020ab21ce218096ecd4efed0
parent815a662ecac36af95a0dbec4b665dbee29155d94 (diff)
parent756beb5b5b535f02fe3559668132361e82da0565 (diff)
downloadNim-64ce8c411e1b2d83cdc15ab8757aec738df0c963.tar.gz
Merge pull request #4575 from mathsaey/devel
Fixed #4574
-rw-r--r--lib/pure/math.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/math.nim b/lib/pure/math.nim
index c088e3d7d..58d9879b2 100644
--- a/lib/pure/math.nim
+++ b/lib/pure/math.nim
@@ -219,7 +219,7 @@ when not defined(JS):
     ##
     ## .. code-block:: nim
     ##  echo ceil(-2.1) ## -2.0
-  
+
   when defined(windows) and defined(vcc):
     proc round0[T: float32|float64](x: T): T =
       ## Windows compilers prior to MSVC 2012 do not implement 'round',
@@ -360,7 +360,7 @@ proc `mod`*[T: float32|float64](x, y: T): T =
 proc `^`*[T](x, y: T): T =
   ## Computes ``x`` to the power ``y`. ``x`` must be non-negative, use
   ## `pow <#pow,float,float>` for negative exponents.
-  assert y >= 0
+  assert y >= T(0)
   var (x, y) = (x, y)
   result = 1