]> Cypherpunks repositories - gostls13.git/commitdiff
math: update special-conditions comments to use ± symbol
authorCharles L. Dorian <cldorian@gmail.com>
Mon, 28 Nov 2011 21:04:52 +0000 (13:04 -0800)
committerRob Pike <r@golang.org>
Mon, 28 Nov 2011 21:04:52 +0000 (13:04 -0800)
R=rsc, golang-dev, r
CC=golang-dev
https://golang.org/cl/5445046

src/pkg/math/abs.go
src/pkg/math/asinh.go
src/pkg/math/floor.go
src/pkg/math/gamma.go
src/pkg/math/modf.go
src/pkg/math/sincos.go

index eb3e4c72b32914654d17981b24a4bac4de5ca901..4c6297c6f3327005f6dbd5eed35760119caffcb5 100644 (file)
@@ -7,8 +7,7 @@ package math
 // Abs returns the absolute value of x.
 //
 // Special cases are:
-//     Abs(+Inf) = +Inf
-//     Abs(-Inf) = +Inf
+//     Abs(±Inf) = +Inf
 //     Abs(NaN) = NaN
 func Abs(x float64) float64 {
        switch {
index c1cad563c76f559cdd6a9d80747c7fb9c927f587..d6979463d65f70b03294ef863ab7b4d1316fef66 100644 (file)
@@ -33,8 +33,7 @@ package math
 // Asinh(x) calculates the inverse hyperbolic sine of x.
 //
 // Special cases are:
-//     Asinh(+Inf) = +Inf
-//     Asinh(-Inf) = -Inf
+//     Asinh(±Inf) = ±Inf
 //     Asinh(NaN) = NaN
 func Asinh(x float64) float64 {
        const (
index babbf645f5ce6f03572d406fd3a7631fe85b8651..8de4d7e2ce68cc1147ef0d088500f59c4f083dce 100644 (file)
@@ -7,8 +7,7 @@ package math
 // Floor returns the greatest integer value less than or equal to x.
 //
 // Special cases are:
-//     Floor(+Inf) = +Inf
-//     Floor(-Inf) = -Inf
+//     Floor(±Inf) = ±Inf
 //     Floor(NaN) = NaN
 func Floor(x float64) float64 {
        // TODO(rsc): Remove manual inlining of IsNaN, IsInf
@@ -30,16 +29,14 @@ func Floor(x float64) float64 {
 // Ceil returns the least integer value greater than or equal to x.
 //
 // Special cases are:
-//     Ceil(+Inf) = +Inf
-//     Ceil(-Inf) = -Inf
+//     Ceil(±Inf) = ±Inf
 //     Ceil(NaN) = NaN
 func Ceil(x float64) float64 { return -Floor(-x) }
 
 // Trunc returns the integer value of x.
 //
 // Special cases are:
-//     Trunc(+Inf) = +Inf
-//     Trunc(-Inf) = -Inf
+//     Trunc(±Inf) = ±Inf
 //     Trunc(NaN) = NaN
 func Trunc(x float64) float64 {
        // TODO(rsc): Remove manual inlining of IsNaN, IsInf
index ae2c0c418ab7b04cb3a03adfa7c2e4cae200eb07..7365d8e77541b0446f209e56b13c96444e6697cb 100644 (file)
@@ -113,8 +113,7 @@ func stirling(x float64) float64 {
 // Gamma(x) returns the Gamma function of x.
 //
 // Special cases are:
-//     Gamma(Inf) = Inf
-//     Gamma(-Inf) = -Inf
+//     Gamma(±Inf) = ±Inf
 //     Gamma(NaN) = NaN
 // Large values overflow to +Inf.
 // Negative integer values equal ±Inf.
index 315174b70144ab31494dbf6c8e585835b11722b9..34889e0c0af8732d9f51c7c6636cc094e9ff135e 100644 (file)
@@ -8,8 +8,7 @@ package math
 // that sum to f.  Both values have the same sign as f.
 //
 // Special cases are:
-//     Modf(+Inf) = +Inf, NaN
-//     Modf(-Inf) = -Inf, NaN
+//     Modf(±Inf) = ±Inf, NaN
 //     Modf(NaN) = NaN, NaN
 func Modf(f float64) (int float64, frac float64) {
        if f < 1 {
index 4c1576bead1fbc1a17004f98299732e4506e96d9..e8261bca71fd4ddfb74d59794c43ef327f600866 100644 (file)
@@ -7,7 +7,6 @@ package math
 // Sincos(x) returns Sin(x), Cos(x).
 //
 // Special conditions are:
-//     Sincos(+Inf) = NaN, NaN
-//     Sincos(-Inf) = NaN, NaN
+//     Sincos(±Inf) = NaN, NaN
 //     Sincos(NaN) = NaN, NaN
 func Sincos(x float64) (sin, cos float64) { return Sin(x), Cos(x) }