\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 r324072 = x;
double r324073 = y;
double r324074 = r324072 + r324073;
double r324075 = 2.0;
double r324076 = r324072 * r324075;
double r324077 = r324076 * r324073;
double r324078 = r324074 / r324077;
return r324078;
}
double f(double x, double y) {
double r324079 = 0.5;
double r324080 = y;
double r324081 = r324079 / r324080;
double r324082 = x;
double r324083 = r324079 / r324082;
double r324084 = r324081 + r324083;
return r324084;
}




Bits error versus x




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