diff options
| author | Michael Stapelberg <stapelberg@debian.org> | 2013-12-03 09:43:15 +0100 |
|---|---|---|
| committer | Michael Stapelberg <stapelberg@debian.org> | 2013-12-03 09:43:15 +0100 |
| commit | 64d2a7c8945ba05af859901f5e248f1befdd8621 (patch) | |
| tree | 013fcb7e9e3296ecdda876012252c36bd6bcb063 /src/pkg/math/bits.go | |
| parent | b901efe83e212f0c34c769c079e41373da12d723 (diff) | |
| download | golang-64d2a7c8945ba05af859901f5e248f1befdd8621.tar.gz | |
Imported Upstream version 1.2upstream/1.2
Diffstat (limited to 'src/pkg/math/bits.go')
| -rw-r--r-- | src/pkg/math/bits.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/math/bits.go b/src/pkg/math/bits.go index 0df0b1cc9..d85ee9cb1 100644 --- a/src/pkg/math/bits.go +++ b/src/pkg/math/bits.go @@ -27,7 +27,7 @@ func Inf(sign int) float64 { // NaN returns an IEEE 754 ``not-a-number'' value. func NaN() float64 { return Float64frombits(uvnan) } -// IsNaN returns whether f is an IEEE 754 ``not-a-number'' value. +// IsNaN reports whether f is an IEEE 754 ``not-a-number'' value. func IsNaN(f float64) (is bool) { // IEEE 754 says that only NaNs satisfy f != f. // To avoid the floating-point hardware, could use: @@ -36,10 +36,10 @@ func IsNaN(f float64) (is bool) { return f != f } -// IsInf returns whether f is an infinity, according to sign. -// If sign > 0, IsInf returns whether f is positive infinity. -// If sign < 0, IsInf returns whether f is negative infinity. -// If sign == 0, IsInf returns whether f is either infinity. +// IsInf reports whether f is an infinity, according to sign. +// If sign > 0, IsInf reports whether f is positive infinity. +// If sign < 0, IsInf reports whether f is negative infinity. +// If sign == 0, IsInf reports whether f is either infinity. func IsInf(f float64, sign int) bool { // Test for infinity by comparing against maximum float. // To avoid the floating-point hardware, could use: |
