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

名称

round, roundf, roundl最も近くの整数値に丸める

ライブラリ

Math Library (libm, -lm)

書式

#include < math.h>

double
round( double x);

float
roundf( float x);

long double
roundl( long double x);

解説

round(), roundf() と roundl() 関数は、 x の最も近い整数値を返します。 x が 2 つの整数値の途中に位置するなら、これらの関数は、より大きい絶対値 (すなわち、0 から離れて丸めます) で整数値を返します。

規格

これらの関数は、 ISO/IEC 9899:1999 (“ISO C99”) に適合しています。

歴史

round() と roundf() 関数は、 FreeBSD 5.3 で登場しました。 roundl() 関数は、 FreeBSD 6.0 で登場しました。
April 7, 2005 FreeBSD