1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -131869364.42794824 \lor \neg \left(y \le 45126711.214655101\right):\\
\;\;\;\;1 \cdot \left(1 \cdot \left(\frac{1}{y} - \frac{x}{y}\right) + x\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\right)\\
\end{array}double f(double x, double y) {
double r729515 = 1.0;
double r729516 = x;
double r729517 = r729515 - r729516;
double r729518 = y;
double r729519 = r729517 * r729518;
double r729520 = r729518 + r729515;
double r729521 = r729519 / r729520;
double r729522 = r729515 - r729521;
return r729522;
}
double f(double x, double y) {
double r729523 = y;
double r729524 = -131869364.42794824;
bool r729525 = r729523 <= r729524;
double r729526 = 45126711.2146551;
bool r729527 = r729523 <= r729526;
double r729528 = !r729527;
bool r729529 = r729525 || r729528;
double r729530 = 1.0;
double r729531 = 1.0;
double r729532 = r729530 / r729523;
double r729533 = x;
double r729534 = r729533 / r729523;
double r729535 = r729532 - r729534;
double r729536 = r729531 * r729535;
double r729537 = r729536 + r729533;
double r729538 = r729530 * r729537;
double r729539 = r729531 - r729533;
double r729540 = r729539 * r729523;
double r729541 = r729523 + r729531;
double r729542 = r729540 / r729541;
double r729543 = r729531 - r729542;
double r729544 = r729530 * r729543;
double r729545 = r729529 ? r729538 : r729544;
return r729545;
}




Bits error versus x




Bits error versus y
Results
| Original | 21.9 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -131869364.42794824 or 45126711.2146551 < y Initial program 45.2
rmApplied flip--48.9
rmApplied flip-+50.2
Applied associate-/r/50.2
Simplified45.2
Taylor expanded around inf 0.2
Simplified0.2
if -131869364.42794824 < y < 45126711.2146551Initial program 0.1
rmApplied flip--4.3
rmApplied flip-+4.3
Applied associate-/r/4.3
Simplified0.1
Final simplification0.2
herbie shell --seed 2020062
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:herbie-target
(if (< y -3693.8482788297247) (- (/ 1 y) (- (/ x y) x)) (if (< y 6799310503.41891) (- 1 (/ (* (- 1 x) y) (+ y 1))) (- (/ 1 y) (- (/ x y) x))))
(- 1 (/ (* (- 1 x) y) (+ y 1))))