mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
move math routines from package sys to package math,
though they still build in src/runtime. use cgo instead of hand-written wrappers. R=r DELTA=740 (289 added, 300 deleted, 151 changed) OCL=23326 CL=23331
This commit is contained in:
parent
8c5bc7e93a
commit
1f8a40d85c
28 changed files with 434 additions and 435 deletions
|
|
@ -24,7 +24,7 @@ func Asin(arg float64) float64 {
|
|||
sign = true;
|
||||
}
|
||||
if arg > 1 {
|
||||
return sys.NaN();
|
||||
return NaN();
|
||||
}
|
||||
|
||||
temp = Sqrt(1 - x*x);
|
||||
|
|
@ -42,7 +42,7 @@ func Asin(arg float64) float64 {
|
|||
|
||||
func Acos(arg float64) float64 {
|
||||
if arg > 1 || arg < -1 {
|
||||
return sys.NaN();
|
||||
return NaN();
|
||||
}
|
||||
return Pi/2 - Asin(arg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue