18 karma · joined Apr 19, 2016 (10y ago) · 4 submissions
comment 2y ago · link · parent
Seems like it wasn’t accurate. I updated the license on the github repository a few hours ago so it is exactly the BSD-3-clause template now
comment 10y ago · link · parent
I could prove that a - b < c is not the same as a < b + c (large a, a=c,, b the minimum value to cause a-b change --> would result in first being true, 2nd being false)
But I couldn't think of a failure case for a - b <= c not being the same as a <= b + c.
Would love it if someone could verify/prove this.
To further complicate it, the LHS of the code in question is a float evaluation, that is then upcast to a double to compare with the right (which is a double).
comment 10y ago · link · parent
I tested -ffast-math on clang and it won't reorder the additions to omit the conversion here.
I'm actually VERY wary of -ffast-math due to a bad experience some years ago where it just totally messed up my calculations and I couldn't avoid it messing up my calculations.
Even a 1ulp change (not accounting for the round down) in the final floating point comparison changed my compression results; so I'm not entirely confident about using -ffast-math without a huge test corpus -- but turning it on does improve the run time.