\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 r420395 = x;
double r420396 = y;
double r420397 = r420395 + r420396;
double r420398 = 2.0;
double r420399 = r420395 * r420398;
double r420400 = r420399 * r420396;
double r420401 = r420397 / r420400;
return r420401;
}
double f(double x, double y) {
double r420402 = 0.5;
double r420403 = y;
double r420404 = r420402 / r420403;
double r420405 = x;
double r420406 = r420402 / r420405;
double r420407 = r420404 + r420406;
return r420407;
}




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