Closed for Company Meetings: Between September 18 (5pm PDT) and September 22 (12pm PDT), Support and Sales requests will be delayed. Only time-sensitive issues will be addressed during that time. Thanks for your patience.
Nicolas, I'm afraid this won't help for Luke's problem. flonum will correctly display the value, but . lcd wont as 20.30 and 20.2999999 are the same float.
Not sure using tosymbol looks better: 20.3000
This really ought to be a sticky. I feel like I'm reading this thread for about the 10,000th time.
@leehu: doubles *are* used for internal arithmetic (mostly), but for message-passing between objects it has always been convenient to use data types that are the same size for floating-point, integers, and symbols (pointers). And the common "denominator" was a 32-bit word. Never mind that in the mid-1980s a lot of computers didn't even support 64-bit float registers (plus Apple's software double-precision float was an 80-bit datum).
Nor is it "random" what can be represented exactly. If it's a binary fraction, it can be represented exactly. If it ain't, it cain't.
@Peter, thanks for the info. as for the random comment, I know it's not random, but from a user perspective, it's really hard to predict what can and cannot be represented - just my excuse for lazy typing :)