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, in radians, of x.
18 // Asin(x) = NaN if x < -1 or x > 1
21 func libc_asin(float64) float64
23 func Asin(x
float64) float64 {
27 func asin(x
float64) float64 {
29 return x
// special case
37 return NaN() // special case
42 temp
= Pi
/2 - satan(temp
/x
)
44 temp
= satan(x
/ temp
)
53 // Acos returns the arccosine, in radians, of x.
56 // Acos(x) = NaN if x < -1 or x > 1
59 func libc_acos(float64) float64
61 func Acos(x
float64) float64 {
65 func acos(x
float64) float64 {