x + \frac{x - y}{2}\mathsf{fma}\left(1.5, x, -y \cdot 0.5\right)double f(double x, double y) {
double r50449 = x;
double r50450 = y;
double r50451 = r50449 - r50450;
double r50452 = 2.0;
double r50453 = r50451 / r50452;
double r50454 = r50449 + r50453;
return r50454;
}
double f(double x, double y) {
double r50455 = 1.5;
double r50456 = x;
double r50457 = y;
double r50458 = 0.5;
double r50459 = r50457 * r50458;
double r50460 = -r50459;
double r50461 = fma(r50455, r50456, r50460);
return r50461;
}




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
Simplified0
Final simplification0
herbie shell --seed 2019315 +o rules:numerics
(FPCore (x y)
:name "Graphics.Rendering.Chart.Axis.Types:hBufferRect from Chart-1.5.3"
:precision binary64
:herbie-target
(- (* 1.5 x) (* 0.5 y))
(+ x (/ (- x y) 2)))