summaryrefslogtreecommitdiff
path: root/src/pkg/math/fabs.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/math/fabs.go')
-rw-r--r--src/pkg/math/fabs.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/pkg/math/fabs.go b/src/pkg/math/fabs.go
deleted file mode 100644
index 343123126..000000000
--- a/src/pkg/math/fabs.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-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 {
- switch {
- case x < 0:
- return -x
- case x == 0:
- return 0 // return correctly fabs(-0)
- }
- return x
-}