diff options
Diffstat (limited to 'src/pkg/math/fabs.go')
-rw-r--r-- | src/pkg/math/fabs.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/math/fabs.go b/src/pkg/math/fabs.go index ca78f3b59..fcddb8510 100644 --- a/src/pkg/math/fabs.go +++ b/src/pkg/math/fabs.go @@ -5,6 +5,11 @@ package math // Fabs returns the absolute value of x. +// +// Special cases are: +// Fabs(+Inf) = +Inf +// Fabs(-Inf) = +Inf +// Fabs(NaN) = NaN func Fabs(x float64) float64 { if x < 0 { return -x |