\frac{x + y}{\left(x \cdot 2\right) \cdot y}\frac{0.5}{x} + \frac{0.5}{y}double f(double x, double y) {
double r359080 = x;
double r359081 = y;
double r359082 = r359080 + r359081;
double r359083 = 2.0;
double r359084 = r359080 * r359083;
double r359085 = r359084 * r359081;
double r359086 = r359082 / r359085;
return r359086;
}
double f(double x, double y) {
double r359087 = 0.5;
double r359088 = x;
double r359089 = r359087 / r359088;
double r359090 = y;
double r359091 = r359087 / r359090;
double r359092 = r359089 + r359091;
return r359092;
}




Bits error versus x




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