3 ms·
My personal fundamental axiom of floating point numbers is that they're like a physical measurement of a continuous quantity. Examples: 1 + 2^30 - 2^30 = 0 is
by lopmotr 6y ago
My personal fundamental axiom of floating point numbers is that they're like a physical measurement of a continuous quantity. Examples:
1 + 2^30 - 2^30 = 0 is like adding a drop of water to the ocean then removing an ocean's worth of water. You're not going to be able to meter that accurately enough to leave the one drop behind.
Round-trip conversions from decimal to FP and back result in a slightly different value. Why do you expect special treatment for a number system in any particular base? Nature's physical quantities aren't in any base. And why do you care about the 17th significant figure? You can't measure that with common scientific equipment.
Cumulative errors. They're like tolerance stacking. Engineers define dimensions from a common datum instead of in a chain from each other because their physical measurements accumulate error like floating point does.
They don't allow extreme values. You're never going to need them because you can't find a 10^400 m or 10^-400 m long object in nature either.
Dollars and cents don't work right. Money isn't a continuous quantity.