sincosのヘルプ・マニュアル
日本語 英語
sincos --help
man sincos
SINCOS(3) Linux Programmer’s Manual SINCOS(3)
名前
sincos, sincosf, sincosl - 正弦と余弦を同時に計算する
書式
#include
void sincos(double x, double *sin, double *cos);
void sincosf(float x, float *sin, float *cos);
void sincosl(long double x, long double *sin, long double *cos);
-lm でリンクする。
説明
アプリケーションの中には、同じ角度 x について正弦と余弦の両方の計算が必
要なものがある。この関数は両者を同時に計算し、その結果を *sin と *cos
に格納する。
x が NaN の場合、 *sin と *cos に NaN が返される。
x が正の無限大か負の無限大の場合、領域エラー (domain error) が発生し、
*sin と *cos に NaN が返される。
返り値
これらの関数は void を返す。
エラー
これらの関数を呼び出した際にエラーが発生したかの判定方法についての情 報
は math_error(7) を参照のこと。
以下のエラーが発生する可能性がある。
領域エラー (domain error): x が無限大
不正 (invalid) 浮動小数点例外 (FE_INVALID) が上がる。
これらの関数は errno を設定しない。
バージョン
これらの関数は glibc バージョン 2.1 で初めて登場した。
準拠
この関数は GNU による拡張である。
関連項目
cos(3), sin(3), tan(3), feature_test_macros(7)
GNU 2008-08-11 SINCOS(3)
SINCOS(3) Linux Programmer’s Manual SINCOS(3)
NAME
sincos, sincosf, sincosl - calculate sin and cos simultaneously
SYNOPSIS
#define _GNU_SOURCE
#include
void sincos(double x, double *sin, double *cos);
void sincosf(float x, float *sin, float *cos);
void sincosl(long double x, long double *sin, long double *cos);
Link with -lm.
DESCRIPTION
Several applications need sine and cosine of the same angle x. This
function computes both at the same time, and stores the results in *sin
and *cos.
If x is a NaN, a NaN is returned in *sin and *cos.
If x is positive infinity or negative infinity, a domain error occurs,
and a NaN is returned in *sin and *cos.
RETURN VALUE
These functions return void.
ERRORS
See math_error(7) for information on how to determine whether an error
has occurred when calling these functions.
The following errors can occur:
Domain error: x is an infinity
An invalid floating-point exception (FE_INVALID) is raised.
These functions do not set errno.
VERSIONS
These functions first appeared in glibc in version 2.1.
CONFORMING TO
This function is a GNU extension.
SEE ALSO
cos(3), sin(3), tan(3), feature_test_macros(7)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2008-08-11 SINCOS(3)