x + \frac{x - y}{2.0}\mathsf{fma}\left(1.5, x, -0.5 \cdot y\right)double f(double x, double y) {
double r29093495 = x;
double r29093496 = y;
double r29093497 = r29093495 - r29093496;
double r29093498 = 2.0;
double r29093499 = r29093497 / r29093498;
double r29093500 = r29093495 + r29093499;
return r29093500;
}
double f(double x, double y) {
double r29093501 = 1.5;
double r29093502 = x;
double r29093503 = 0.5;
double r29093504 = y;
double r29093505 = r29093503 * r29093504;
double r29093506 = -r29093505;
double r29093507 = fma(r29093501, r29093502, r29093506);
return r29093507;
}




Bits error versus x




Bits error versus y
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0 |
Initial program 0.1
Taylor expanded around 0 0.1
rmApplied fma-neg0
Final simplification0
herbie shell --seed 2019158 +o rules:numerics
(FPCore (x y)
:name "Graphics.Rendering.Chart.Axis.Types:hBufferRect from Chart-1.5.3"
:herbie-target
(- (* 1.5 x) (* 0.5 y))
(+ x (/ (- x y) 2.0)))