\frac{\left(x \cdot 2\right) \cdot y}{x - y}\frac{1}{\frac{0.5}{y} - \frac{0.5}{x}}double f(double x, double y) {
double r399200 = x;
double r399201 = 2.0;
double r399202 = r399200 * r399201;
double r399203 = y;
double r399204 = r399202 * r399203;
double r399205 = r399200 - r399203;
double r399206 = r399204 / r399205;
return r399206;
}
double f(double x, double y) {
double r399207 = 1.0;
double r399208 = 0.5;
double r399209 = y;
double r399210 = r399208 / r399209;
double r399211 = x;
double r399212 = r399208 / r399211;
double r399213 = r399210 - r399212;
double r399214 = r399207 / r399213;
return r399214;
}




Bits error versus x




Bits error versus y
Results
| Original | 15.2 |
|---|---|
| Target | 0.3 |
| Herbie | 0.2 |
Initial program 15.2
rmApplied clear-num15.3
Taylor expanded around 0 0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019209
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, B"
:precision binary64
:herbie-target
(if (< x -1.7210442634149447e81) (* (/ (* 2 x) (- x y)) y) (if (< x 83645045635564432) (/ (* x 2) (/ (- x y) y)) (* (/ (* 2 x) (- x y)) y)))
(/ (* (* x 2) y) (- x y)))