[Jprogramming] dyad ": rounding error

Don Guinn donguinn at pvtn.net
Tue Mar 20 01:17:13 HKT 2007


I hate to state the obvious, but 0.295 cannot be represented exactly in
floating point. It depends on how the internal representation is rounded up
or down to get close to 0.295. If it rounded down then any special logic to
treat it as 0.295 instead of the actual internal number could lead to other
rounding problems.


More information about the Programming mailing list