4 ms·
IEEE 754 is what you get when you want numbers to have huge dynamic range, equal precision across the range, and fixed bit width. It balances speed and accuracy
by pclmulqdq 2y ago
IEEE 754 is what you get when you want numbers to have huge dynamic range, equal precision across the range, and fixed bit width. It balances speed and accuracy, and produces a result that is very close to the expected result 99.9999999% of the time. A competent numerical analyst can take something you want to do on paper and build a sequence of operations in floating point that compute that result almost exactly.
I don't think anyone who worked on IEEE 754 (and certainly nobody who currently works on it) contemplated calculators as an application, because a calculator is solving a fundamentally different problem. In a calculator, you can spend 10-100 ms doing one operation and people won't mind. In the applications for which IEEE 754 is made, you are expecting to do billions or trillions of operations per second.
- buescher 2y agoWilliam Kahan worked on both IEEE 754 and HP calculators. The speed gap between something like an 8087 and a calculator was not that big back then, either.
- deleted 2y ago[deleted]
- 8n4vidtmkvmk 2y ago> equal precision across the range What? Pretty sure there's more precision in [0-1] than there is in really big numbers.
- pclmulqdq 2y agoPrecision in numerics is usually considered in relative terms (eg significant figures). Every floating point number has an equal number of bits of precision. It is true, though, that half of the floats are between -1 and 1. That is because precision is equal across the range.
- tialaramex 2y agoOnly the normal floating point numbers have this property, the sub-normals do not. In the single precision floats for example there is no 0.000000000000000000000000000000000000000000002 it goes straight from 0.000000000000000000000000000000000000000000001 to 0.000000000000000000000000000000000000000000003 So that's not even one whole digit of precision.
- pclmulqdq 2y agoYes, that is true. The subnormal numbers gradually lose precision going towards zero.
- hoseja 2y agoSubnormals are a dirty hack to squeeze a bit more breathing space around zero for people who really need it. They aren't even really supported in hardware. Using them in normal contexts is usually an error.
- djmips 2y agoBillions or trillions of ops per second and 1987 don't really go together.
- saagarjha 2y agohttps://en.wikipedia.org/wiki/Cray-2 https://en.wikipedia.org/wiki/Cray-2
- djmips 2y agoGood point! Side note: Cray-2 did not use IEE 754 floating point. https://cray-history.net/2021/08/26/cray-floating-point-numbers/ https://cray-history.net/2021/08/26/cray-floating-point-numb...
- pclmulqdq 2y agoCray did use floating point. It didn't use IEEE standard floating point. Floating point arithmetic is older than the transistor.
- djmips 2y agoYeah I know. I linked the specs.
- saagarjha 2y agoYeah I mean they were surely too old to support it. But the designers of IEEE-754 must have been aware of these systems when they were making the standard.