首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

FLT_EVAL_METHOD

Defined in header <cfloat>

#define FLT_EVAL_METHOD /* implementation defined */

(since C++11)

指定执行除赋值和强制转换以外的所有浮点算术操作的精度。

Value

Explanation

negative values except -1

implementation-defined behavior

-1

the default precision is not known

0

all operations and constants evaluate in the range and precision of the type used. Additionally, float_t and double_t are equivalent to float and double respectively

1

all operations and constants evaluate in the range and precision of double. Additionally, both float_t and double_t are equivalent to double

2

all operations and constants evaluate in the range and precision of long double. Additionally, both float_t and double_t are equivalent to long double

注记

不管…的价值FLT_EVAL_METHOD,任何浮点表达式都可能是承包,也就是说,如果所有中间结果都有无限的范围和精度,除非#语用STDC FP_CONTRACT关闭%29。

转换和赋值剥离任何无关的范围和精度:这是一种将值从扩展精度FPU寄存器存储到标准大小的内存位置的行为模型。

另见

C.FLT文件[医]埃瓦尔[医]方法

*。

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券