amath
1.6.2
Simple command line calculator
|
Go to the source code of this file.
Functions | |
double | atan (double x) |
Inverse trigonometric 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 |
double atan | ( | double | x | ) |
Inverse trigonometric 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 109 of file atan.c.
References aT, atanhi, atanlo, huge, and one.
Referenced by RealNumber::ArcCotangent(), RealNumber::ArcTangent(), and atan2().
|
static |
Definition at line 61 of file atan.c.
Referenced by atan().
|
static |
|
static |