diff options
author | surechen <surechen17@gmail.com> | 2020-05-06 20:04:35 +0800 |
---|---|---|
committer | Giovanni Bajo <rasky@develer.com> | 2020-09-19 09:09:52 +0000 |
commit | 73eb24ccb6d8dd2cf9dd807acf69987a05e8d142 (patch) | |
tree | 26c501735afc14e8dd5d484678c2a523481b2f6d /src/math | |
parent | 58fe2cd4022c77946ce4b598cf3e30ccc8367143 (diff) | |
download | go-73eb24ccb6d8dd2cf9dd807acf69987a05e8d142.tar.gz go-73eb24ccb6d8dd2cf9dd807acf69987a05e8d142.zip |
math: Remove redundant local variable Ln2
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>
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/acosh.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/math/acosh.go b/src/math/acosh.go index cc8195ce32..41ca87123c 100644 --- a/src/math/acosh.go +++ b/src/math/acosh.go @@ -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): |