x + \frac{x - y}{2}\mathsf{fma}\left(1.5, x, -0.5 \cdot y\right)double f(double x, double y) {
double r693057 = x;
double r693058 = y;
double r693059 = r693057 - r693058;
double r693060 = 2.0;
double r693061 = r693059 / r693060;
double r693062 = r693057 + r693061;
return r693062;
}
double f(double x, double y) {
double r693063 = 1.5;
double r693064 = x;
double r693065 = 0.5;
double r693066 = y;
double r693067 = r693065 * r693066;
double r693068 = -r693067;
double r693069 = fma(r693063, r693064, r693068);
return r693069;
}




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 2020047 +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)))