C90 | double atan(double x); |
C99 | double atan (double x);
float atanf (float x); long double atanl (long double x); |
C++98 | double atan (double x);
float atan (float x); long double atan (long double x); |
C++11 | double atan (double x);
float atan (float x); long double atan (long double x); double atan (T x); // additional overloads for integral types |
C99 | 头文件<tgmath.h> 提供了该函数的类型泛型宏版本。 |
C++98 | 这个函数在<valarray> 中重载(参见valarray atan)。 |
C++11 | 这个头文件(<cmath>) 为整型提供了额外的重载:这些重载在计算之前将x转换为double
(在T是任何整型时定义)。
这个函数在<complex>和<valarray> 中也重载(参见complex atan和valarray atan)。 |
/* atan example */ #include <stdio.h> /* printf */ #include <math.h> /* atan */ #define PI 3.14159265 int main () { double param, result; param = 1.0; result = atan (param) * 180 / PI; printf ("The arc tangent of %f is %f degrees\n", param, result ); return 0; } |
atan2 | 两个参数的反正切 (function ) |
tan | 正切(function ) |
sin | 正弦(function ) |
cos | 余弦(function ) |