x + \frac{x - y}{2}\mathsf{fma}\left(1.5, x, \left(-0.5\right) \cdot y\right)double f(double x, double y) {
double r368755 = x;
double r368756 = y;
double r368757 = r368755 - r368756;
double r368758 = 2.0;
double r368759 = r368757 / r368758;
double r368760 = r368755 + r368759;
return r368760;
}
double f(double x, double y) {
double r368761 = 1.5;
double r368762 = x;
double r368763 = 0.5;
double r368764 = -r368763;
double r368765 = y;
double r368766 = r368764 * r368765;
double r368767 = fma(r368761, r368762, r368766);
return r368767;
}




Bits error versus x




Bits error versus y
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0 |
Initial program 0.1
rmApplied div-sub0.1
Applied associate-+r-0.1
Simplified0.1
Taylor expanded around 0 0.1
Simplified0
Final simplification0
herbie shell --seed 2019174 +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)))