x + \frac{x - y}{2}\left(x + \frac{x}{2}\right) - \frac{y}{2}double f(double x, double y) {
double r523790 = x;
double r523791 = y;
double r523792 = r523790 - r523791;
double r523793 = 2.0;
double r523794 = r523792 / r523793;
double r523795 = r523790 + r523794;
return r523795;
}
double f(double x, double y) {
double r523796 = x;
double r523797 = 2.0;
double r523798 = r523796 / r523797;
double r523799 = r523796 + r523798;
double r523800 = y;
double r523801 = r523800 / r523797;
double r523802 = r523799 - r523801;
return r523802;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
rmApplied div-sub0.1
Applied associate-+r-0.1
Final simplification0.1
herbie shell --seed 2019294
(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)))