in reply to Re^4: [Win32, C, and way OT] C floats, doubles, and their equivalence
in thread [Win32, C, and way OT] C floats, doubles, and their equivalence
# absolute error method $is_within_tolerance = abs($value - $expected) < EPSILON; # relative error method - $tolerance_error should be within threshold +percentage $tolerance_error = abs(($value - $expected) / $expected);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: [Win32, C, and way OT] C floats, doubles, and their equivalence
by syphilis (Archbishop) on Jul 21, 2009 at 02:12 UTC |