1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -118579514.584518134593963623046875 \lor \neg \left(y \le 512264646.354484260082244873046875\right):\\
\;\;\;\;\left(x + \frac{1}{y}\right) - 1 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;1 - \left(1 - x\right) \cdot \frac{y}{y + 1}\\
\end{array}double f(double x, double y) {
double r400642 = 1.0;
double r400643 = x;
double r400644 = r400642 - r400643;
double r400645 = y;
double r400646 = r400644 * r400645;
double r400647 = r400645 + r400642;
double r400648 = r400646 / r400647;
double r400649 = r400642 - r400648;
return r400649;
}
double f(double x, double y) {
double r400650 = y;
double r400651 = -118579514.58451813;
bool r400652 = r400650 <= r400651;
double r400653 = 512264646.35448426;
bool r400654 = r400650 <= r400653;
double r400655 = !r400654;
bool r400656 = r400652 || r400655;
double r400657 = x;
double r400658 = 1.0;
double r400659 = r400658 / r400650;
double r400660 = r400657 + r400659;
double r400661 = r400657 / r400650;
double r400662 = r400658 * r400661;
double r400663 = r400660 - r400662;
double r400664 = r400658 - r400657;
double r400665 = r400650 + r400658;
double r400666 = r400650 / r400665;
double r400667 = r400664 * r400666;
double r400668 = r400658 - r400667;
double r400669 = r400656 ? r400663 : r400668;
return r400669;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -118579514.58451813 or 512264646.35448426 < y Initial program 45.4
rmApplied *-un-lft-identity45.4
Applied times-frac29.0
Simplified29.0
Taylor expanded around inf 0.1
Simplified0.1
if -118579514.58451813 < y < 512264646.35448426Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied times-frac0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019322
(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))))