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:
Russ Cox 2009-01-22 16:23:44 -08:00
parent 8c5bc7e93a
commit 1f8a40d85c
28 changed files with 434 additions and 435 deletions

View file

@ -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);
}