Oracle Solaris Studio 12.4 Man Pages

印刷ビューの終了

更新: January 2015
 
 

sincospf(3M)

名前

sinp , sinpf , sinpl , cosp , cospf , cospl , tanp , tanpf , tanpl , sincosp , sincospf , sincospl , asinp , asinpf , asinpl , acosp , acospf , acospl , atanp , atanpf , atanpl - 浮動小数点周期を使用した三角関数

形式

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);

説明

sinp(x)cosp(x)、および tanp(x) は、周期が 2*PI になるようにスケーリングされた三角関数 sinp(x) := sin(x * pi/PI) を計算します。PI は、pi の浮動小数点の最良近似です。cosp(x)tanp(x) の場合も同様です。double 関数 sinpcosp、および tanp は、pi の倍精度の最良近似を使用します。float 関数 sinpfcospf、および tanpf は、pi の単精度の最良近似を使用します。long double 関数 sinplcospl、および tanpl は、SPARC の場合は 4 倍精度の最良近似を使用し、x86 の場合は拡張倍精度の最良近似を使用します。引数が大きい場合、これらの関数は周期が 2pi の標準の三角関数よりも速く実行できますが、pi でスケーリングされた三角関数ほどは速くありません (sinpi(3M) を参照)。

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(5) を参照してください。

属性タイプ
属性値
インタフェースの安定性
確実
MT レベル
MT-安全

関連項目

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