#C 语言标准库函数 nextdown
#include <math.h>
double nextdown(double x);
说明
求沿负无穷方向的下一个可表示值。
可在不自行估算浮点间隔的情况下确定邻点。间距随当前值的量级变化。
自 C23 起提供。
参数
x- 起始值。
返回值
- 返回输入类型的相邻值。沿指定方向已到无穷时返回该无穷。
#示例
使用 GCC 时,在链接命令末尾添加 -lm。
#include <math.h>
#include <stdio.h>
int main(void)
{
printf("%d\n", nextdown(1.0) < 1);
return 0;
}
#相关接口
- 接口变体 nextdownf、nextdownl、nextdownd32、nextdownd64、nextdownd128
- 类型通用分派 nextdown(类型通用宏)
- 相关操作 nextafter、nexttoward、nextup