Tag: epsilon

各种浮动值的epsilon

FLT_MIN常量最接近零。 如何获得最接近some number数值? 举个例子: float nearest_to_1000 = 1000.0f + epsilon; // epsilon must be the smallest value satisfying condition: // nearest_to_1000 > 1000.0f 我更喜欢不使用特殊function的数字公式。