3 ms·
Interesting, though Excel most certainly does use floating point numbers for storage and calculations (both at the time of its writing and now), and has some in
by personZ 12y ago
Interesting, though Excel most certainly does use floating point numbers for storage and calculations (both at the time of its writing and now), and has some infamous calculation errors as a result. Maybe I misunderstood the slide.
EDIT: I don't normally care much about a "downvote", but when it must be backed by ignorance I have to comment. Excel has always, and to this day, uses doubles. There is not a whit of decimal math to be found in the product. I kind of know this given that my industry is finance, and the calculation quirks of Excel (which is simply a quirk of floating point math) are something that the industry is aware of and works around.
Now it by default rounds the number for presentation, but surely no one on HN would be so confused that they fail to understand the difference.
- acqq 12y agoYou are right, Excel uses doubles internally, taking care to format them as good as it can. BLAS also uses floating point numbers: singles, doubles, complex (note the S, D, Z prefixes): http://www.netlib.org/blas/ http://www.netlib.org/blas/
- andreasvc 12y agoDon't worry about downvoters, they know not what they do. Also, it's easy to accidentally press the wrong arrow and it cannot be undone. On topic: do you happen to know why Excel doesn't use decimal math? I'd imagine for most spreadsheets the performance difference shouldn't be noticeable.
- stephencanon 12y agoSpeculation: The performance impact would have been significant in the mid-1980s. They can’t change the arithmetic now because users would complain if their spreadsheets started producing different results (how many billions of dollars of contracts were negotiated based on the results of an Excel spreadsheet?)
- stephencanon 12y agoMy understanding is that Excel mostly uses double, but with a bunch of hacks bolted on to make some results “seem” right. If anything this makes the situation worse. IIRC, for example, it’s possible to construct numbers such that any desired subset of the following three properties do or do not hold: 1. a and b have the same default displayed representation 2. a and b compare equal 3. (a - b) is zero It’s been ~10 years since I really poked around at Excel numerics, so my recollection may not be perfect, but there were definitely a number of hacks beyond straightforward double-precision arithmetic when I looked at it.