From 2a84206e8915177addb73a9b7725fa6584010982 Mon Sep 17 00:00:00 2001 From: Mathijs Saey Date: Fri, 5 Aug 2016 17:57:51 +0200 Subject: [PATCH 1/2] Fixed #4574 --- lib/pure/math.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/math.nim b/lib/pure/math.nim index c088e3d7d..ce18f0030 100644 --- a/lib/pure/math.nim +++ b/lib/pure/math.nim @@ -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 From 756beb5b5b535f02fe3559668132361e82da0565 Mon Sep 17 00:00:00 2001 From: Mathijs Saey Date: Fri, 5 Aug 2016 17:58:31 +0200 Subject: [PATCH 2/2] Removed trailing whitespace in math module --- lib/pure/math.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/math.nim b/lib/pure/math.nim index ce18f0030..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',