diff options
| author | Ken Thompson <ken@golang.org> | 2008-07-08 20:48:41 -0700 |
|---|---|---|
| committer | Ken Thompson <ken@golang.org> | 2008-07-08 20:48:41 -0700 |
| commit | 7a74340f6c31db36b4f04b71407db9a137c1f36e (patch) | |
| tree | a6d555256fd9b1fbdef9694f105c42754241d004 /src/lib/math/atan.go | |
| parent | 6f5a0bd20bc136f6306b4ebb07efe63345311e6d (diff) | |
| download | golang-7a74340f6c31db36b4f04b71407db9a137c1f36e.tar.gz | |
converted double to float64
SVN=126446
Diffstat (limited to 'src/lib/math/atan.go')
| -rw-r--r-- | src/lib/math/atan.go | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/lib/math/atan.go b/src/lib/math/atan.go index 064b8d4fc..0c284b8d9 100644 --- a/src/lib/math/atan.go +++ b/src/lib/math/atan.go @@ -7,12 +7,12 @@ package math export atan /* - floating-point arctangent - - atan returns the value of the arctangent of its - argument in the range [-pi/2,pi/2]. - there are no error returns. - coefficients are #5077 from Hart & Cheney. (19.56D) + * floating-point arctangent + * + * atan returns the value of the arctangent of its + * argument in the range [-pi/2,pi/2]. + * there are no error returns. + * coefficients are #5077 from Hart & Cheney. (19.56D) */ @@ -35,14 +35,14 @@ const ) /* - xatan evaluates a series valid in the - range [-0.414...,+0.414...]. (tan(pi/8)) + * xatan evaluates a series valid in the + * range [-0.414...,+0.414...]. (tan(pi/8)) */ func -xatan(arg double) double +xatan(arg float64) float64 { - var argsq, value double; + var argsq, value float64; argsq = arg*arg; value = ((((p4*argsq + p3)*argsq + p2)*argsq + p1)*argsq + p0); @@ -51,12 +51,11 @@ xatan(arg double) double } /* - satan reduces its argument (known to be positive) - to the range [0,0.414...] and calls xatan. + * satan reduces its argument (known to be positive) + * to the range [0,0.414...] and calls xatan. */ - func -satan(arg double) double +satan(arg float64) float64 { if arg < sq2m1 { @@ -69,12 +68,11 @@ satan(arg double) double } /* - atan makes its argument positive and - calls the inner routine satan. + * atan makes its argument positive and + * calls the inner routine satan. */ - func -atan(arg double) double +atan(arg float64) float64 { if arg > 0 { |
