1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // Abs returns the absolute value of x.
14 func libc_fabs(float64) float64
16 func Abs(x
float64) float64 {
20 func abs(x
float64) float64 {
21 // TODO: once golang.org/issue/13095 is fixed, change this to:
22 // return Float64frombits(Float64bits(x) &^ (1 << 63))
23 // But for now, this generates better code and can also be inlined:
28 return 0 // return correctly abs(-0)