EN JA
SQRT(3)
SQRT(3) FreeBSD Library Functions Manual SQRT(3)

名称

cbrt, cbrtf, cbrtl, sqrt, sqrtf, sqrtl立方根と平方根関数

ライブラリ

Math Library (libm, -lm)

書式

#include < math.h>

double
cbrt( double x);

float
cbrtf( float x);

long double
cbrtl( long double x);

double
sqrt( double x);

float
sqrtf( float x);

long double
sqrtl( long double x);

解説

cbrt(), cbrtf() と cbrtl() 関数は、 x の立方根を計算します。

sqrt(), sqrtf() と sqrtl() 関数は、非負の x の平方根を計算します。

戻り値

cbrt(), cbrtf() と cbrtl() 関数は、要求された立方根を返します。 sqrt(), sqrtf() と sqrtl() 関数は、エラーが発生しないなら、要求された平方根を返します。 (-0 の平方根が有効であり、-0 と等しいことを除いて) 負の xsqrt() を取る試みは、無効の例外を上げて、NaN が返されます。

関連項目

fenv(3), math(3)

規格

cbrt(), cbrtf(), cbrtl(), sqrt(), sqrtf() と sqrtl() 関数は、 ISO/IEC 9899:1999 (“ISO C99”) に適合しています。

歴史

cbrt() 関数は、 4.3BSD で登場しました。 sqrtl() 関数は、 FreeBSD 8.0 で登場しました。 cbrtl() 関数は、 FreeBSD 9.0 で登場しました。
March 5, 2011 FreeBSD