summaryrefslogtreecommitdiffstats
path: root/libgo/go/math/lgamma.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/math/lgamma.go')
-rw-r--r--libgo/go/math/lgamma.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/libgo/go/math/lgamma.go b/libgo/go/math/lgamma.go
index e2bad69dc03..6a02c412d93 100644
--- a/libgo/go/math/lgamma.go
+++ b/libgo/go/math/lgamma.go
@@ -183,15 +183,13 @@ func Lgamma(x float64) (lgamma float64, sign int) {
// Tt = -(tail of Tf)
Tt = -3.63867699703950536541e-18 // 0xBC50C7CAA48A971F
)
- // TODO(rsc): Remove manual inlining of IsNaN, IsInf
- // when compiler does it for us
// special cases
sign = 1
switch {
- case x != x: // IsNaN(x):
+ case IsNaN(x):
lgamma = x
return
- case x < -MaxFloat64 || x > MaxFloat64: // IsInf(x, 0):
+ case IsInf(x, 0):
lgamma = x
return
case x == 0:
OpenPOWER on IntegriCloud