|
amath
1.8.5
Simple command line calculator
|
Inverse tangent function. More...
#include "prim.h"
Go to the source code of this file.
Functions | |
| double | atan (double x) |
| Inverse tangent function. More... | |
Variables | |
| static const double | atanhi [] |
| static const double | atanlo [] |
| static const double | aT [] |
| static const double | one = 1.0 |
| static const double | huge = 1.0e300 |
Inverse tangent function.
Definition in file atan.c.
| double atan | ( | double | x | ) |
Inverse tangent function.
Method
1. Reduce x to positive by atan(x) = -atan(-x).
2. According to the integer k=4t+0.25 chopped, t=x, the argument
is further reduced to one of the following intervals and the
arctangent of t is evaluated by the corresponding formula: [0,7/16] atan(x) = t-t^3*(a1+t^2*(a2+...(a10+t^2*a11)...)
[7/16,11/16] atan(x) = atan(1/2) + atan( (t-0.5)/(1+t/2) )
[11/16.19/16] atan(x) = atan( 1 ) + atan( (t-1)/(1+t) )
[19/16,39/16] atan(x) = atan(3/2) + atan( (t-1.5)/(1+1.5t) )
[39/16,INF] atan(x) = atan(INF) + atan( -1/t )Constants
The hexadecimal values are the intended ones for the following
constants. The decimal values may be used, provided that the
compiler will convert from decimal to binary accurately enough
to produce the hexadecimal values shown.
Definition at line 103 of file atan.c.
References aT, atanhi, atanlo, fabs(), huge, and one.
Referenced by acot(), acvs(), aexs(), ahv(), RealNumber::ArcTangent(), atan2(), and aver().


|
static |
Definition at line 62 of file atan.c.
Referenced by atan().
|
static |
|
static |