Oracle Solaris Studio 12.4 Man Pages

Exit Print View

Updated: January 2015
 
 

asinpf(3M)

Name

sinp , sinpf , sinpl , cosp , cospf , cospl , tanp , tanpf , tanpl , sincosp , sincospf , sincospl , asinp , asinpf , asinpl , acosp , acospf , acospl , atanp , atanpf , atanpl - 具有浮点周期的三角函数

Synopsis

cc [ flag ... ] file ...  -lsunmath -lm [ library ... ]
#include <sunmath.h>
double sinp(double x);
float sinpf(float x);
long double sinpl(long double x);
double cosp(double x);
float cospf(float x);
long double cospl(long double x);
double tanp(double x);
float tanpf(float x);
long double tanpl(long double x);
void sincosp(double x, double *s, double *c);
void sincospf(float x, float *s, float *c);
void  sincospl(long  double  x,  long double *s, long double *c);
double asinp(double x);
float asinpf(float x);
long double asinpl(long double x);
double acosp(double x);
float acospf(float x);
long double acospl(long double x);
double atanp(double x);
float atanpf(float x);
long double atanpl(long double x);

Description

sinp(x)cosp(x)tanp(x) 计算缩放到具有周期 2*PI 的三角函数,其中 PI 是 pi 的最佳浮点近似值:sinp(x) := sin(x * pi/PI),类似情况适用于 cosp(x)tanp(x)double 函数 sinpcosptanp 使用 pi 的最佳双精度近似值。float 函数 sinpfcospftanpf 使用 pi 的最佳单精度近似值。long double 函数 sinplcospltanpl 在 SPARC 上使用最佳四精度近似值,在 x86 上使用最佳扩展双精度近似值。对于大参数,这些函数的运行速度可能比使用 2pi 周期的标准三角函数快,但它们并不与 sinpi(3M) 中介绍的按 pi 比例缩放的三角函数一样快。

sincosp(x, s, c) 同时设置 *s = sinp(x) 以及 *c = cosp(x)

对应的反函数在表面上计算 asinp(x) := asin(x) * PI/pi,类似情况适用于 acosp(x)atanp(x);但是,由于 PI/pi 在最后位 1 中的某个单元内,因此这些函数实际仅分别返回未按比例缩放的值 asin(x)acos(x)atan(x)

Attributes

有关下列属性的说明,请参见 attributes(5):

属性类型
属性值
接口稳定性
Committed(已确定)
MT 级别
MT-Safe(MT 安全)

See also

asin(3M)、acos(3M)、atan(3M)、cos(3M)、sin(3M)、sincos(3M)、tan(3M)、sind(3M)、sinpi(3M)、attributes(5)