3 ms·
I worked in cad, robotics and now semiconductor optics. In every single field, floating precision down to the very last digits was a huge issue
by on_the_train 1y ago
I worked in cad, robotics and now semiconductor optics. In every single field, floating precision down to the very last digits was a huge issue
- cycomanic 1y agoInteresting, I stand corrected. In most of the fields I'm aware off one could easily work in 32bit without any issues. I find the robotics example quite surprising in particular. I think the precision of most input sensors is less than 16bit so. If your inputs have this much noise on them how come you need so much precision your calculations?
- spookie 1y agoThe precision isn't uniform across a range of possible inputs. This means you need a higher bit depth, even though "you aren't really using it", just so you can establish a good base precision you are sure you are hitting at every range. The part where you are saying "most sensors" is doing a lot of leverage here.
- AlotOfReading 1y ago"precision" is an ambiguous term here. There's reproducibility (getting the same results every time), accuracy (getting as close as possible to same results computed with infinite precision), and the native format precision. ffast-math is sacrificing both the first and the second for performance. Compilers usually sacrifice the first for the second by default with things like automation fma contraction. This isn't a necessary trade-off, it's just easier. There's very few cases where you actually need accuracy down to the ULP though. No robot can do anything meaningful with femtometer+ precision, for example. Instead you choose a development balance between reproducibility (relatively easy) and accuracy (extremely hard). In robotics, that will usually swing a bit towards reproducibility. CAD would swing more towards accuracy.