Re:Herbie: Automatically Improving Floating Point Accuracy
by b34r on Thursday August 06, 2020 @10:46PM
(#24077488)
I wouldn’t feel remotely comfortable using this on an existing project unless it had an iron-clad test suite.
[ Parent
| on HN ]
Re:Herbie: Automatically Improving Floating Point Accuracy
by pavpanchekha on Friday August 07, 2020 @11:40AM
(#24083053)
I totally agree, and in fact in big scientific code this is an ongoing reproducibility issue---different platforms (like GPUs) can have subtly different floating-point behavior, and how do you know the results hold up.
That said, your floating-point code probably didn't come with a numerical analysis to begin with, so how do you know it's better than the replacement? (Well... Herbie does dumb stuff sometimes, so do use with care.)
Re:Herbie: Automatically Improving Floating Point Accuracy
by spott on Friday August 07, 2020 @12:48PM
(#24083950)
I think it is probably easier to just use it for specific instructions and then spot check the results.
It isn't something like a compiler plugin that automatically rewrites your code, it just spits out alternative formulations when you give it a math expression...
It also can show you a graph of the error as a function of input value, which is pretty helpful.