diff options
author | Koki Fushimi <paalon1936@gmail.com> | 2018-06-14 13:17:17 +0900 |
---|---|---|
committer | Koki Fushimi <paalon1936@gmail.com> | 2018-06-14 13:17:17 +0900 |
commit | 5fc5e3719457846964bff8a77078598f01b56974 (patch) | |
tree | c8f7374f823ea38f4dc9447573fff3bf3a0220a8 | |
parent | 090ffa386961459d529c2561d3e196be6df83c50 (diff) | |
download | Nim-5fc5e3719457846964bff8a77078598f01b56974.tar.gz |
Use one same type for two parameters
-rw-r--r-- | lib/pure/math.nim | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/pure/math.nim b/lib/pure/math.nim index 95a0a345c..52ed0a0a5 100644 --- a/lib/pure/math.nim +++ b/lib/pure/math.nim @@ -151,10 +151,6 @@ else: # JS proc log*[T: SomeFloat](x, base: T): T = ## Computes the logarithm ``base`` of ``x`` ln(x) / ln(base) -proc log*(x: float64, base: float32): float64 = - ln(x) / ln(base) -proc log*(x: float32, base: float64): float64 = - ln(x) / ln(base) when not defined(JS): # C proc log10*(x: float32): float32 {.importc: "log10f", header: "<math.h>".} @@ -676,4 +672,4 @@ when isMainModule: doAssert floorMod(-8.5, 3.0) ==~ 0.5 block: # log - doAssert log(3.0, 4.0) == log(4.0) / log(3.0) + doAssert log(4.0, 3.0) == log(4.0) / log(3.0) |