cc [ flag ... ] file ... -lsunmath -lm [ library ... ] #include <sunmath.h>
double sind(double x);
float sindf(float x);
long double sindl(long double x);
double cosd(double x);
float cosdf(float x);
long double cosdl(long double x);
double tand(double x);
float tandf(float x);
long double tandl(long double x);
void sincosd(double x, double *s, double *c);
void sincosdf(float x, float *s, float *c);
void sincosdl(long double x, long double *s, long double *c);
double asind(double x);
float asindf(float x);
long double asindl(long double x);
double acosd(double x);
float acosdf(float x);
long double acosdl(long double x);
double atand(double x);
float atandf(float x);
long double atandl(long double x);
double atan2d(double y, double x);
float atan2df(float y, float x);
long double atan2dl(long double y, long double x);
sind(x)、cosd(x) 和 tand(x) 计算以度数测量的角度的三角函数:sind(x) := sin(x * pi/180),类似情况适用于 cosd(x) 和 tand(x)。
sincosd(x, s, c) 同时设置 *s = sind(x) 以及 *c = cosd(x)。
对应的反函数计算 asind(x) := asin(x) * 180/pi,类似情况适用于 acosd(x) 和 atand(x)。此外,atan2d(y, x) := atan2(y, x) 180/pi。
有关下列属性的说明,请参见 attributes(5):
|
asin(3M)、acos(3M)、atan(3M)、atan2(3M)、cos(3M)、sin(3M)、sincos(3M)、sinp(3M)、sinpi(3M)、tan(3M)、attributes(5)