diff options
Diffstat (limited to 'libgo/go/math/sin.go')
-rw-r--r-- | libgo/go/math/sin.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libgo/go/math/sin.go b/libgo/go/math/sin.go index b2a3f8a..2fbe3e7 100644 --- a/libgo/go/math/sin.go +++ b/libgo/go/math/sin.go @@ -113,7 +113,12 @@ var _cos = [...]float64{ // Special cases are: // Cos(±Inf) = NaN // Cos(NaN) = NaN +func libc_cos(float64) float64 __asm__("cos") func Cos(x float64) float64 { + return libc_cos(x) +} + +func cos(x float64) float64 { const ( PI4A = 7.85398125648498535156E-1 // 0x3fe921fb40000000, Pi/4 split into three parts PI4B = 3.77489470793079817668E-8 // 0x3e64442d00000000, @@ -166,11 +171,16 @@ func Cos(x float64) float64 { // Sin returns the sine of x. // -// Special conditions are: +// Special cases are: // Sin(±0) = ±0 // Sin(±Inf) = NaN // Sin(NaN) = NaN +func libc_sin(float64) float64 __asm__("sin") func Sin(x float64) float64 { + return libc_sin(x) +} + +func sin(x float64) float64 { const ( PI4A = 7.85398125648498535156E-1 // 0x3fe921fb40000000, Pi/4 split into three parts PI4B = 3.77489470793079817668E-8 // 0x3e64442d00000000, |