1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -104628043.80156818 \lor \neg \left(y \le 212488777.898407\right):\\
\;\;\;\;\left(x + 1 \cdot \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 r718565 = 1.0;
double r718566 = x;
double r718567 = r718565 - r718566;
double r718568 = y;
double r718569 = r718567 * r718568;
double r718570 = r718568 + r718565;
double r718571 = r718569 / r718570;
double r718572 = r718565 - r718571;
return r718572;
}
double f(double x, double y) {
double r718573 = y;
double r718574 = -104628043.80156818;
bool r718575 = r718573 <= r718574;
double r718576 = 212488777.89840698;
bool r718577 = r718573 <= r718576;
double r718578 = !r718577;
bool r718579 = r718575 || r718578;
double r718580 = x;
double r718581 = 1.0;
double r718582 = 1.0;
double r718583 = r718582 / r718573;
double r718584 = r718581 * r718583;
double r718585 = r718580 + r718584;
double r718586 = r718580 / r718573;
double r718587 = r718581 * r718586;
double r718588 = r718585 - r718587;
double r718589 = r718581 - r718580;
double r718590 = r718573 + r718581;
double r718591 = r718573 / r718590;
double r718592 = r718589 * r718591;
double r718593 = r718581 - r718592;
double r718594 = r718579 ? r718588 : r718593;
return r718594;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -104628043.80156818 or 212488777.89840698 < y Initial program 45.6
rmApplied *-un-lft-identity45.6
Applied times-frac29.1
Simplified29.1
rmApplied flip3--50.1
Simplified50.1
Taylor expanded around inf 0.1
if -104628043.80156818 < y < 212488777.89840698Initial program 0.2
rmApplied *-un-lft-identity0.2
Applied times-frac0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2020047
(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))))