1
0
mirror of https://github.com/golang/go synced 2024-11-12 10:20:27 -07:00

math: avoid unused assignment in jn.go

Change-Id: Ie4f21bcd5849e994c63ec5bbda2dee6f3ec4da12
Reviewed-on: https://go-review.googlesource.com/13891
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Tarmigan Casebolt 2015-08-23 19:51:33 -07:00 committed by Brad Fitzpatrick
parent cfb5bc993a
commit e893724e75

View File

@ -200,13 +200,11 @@ func Jn(n int, x float64) float64 {
for i := n - 1; i > 0; i-- {
di := float64(i + i)
a, b = b, b*di/x-a
di -= 2
}
} else {
for i := n - 1; i > 0; i-- {
di := float64(i + i)
a, b = b, b*di/x-a
di -= 2
// scale b to avoid spurious overflow
if b > 1e100 {
a /= b