Пространства имён
Варианты
Действия

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)
Классификация
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.
 
Заголовочный файл <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.

[править] Notes

Единственное различие между nearbyint и rint в том, что 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.

[править] Пример

[править] См. также

Ближайшая целое число, используя текущий режим округления
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]