Herbie: Automatically improve imprecise floating point formulas
herbie.uwplse.org
Herbie: Automatically improve imprecise floating point formulas
1–10 of 47 posts
Re: Herbie: Automatically improve imprecise floating point formulas
#2Like looking at this example,
https://herbie.uwplse.org/demo/b070b371a661191752fe37ce0321c...
It is claimed that for the function f(x) =sqrt(x+1) -1
Accuracy is increased by from 8.5% accuracy to 98% for alternative 5 Which has f(x) = 0.5x
Ok so x=99, the right answer is sqrt(100) -1 = 9
But 0.5 * 99 = 49.5 which doesn't seem too accurate to me.
Re: Herbie: Automatically improve imprecise floating point formulas
#3How useful is this when you are using numbers in a reasonable range, like 10^-12 to 10^12? Generally I try to scale my numbers to be in this range, whether by picking the right units or scaling constraints and objectives when doing nonlinear programming/ optimization. Like looking at this example, https://herbie.uwplse.org/demo/b070b371a661191752fe37ce0321c... It is claimed that for the function f(x) =sqrt(x+1) -1 Ac…
Re: Herbie: Automatically improve imprecise floating point formulas
#4How useful is this when you are using numbers in a reasonable range, like 10^-12 to 10^12? Generally I try to scale my numbers to be in this range, whether by picking the right units or scaling constraints and objectives when doing nonlinear programming/ optimization. Like looking at this example, https://herbie.uwplse.org/demo/b070b371a661191752fe37ce0321c... It is claimed that for the function f(x) =sqrt(x+1) -1 Ac…
Re: Herbie: Automatically improve imprecise floating point formulas
#5Also, I’m not sure I understand the speedup. Is it latency or throughput?
Re: Herbie: Automatically improve imprecise floating point formulas
#6How useful is this when you are using numbers in a reasonable range, like 10^-12 to 10^12? Generally I try to scale my numbers to be in this range, whether by picking the right units or scaling constraints and objectives when doing nonlinear programming/ optimization. Like looking at this example, https://herbie.uwplse.org/demo/b070b371a661191752fe37ce0321c... It is claimed that for the function f(x) =sqrt(x+1) -1 Ac…
Check the specification at the top. The range for x is [-1, 1]. For the range you provided the accuracy of the 0.5x alternative is reported as only 33%: https://herbie.uwplse.org/demo/570b973df0f1f4a78fe791858038a...
What would be cool is if you could some how have this kind of analysis done automatically for your whole program where it finds the needle in the haystack expression that can be improved, assuming you gave expected ranges for your variables
Re: Herbie: Automatically improve imprecise floating point formulas
#7Re: Herbie: Automatically improve imprecise floating point formulas
#8Re: Herbie: Automatically improve imprecise floating point formulas
#9[flagged]
This isn’t a library, you don’t include in your application, and it doesn’t try to replace an understanding of floating point issues on the programmers part.
Is this comment written by AI?
Re: Herbie: Automatically improve imprecise floating point formulas
#10[flagged]
> If the issue is that people write bad floating-point expressions, a code-writing tutorial would be a better solution.
Yeah you are just criticizing this without even looking at it. Shame.