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

std::numeric_limits::round_error

static T round_error();

?

(until C++11)

static constexpr T round_error();

?

(since C++11)

返回以ULPS%28单位表示的最大可能的舍入误差,该值在ISO 10967定义的最后一个位置%29,它可以从0.5%28四舍五入到最近的数字%29到1.0%28舍入到零或无穷大%29。只有当std::numeric_limits<T>::is_integer==false...

返回值

T

std::numeric_limits<T>::round_error()

/* non-specialized */

T();

bool

false

char

?0?

signed char

?0?

unsigned char

?0?

wchar_t

?0?

char16_t

?0?

char32_t

?0?

short

?0?

unsigned short

?0?

int

?0?

unsigned int

?0?

long

?0?

unsigned long

?0?

long long

?0?

unsigned long long

?0?

float

0.5F

double

0.5

long double

0.5L

例外

(none)

(until C++11)

noexcept specification: noexcept

(since C++11)

另见

round_style static

identifies the rounding style used by the type (public static member constant)

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com