\frac{x + y}{\left(x \cdot 2\right) \cdot y}\frac{0.5}{y} + \frac{0.5}{x}double f(double x, double y) {
double r687895 = x;
double r687896 = y;
double r687897 = r687895 + r687896;
double r687898 = 2.0;
double r687899 = r687895 * r687898;
double r687900 = r687899 * r687896;
double r687901 = r687897 / r687900;
return r687901;
}
double f(double x, double y) {
double r687902 = 0.5;
double r687903 = y;
double r687904 = r687902 / r687903;
double r687905 = x;
double r687906 = r687902 / r687905;
double r687907 = r687904 + r687906;
return r687907;
}




Bits error versus x




Bits error versus y
Results
| Original | 15.5 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 15.5
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020042 +o rules:numerics
(FPCore (x y)
:name "Linear.Projection:inversePerspective from linear-1.19.1.3, C"
:precision binary64
:herbie-target
(+ (/ 0.5 x) (/ 0.5 y))
(/ (+ x y) (* (* x 2) y)))