\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 r338445 = x;
double r338446 = y;
double r338447 = r338445 + r338446;
double r338448 = 2.0;
double r338449 = r338445 * r338448;
double r338450 = r338449 * r338446;
double r338451 = r338447 / r338450;
return r338451;
}
double f(double x, double y) {
double r338452 = 0.5;
double r338453 = y;
double r338454 = r338452 / r338453;
double r338455 = x;
double r338456 = r338452 / r338455;
double r338457 = r338454 + r338456;
return r338457;
}




Bits error versus x




Bits error versus y
Results
| Original | 15.2 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 15.2
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019325 +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)))