diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-02-29 11:23:13 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-02-29 11:23:13 +0100 |
| commit | b6d7097a0d6072199f2cd74d67404890697cf78a (patch) | |
| tree | a2193c528a79fd5606507568859ee5067c6b86e4 /src/pkg/math/log1p.go | |
| parent | 4cecda6c347bd6902b960c6a35a967add7070b0d (diff) | |
| download | golang-b6d7097a0d6072199f2cd74d67404890697cf78a.tar.gz | |
Imported Upstream version 2012.02.22upstream-weekly/2012.02.22
Diffstat (limited to 'src/pkg/math/log1p.go')
| -rw-r--r-- | src/pkg/math/log1p.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pkg/math/log1p.go b/src/pkg/math/log1p.go index dee7f2b64..12b98684c 100644 --- a/src/pkg/math/log1p.go +++ b/src/pkg/math/log1p.go @@ -113,14 +113,12 @@ func log1p(x float64) float64 { ) // special cases - // TODO(rsc): Remove manual inlining of IsNaN, IsInf - // when compiler does it for us switch { - case x < -1 || x != x: // x < -1 || IsNaN(x): // includes -Inf + case x < -1 || IsNaN(x): // includes -Inf return NaN() case x == -1: return Inf(-1) - case x > MaxFloat64: // IsInf(x, 1): + case IsInf(x, 1): return Inf(1) } |
