std::ceil
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <cmath>
|
||
| float ceil( float arg ); |
||
| double ceil( double arg ); |
||
| long double ceil( long double arg ); |
||
| double ceil( Integral arg ); |
(C++11 起) | |
计算最接近的整数不小于
arg. Original:
Computes nearest integer not less than
arg. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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. |
[编辑] 返回值
最接近的整数不小于
argOriginal:
Nearest integer not less than
argThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[[Image:
返回值
|200x200px]]Original:
{{{2}}}
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Argument
[编辑] 注释
如果参数是无穷大(正或负)或0(正或负),返回值是一样的说法.
Original:
If the argument is infinity (positive or negative) or zero (positive or negative), the return value is the same as the argument.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
表示的最大浮点值是准确的整数,在所有标准的浮点格式,所以这个函数永远不会溢出.
Original:
The largest representable floating-point values are exact integers in all standard floating-point formats, so this function never overflows.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
此功能,但不是必需的,以,提高FE_INEXACT“非整数参数的浮点异常.
Original:
This function may, but is not required to, raise FE_INEXACT floating-point exceptions for non-integer arguments.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 为例
Output:
12.000000 13.000000 13.000000 13.000000 13.000000
[编辑] 另请参阅
| 最接近的整数不大于给定值 Original: nearest integer not greater 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. (函数) | |
| (C++11) |
最接近的整数的幅值比不大于给定值 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. (函数) |
| (C++11) (C++11) (C++11) |
最接近的整数,四舍五入的距离零中途情况下 Original: nearest integer, rounding away from zero in halfway cases The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
| (C++11) (C++11) (C++11) |
最接近的整数 的结果是不同的异常,如果使用当前的舍入模式 Original: nearest integer using current rounding mode with exception if the result differs The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
| (C++11) |
最接近的整数,使用当前的舍入模式 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. (函数) |