| ▲ | GuB-42 5 hours ago | |
The thing with floating point numbers is they are meant to work with physical quantities: distances, durations, etc... Physical quantities involve imprecision: measurement devices, tools, display devices, ADC/DACs etc... They all have some tolerances. And when you are using epsilons, the epsilon value should be chosen based on that physical value. For example, you set the epsilon to 1e-4 because that's 100 microns and you can't display 100 micron details. That's also the reason why there is not one size fits all solution. If you are working with microscopic objects, 100 microns is huge, and if you are doing a space simulation, 1 km may be negligible. Some operations involve a huge loss of precision, some don't, and sometimes you really want exact numbers and therefore you have to know your fractional powers of 2. | ||
| ▲ | waffletower 5 hours ago | parent [-] | |
This is highly reductive, "they are meant to work with physical quantities", but agree that the applicability of an epsilon is entirely situational. | ||