std::nextafter, std::nexttoward
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <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) from
to
的方向。 from
等于to
,to
返回.原文:
Returns the next representable value of
from
in the direction of to
. If from
equals to to
, to
is returned.如果任何参数是整数类型,它被转换为double。如果有另一种说法是long double,则返回类型是long double,否则它是double
原文:
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
[编辑] 参数
from, to | - | 浮点值
|
[编辑] 返回值
下一个可表示的值的
from
的方向的to
原文:
the next representable value of
from
in the direction of to
.[编辑] 示例
本章尚未完成 原因:暂无示例 |