[HN Gopher] Herbie: Automatically Improving Floating Point Accuracy ___________________________________________________________________ Herbie: Automatically Improving Floating Point Accuracy Author : lelf Score : 93 points Date : 2020-08-06 09:40 UTC (13 hours ago) (HTM) web link (herbie.uwplse.org) (TXT) w3m dump (herbie.uwplse.org) | contravariant wrote: | It doesn't seem to be doing too well on log(1+x). It does | correctly identify that the Taylor expansion is more accurate for | small x (although in my opinion it switches back to log(1+x) a | bit too soon for positive x), however it doesn't seem to take | into account the essential singularity at x=-1 and keeps using | the Taylor series for negative values all the way up to x=-1 | leading to horrendous accuracy. | vii wrote: | They made a related project - http://herbgrind.ucsd.edu/ - a tool | that can automatically find floating point issues in real | programs. You can also annotate the region you're interested in | with herbgrind on/off controls. | | Unfortunately - once you know you have a floating point problem, | tracking it down and fixing it may be easy. Not realising it, you | won't use these tools and the program will do the wrong thing :) | pavpanchekha wrote: | Very true. Floating point bugs are hard to find, because | there's often no way to compute a more accurate answer. | Herbgrind was our attempt at helping track down a _root cause_ | once you knew floating point was the problem---that might be | the case if, for example, you changed from double to single | precision and suddenly the result was way off. But Herbgrind is | pretty high overhead; you 'd want some other tool to tell you | that floating point was a problem to begin with. | jonnycomputer wrote: | The natural application of this is in a code-inspection plugin | for an IDE. Pretty cool tool! | pavpanchekha wrote: | There used to be GHC and Rust plugins. I don't know much about | building IDE plugins, but I agree it'd be a great use of | Herbie. | ImaCake wrote: | This seems like a great tool for certain statistical | applications. I am learning a bit about the controversey | surrounding extremely small p-values in Genome Wide Association | Studies (think a million _n_ ANOVA) and machine precision. I | guess tools like this would be very useful to make sure your | statistical tests can more accurately calculate p-values | approaching the limits of machine precision. ___________________________________________________________________ (page generated 2020-08-06 23:00 UTC)