]> Cypherpunks repositories - gostls13.git/commit
math: fix Gamma(-171.5) on all platforms
authorRuss Cox <rsc@golang.org>
Thu, 6 Oct 2016 14:39:50 +0000 (10:39 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 6 Oct 2016 14:53:09 +0000 (14:53 +0000)
commit4f3a641e6e44fab414f7e384ac55e5b9e8d6fc7e
tree5fca388ac56e2db7eaabc02ced6c5070eb9ad8e1
parent20c48c9557e8d33e19a7e770d4f045ed548f26a2
math: fix Gamma(-171.5) on all platforms

Using 387 mode was computing it without underflow to zero,
apparently due to an 80-bit intermediate. Avoid underflow even
with 64-bit floats.

This eliminates the TODOs in the test suite.

Fixes linux-386-387 build and fixes #11441.

Change-Id: I8abaa63bfdf040438a95625d1cb61042f0302473
Reviewed-on: https://go-review.googlesource.com/30540
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/math/all_test.go
src/math/gamma.go