in reply to Re^3: what did I just see..?
in thread what did I just see..?

For the range 0 to 1, then epsilon will always be greater than the error

So while we have the example of 0.8 down to 0.1, the difference between the epsilon and the ULP won't be huge. But who knows whether the OP will eventually go beyond that range, and get upset when numbers near 2e-16 start displaying as near 4e-16. That's one of the reasons I was cautioning against applying epsilon in this case, because it might later be generalized to a condition where it's not even close to the real absolute error.

Print rounds down

that's not true, as syphilis showed. Here's another example.

C:\usr\local\share>perl -le "printf qq(%.17e => %s\n), $_, $_ for 2.99 +999999999999989e-02, 2.99999999999999503e-02, 2.99999999999999468e-02 +" 2.99999999999999989e-02 => 0.03 2.99999999999999503e-02 => 0.03 2.99999999999999468e-02 => 0.0299999999999999

Print rounds to nearest to the precision that print "likes" rounding to.

If the float is +/- epsilon from ideal, then adding an epsiol brings it into range of 0 to +2 epsilon from ideal, which will round down to ideal.

Again, no.

C:\usr\local\share>perl -MMachine::Epsilon -le "for (2.999999999999999 +89e-02, 2.99999999999999503e-02, 2.99999999999999468e-02) { printf qq +(%.17e => %-30s x+2eps = %s\n), $_, $_, $_+2*machine_epsilon}" 2.99999999999999989e-02 => 0.03 x+2eps = 0.0 +300000000000004 2.99999999999999503e-02 => 0.03 x+2eps = 0.0 +300000000000004 2.99999999999999468e-02 => 0.0299999999999999 x+2eps = 0.0 +300000000000004

Notice that x+2epsilon prints a number bigger than 0.03, whereas the value of x is slightly less than 0.03 (by 1 ULP).