rint, lrint, llrint

来自cppreference.com
< c | numeric | math

 
 
 
常见的数学函数
功能
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
基本操作
Original:
Basic operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
remainder(C99)
remquo(C99)
fma(C99)
fmax(C99)
fmin(C99)
fdim(C99)
nan
nanf
nanl
(C99)
(C99)
(C99)
指数函数
Original:
Exponential functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
exp
exp2(C99)
expm1(C99)
log
log10
log1p(C99)
log2(C99)
电源的功能
Original:
Power functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sqrt
cbrt(C99)
hypot(C99)
pow
三角函数和双曲功能
Original:
Trigonometric and hyperbolic functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sinh
cosh
tanh
asinh(C99)
acosh(C99)
atanh(C99)
错误和伽玛功能
Original:
Error and gamma functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
erf(C99)
erfc(C99)
lgamma(C99)
tgamma(C99)
最接近的整数,浮点运算
Original:
Nearest integer floating point operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ceil
floor
round
lround
llround
(C99)
(C99)
(C99)
trunc(C99)
nearbyint(C99)
rint
lrint
llrint
(C99)
(C99)
(C99)
浮点操作功能
Original:
Floating point manipulation functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ldexp
scalbn
scalbln
(C99)
(C99)
ilogb(C99)
logb(C99)
frexp
modf
nextafter
nexttoward
(C99)
(C99)
copysign(C99)
分类
Original:
Classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fpclassify(C99)
isfinite(C99)
isinf(C99)
isnan(C99)
isnormal(C99)
signbit(C99)
宏常量
Original:
Macro constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
HUGE_VALF
HUGE_VAL
HUGE_VALL
(C99)

(C99)
FP_NORMAL
FP_SUBNORMAL
FP_ZERO
FP_INFINITE
FP_NAN
(C99)
(C99)
(C99)
(C99)
(C99)
 
Defined in header <math.h>
int rintf( float arg );
(C99 起)
int rint( double arg );
(C99 起)
int rintl( long double arg );
(C99 起)
long lrintf( float arg );
(C99 起)
long lrint( double arg );
(C99 起)
long lrintl( long double arg );
(C99 起)
long long llrintf( float arg );
(C99 起)
long long llrint( double arg );
(C99 起)
long long llrintl( long double arg );
(C99 起)
舍入浮点参数arg一个整数值,浮点格式,使用当前的舍入模式。如果结果是不同的arg(即arg已经不是一个整数值),的浮点异常FE_INEXACT,提高.
Original:
Rounds the floating-point argument arg to an integer value in floating-point format, using the current rounding mode. If the result differs from arg (i.e., arg was not an integer value already), the floating-point exception FE_INEXACT is raised.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目录

[编辑] 参数

arg -
浮点值
Original:
floating point value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 返回值

的整数结果四舍五入arg
Original:
The integer result of rounding arg
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 注释

唯一的区别nearbyintrint的是,rint可以提高FE_INEXACT浮点异常,而nearbyint不会提高.
Original:
The only difference between nearbyint and rint is that rint may raise the FE_INEXACT floating-point exception, while nearbyint never raises it.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 为例

[编辑] 另请参阅

(C99)
最接近的整数,使用当前的舍入模式
Original:
nearest integer using current rounding mode
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C99)
最接近的整数的幅值比不大于给定值
Original:
nearest integer not greater in magnitude than the given value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]