阅读背景:

生成下一个最大或最小可表示的浮点数而不会产生比特错误

来源:互联网 

Given an arbitrary finite floating point number, is there a way to determine what the next representable floating point number? For example, given 1.0f, by definition the next largest representable number is 1.0f + std::numeric_limits<float>::epsilon(). Is there a way to synthesize an epsilon for any value - not just 1.0f - without resorting to bit twiddling and/or explicit knowledge of how the machine represents floating point values? Given an arbitrary finite floating point number




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: