1
0
mirror of https://github.com/golang/go synced 2024-11-24 20:20:03 -07:00

math: update special-conditions comments to use ± symbol

R=rsc, golang-dev, r
CC=golang-dev
https://golang.org/cl/5445046
This commit is contained in:
Charles L. Dorian 2011-11-28 13:04:52 -08:00 committed by Rob Pike
parent 4cc64bd5bf
commit c8d2544b26
6 changed files with 8 additions and 16 deletions

View 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 {

View 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 (

View 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

View 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.

View 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 {

View 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) }