diff options
author | Ian Lance Taylor <iant@golang.org> | 2019-09-06 18:12:46 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-09-06 18:12:46 +0000 |
commit | aa8901e9bb0399d2c16f988ba2fe46eb0c0c5d13 (patch) | |
tree | 7e63b06d1eec92beec6997c9d3ab47a5d6a835be /libgo/go/math/jn.go | |
parent | 920ea3b8ba3164b61ac9490dfdfceb6936eda6dd (diff) | |
download | gcc-aa8901e9bb0399d2c16f988ba2fe46eb0c0c5d13.zip gcc-aa8901e9bb0399d2c16f988ba2fe46eb0c0c5d13.tar.gz gcc-aa8901e9bb0399d2c16f988ba2fe46eb0c0c5d13.tar.bz2 |
libgo: update to Go 1.13beta1 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497
From-SVN: r275473
Diffstat (limited to 'libgo/go/math/jn.go')
-rw-r--r-- | libgo/go/math/jn.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libgo/go/math/jn.go b/libgo/go/math/jn.go index 4a8ddfa..b1aca8f 100644 --- a/libgo/go/math/jn.go +++ b/libgo/go/math/jn.go @@ -103,15 +103,15 @@ func Jn(n int, x float64) float64 { // 3 s+c c-s var temp float64 - switch n & 3 { + switch s, c := Sincos(x); n & 3 { case 0: - temp = Cos(x) + Sin(x) + temp = c + s case 1: - temp = -Cos(x) + Sin(x) + temp = -c + s case 2: - temp = -Cos(x) - Sin(x) + temp = -c - s case 3: - temp = Cos(x) - Sin(x) + temp = c - s } b = (1 / SqrtPi) * temp / Sqrt(x) } else { @@ -278,15 +278,15 @@ func Yn(n int, x float64) float64 { // 3 s+c c-s var temp float64 - switch n & 3 { + switch s, c := Sincos(x); n & 3 { case 0: - temp = Sin(x) - Cos(x) + temp = s - c case 1: - temp = -Sin(x) - Cos(x) + temp = -s - c case 2: - temp = -Sin(x) + Cos(x) + temp = -s + c case 3: - temp = Sin(x) + Cos(x) + temp = s + c } b = (1 / SqrtPi) * temp / Sqrt(x) } else { |