From 04b08da9af0c450d645ab7389d1467308cfc2db8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 4 Mar 2013 21:27:36 +0100 Subject: Imported Upstream version 1.1~hg20130304 --- src/pkg/math/log10.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pkg/math/log10.go') diff --git a/src/pkg/math/log10.go b/src/pkg/math/log10.go index 67c163a49..95cfbf47c 100644 --- a/src/pkg/math/log10.go +++ b/src/pkg/math/log10.go @@ -17,5 +17,6 @@ func log10(x float64) float64 { func Log2(x float64) float64 func log2(x float64) float64 { - return Log(x) * (1 / Ln2) + frac, exp := Frexp(x) + return Log(frac)*(1/Ln2) + float64(exp) } -- cgit v1.2.3