change log2 implementation to use C.log2()

pull/1090/head
eulerkochy 2019-07-11 11:56:31 +05:30 committed by Alexander Medvednikov
parent 7701be2242
commit 06e7354d18
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ pub fn log(a f64) f64 {
// log2 calculates base-2 logarithm of the provided value. // log2 calculates base-2 logarithm of the provided value.
pub fn log2(a f64) f64 { 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. // log10 calculates the common (base-10) logarithm of the provided value.