std::nextafter, std::nexttoward
来自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 nextafter( float from, float to ); |
(1) | (C++11 起) |
| double nextafter( double from, double to ); |
(2) | (C++11 起) |
| long double nextafter( long double from, long double to ); |
(3) | (C++11 起) |
| Promoted nextafter( Arithmetic from, Arithmetic to ); |
(4) | (C++11 起) |
| float nexttoward( float from, long double to ); |
(5) | (C++11 起) |
| double nexttoward( double from, long double to ); |
(6) | (C++11 起) |
| long double nexttoward( long double from, long double to ); |
(7) | (C++11 起) |
| double nexttoward( Integral from, long double to ); |
(8) | (C++11 起) |
返回下一個可表示的值的
4) fromto的方向。 from等於to,to返回.Original:
Returns the next representable value of
from in the direction of to. If from equals to to, to is returned.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.
如果任何參數是整數類型,它被轉換為double。如果有另一種說法是long double,則返回類型是long double,否則它是double
Original:
If any argument has integral type, it is cast to double. If any other argument is long double, then the return type is long double, otherwise it is double
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.
[编辑] 參數
| from, to | - | 浮點值
Original: floating point values The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[编辑] 返回值
下一個可表示的值的
from的方向的toOriginal:
the next representable value of
from in the direction of to.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.
[编辑] 為例
| 本節是不完整的 原因: no example |