]> Cypherpunks repositories - gostls13.git/commitdiff
math: Remove redundant local variable Ln2
authorsurechen <surechen17@gmail.com>
Wed, 6 May 2020 12:04:35 +0000 (20:04 +0800)
committerGiovanni Bajo <rasky@develer.com>
Sat, 19 Sep 2020 09:09:52 +0000 (09:09 +0000)
Use the const variable Ln2 in math/const.go for function acosh.

Change-Id: I5381d03dd3142c227ae5773ece9be6c8f377615e
Reviewed-on: https://go-review.googlesource.com/c/go/+/232517
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Trust: Giovanni Bajo <rasky@develer.com>

src/math/acosh.go

index cc8195ce328282763cb96aedd34c5cc72e3949e5..41ca87123c20fa40785512c34a4d6ce82d583d7e 100644 (file)
@@ -42,10 +42,7 @@ package math
 func Acosh(x float64) float64
 
 func acosh(x float64) float64 {
-       const (
-               Ln2   = 6.93147180559945286227e-01 // 0x3FE62E42FEFA39EF
-               Large = 1 << 28                    // 2**28
-       )
+       const Large = 1 << 28 // 2**28
        // first case is special case
        switch {
        case x < 1 || IsNaN(x):