From 06e7354d1812b9e630b119c5bf51c208b4de9813 Mon Sep 17 00:00:00 2001 From: eulerkochy Date: Thu, 11 Jul 2019 11:56:31 +0530 Subject: [PATCH] change log2 implementation to use C.log2() --- vlib/math/math.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/math/math.v b/vlib/math/math.v index 42063d4301..52fedcb26f 100644 --- a/vlib/math/math.v +++ b/vlib/math/math.v @@ -157,7 +157,7 @@ pub fn log(a f64) f64 { // log2 calculates base-2 logarithm of the provided value. pub fn log2(a f64) f64 { - return C.log(a) / C.log(2) + return C.log2(a) } // log10 calculates the common (base-10) logarithm of the provided value.