Better HN
topnewbestaskshowjobs
Log inSign up

jtlim

18 karma · joined Apr 19, 2016 (10y ago) · 4 submissions

Submissions

comment 2y ago · link · parent

10 years ago when publishing the code to bitbucket, I grabbed what I thought was a copy of the BSD-3-clause and replaced my name and year

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

This is a good question. I pondered about it myself.

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

Hi, author of article here.

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.

comment 10y ago · link · parent

Hi, author of the article here.

Yes, talking to Lode (from Google) about getting the changes into the main development branch.