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.
8 Floating-point arcsine and arccosine.
10 They are implemented by computing the arctangent
11 after appropriate range reduction.
14 // Asin returns the arcsine of x.
18 // Asin(x) = NaN if x < -1 or x > 1
19 func libc_asin(float64) float64 __asm__("asin")
20 func Asin(x float64) float64 {
24 func asin(x float64) float64 {
26 return x // special case
34 return NaN() // special case
39 temp = Pi/2 - satan(temp/x)
41 temp = satan(x / temp)
50 // Acos returns the arccosine of x.
53 // Acos(x) = NaN if x < -1 or x > 1
54 func libc_acos(float64) float64 __asm__("acos")
55 func Acos(x float64) float64 {
59 func acos(x float64) float64 {