Skip to main content
4 events
when toggle format what by license comment
Jun 12, 2020 at 14:58 comment added gnasher729 To some degree, yes. What you lose is that the average rounding error is zero. If you add 10,000 numbers with “round down” then you can expect an error around 5,000u.
Jun 12, 2020 at 14:02 comment added Deduplicator @gnasher729 Something similar can sometimes be done running the same code with different rounding-modes: up, down, to zero, to infinity, to even, to odd. FENV_ACCESS is useful for something.
Jun 12, 2020 at 13:46 comment added gnasher729 I had the great idea of an FPU with non-deterministic rounding. If the correct result x is between a and b, then it would be rounded more likely to the closer value. That would be excellent for code where you don't know how sensitive it is to rounding errors. If you run your code five times and results are the same to 14 decimals, then you can assume the results are correct to 14 decimals. If the results are identical on each run, you have no idea if they are correct or not.
Jun 12, 2020 at 13:29 history answered Deduplicator CC BY-SA 4.0