On 2004-10-30 14:23:01 +0100 Graham gt@pobox.com wrote:
Neither float nor double can truly represent some numbers. Just as 1/3 or 1/7 cannot be expressed exactly in decimal, some numbers - e.g. 0.1 - do not have an exact binary representation. [...]
One reason I find Scheme very useful is that it includes a numeric tower and the concepts of exact and inexact representations. You can read about this in the Revised^5 Report on Scheme at http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_...
I think pretty much the same reasoning works in C-family languages, but you usually have to cast around explicitly a lot more and keep track of exactness yourself.