summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAdrian Veith <adrian@veith-system.de>2021-06-17 11:23:38 +0200
committerGitHub <noreply@github.com>2021-06-17 11:23:38 +0200
commit5a3456d220d0c2a4022969b98ab33baaf1fd4d00 (patch)
tree4251a2fc0faf72f9baf37de18a8023c2fc292558
parentc83ac16671170e513fa1ca40419892ccc618ec85 (diff)
downloadNim-5a3456d220d0c2a4022969b98ab33baaf1fd4d00.tar.gz
fix for #18284 int32 should be int (#18285)
the var exp was typed as int32 - it should be int since frep expects an int
-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 cff946581..410660d4a 100644
--- a/lib/pure/math.nim
+++ b/lib/pure/math.nim
@@ -997,7 +997,7 @@ when not defined(js):
     # taken from Go-lang Math.Log2
     const ln2 = 0.693147180559945309417232121458176568075500134360255254120680009
     template log2Impl[T](x: T): T =
-      var exp: int32
+      var exp: int
       var frac = frexp(x, exp)
       # Make sure exact powers of two give an exact answer.
       # Don't depend on Log(0.5)*(1/Ln2)+exp being exactly exp-1.