Daniel Friesen wrote:
Output a big red error when giving numbers that will encounter a floating point error?
Perhaps also provide a # of use limited #expr equivalent that will use a bignum library rather than normal numbers which can be used in cases where that big red error shows up.
Well, such a library could be used unconditionally, the overhead wouldn't be large compared to the general overhead of parsing. But you have to truncate the output somewhere, you can't just let the decimal expansion of 1/3 run until you run out of memory.
There are two techniques which can be used to avoid inaccuracy due to truncation in special cases: rational arithmetic, for exact division, and decimal arithmetic, for addition of numbers written as decimals and exact multiplication/division by powers of ten.
But I don't think either of those techniques are appropriate for formatting a directly input number for presentation, adding thousands separators. What we want for that job is string processing, not arithmetic.
-- Tim Starling