j****i 发帖数: 305 | 1 How to find the minimum number x such that 1 + x > 1 in floating number
system in c++? | S**I 发帖数: 15689 | 2 #include
FLT_EPSILON
DBL_EPSILON
LDBL_EPSILON
【在 j****i 的大作中提到】 : How to find the minimum number x such that 1 + x > 1 in floating number : system in c++?
| j****i 发帖数: 305 | 3 Instead of using macros, can we write code to get this, for example, by
manipulating bits? I'm just wondering.
s
【在 S**I 的大作中提到】 : #include : FLT_EPSILON : DBL_EPSILON : LDBL_EPSILON
| l******e 发帖数: 12192 | 4 numeric_limits::epsilon()
【在 j****i 的大作中提到】 : Instead of using macros, can we write code to get this, for example, by : manipulating bits? I'm just wondering. : s
| S**I 发帖数: 15689 | 5 double getDoubleEpsilon(){
double a = 1;
while(1.0 + a/FLT_RADIX != 1.0)
a /= FLT_RADIX;
return a;
}
【在 j****i 的大作中提到】 : Instead of using macros, can we write code to get this, for example, by : manipulating bits? I'm just wondering. : s
|
|