Live data from Hacker News

Herbgrind analyzes binaries to find inaccurate floating point expressions

herbgrind.ucsd.edu

1–10 of 14 posts

Re: Herbgrind analyzes binaries to find inaccurate floating point expressions

#3
Thinking of all the people (some even actual friends) worked so long on numerical stability on scalar floating point operations, nearing a time when model-checking and proof tool are actually usable by the really-motivated developer ; thinking of them witnessing the arrival of GPUs and Tensor Cores, mixed-precision-everywhere and the tools now needing to scale so far it seems like starting from scratch...

Re: Herbgrind analyzes binaries to find inaccurate floating point expressions

#4
post #2

Is it just me, or does the website not say which OSes it supports?

"Herbgrind currently primarily supports 64-bit Linux, but 32-bit might also work, and theres some work in progress to also support OSX."

https://herbgrind.ucsd.edu/getting-herbgrind.html

Re: Herbgrind analyzes binaries to find inaccurate floating point expressions

#5
Wow, didn't expect this tool to be on Hacker News six years after publication! Herbgrind author here, ask me any questions you like! Also, if you're interested in this stuff, the Herbie project (which I also worked on) for numerical program synthesis is also really helpful for writing numerical code, and has had a lot of development over the years.

Re: Herbgrind analyzes binaries to find inaccurate floating point expressions

#6

Wow, didn't expect this tool to be on Hacker News six years after publication! Herbgrind author here, ask me any questions you like! Also, if you're interested in this stuff, the Herbie project (which I also worked on) for numerical program synthesis is also really helpful for writing numerical code, and has had a lot of development over the years.

I've tried out HerbGrind but it often gets stuck and reports an error E_STONED.

Re: Herbgrind analyzes binaries to find inaccurate floating point expressions

#7

Wow, didn't expect this tool to be on Hacker News six years after publication! Herbgrind author here, ask me any questions you like! Also, if you're interested in this stuff, the Herbie project (which I also worked on) for numerical program synthesis is also really helpful for writing numerical code, and has had a lot of development over the years.

Is it feasible to run this on something large like Solvespace[1] (CAD) which is ~5MB executable? Or would we just get an insanely long list of issues?

[1] https://solvespace.com/index.pl

There are hundreds of numerical algorithms in there, and we have some bugs that might be related to this kind of implementation error.

Re: Herbgrind analyzes binaries to find inaccurate floating point expressions

#8
post #6

Wow, didn't expect this tool to be on Hacker News six years after publication! Herbgrind author here, ask me any questions you like! Also, if you're interested in this stuff, the Herbie project (which I also worked on) for numerical program synthesis is also really helpful for writing numerical code, and has had a lot of development over the years.

I've tried out HerbGrind but it often gets stuck and reports an error E_STONED.

I believe that's a PEBCAK error

Re: Herbgrind analyzes binaries to find inaccurate floating point expressions

#9
post #7

Wow, didn't expect this tool to be on Hacker News six years after publication! Herbgrind author here, ask me any questions you like! Also, if you're interested in this stuff, the Herbie project (which I also worked on) for numerical program synthesis is also really helpful for writing numerical code, and has had a lot of development over the years.

Is it feasible to run this on something large like Solvespace[1] (CAD) which is ~5MB executable? Or would we just get an insanely long list of issues? [1] https://solvespace.com/index.pl There are hundreds of numerical algorithms in there, and we have some bugs that might be related to this kind of implementation error.

It should be possible. Herbgrind is designed under the philosophy that it's not bad numerics themselves that are significant, it's how they affect the outputs of your program. So the reports are organized around program outputs (either through print calls, or you can annotate values you care about with macros), and errors are reported in terms of how they are affecting your outputs. That should allow you to skip any numerical errors that are insignificant in the final output, and prioritize the ones that are affecting the outputs you care about most greatly.

But Herbgrind is a heavyweight dynamic binary analysis using the Valgrind framework, so the slowdown it imposes on the runtime might be prohibitive for debugging some programs which take a while to compute their results.

Re: Herbgrind analyzes binaries to find inaccurate floating point expressions

#10

Wow, didn't expect this tool to be on Hacker News six years after publication! Herbgrind author here, ask me any questions you like! Also, if you're interested in this stuff, the Herbie project (which I also worked on) for numerical program synthesis is also really helpful for writing numerical code, and has had a lot of development over the years.

What do you think programming languages/libraries/tools could do to make floats less scary for the common people? I feel there is lot of superstition around floats, some of it more well deserved than others, but it leads people to approach fp with great distrust.

Of course herbie is already good step here, but it is still somewhat niche.

Post reply on HN