1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -179455656.4260170757770538330078125:\\
\;\;\;\;\left(x + \frac{1}{y}\right) - \frac{x}{y} \cdot 1\\
\mathbf{elif}\;y \le 186709514.105293214321136474609375:\\
\;\;\;\;1 - \frac{1}{y + 1} \cdot \left(\left(1 - x\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{1}{y}\right) - \frac{x}{y} \cdot 1\\
\end{array}double f(double x, double y) {
double r34118622 = 1.0;
double r34118623 = x;
double r34118624 = r34118622 - r34118623;
double r34118625 = y;
double r34118626 = r34118624 * r34118625;
double r34118627 = r34118625 + r34118622;
double r34118628 = r34118626 / r34118627;
double r34118629 = r34118622 - r34118628;
return r34118629;
}
double f(double x, double y) {
double r34118630 = y;
double r34118631 = -179455656.42601708;
bool r34118632 = r34118630 <= r34118631;
double r34118633 = x;
double r34118634 = 1.0;
double r34118635 = r34118634 / r34118630;
double r34118636 = r34118633 + r34118635;
double r34118637 = r34118633 / r34118630;
double r34118638 = r34118637 * r34118634;
double r34118639 = r34118636 - r34118638;
double r34118640 = 186709514.1052932;
bool r34118641 = r34118630 <= r34118640;
double r34118642 = 1.0;
double r34118643 = r34118630 + r34118634;
double r34118644 = r34118642 / r34118643;
double r34118645 = r34118634 - r34118633;
double r34118646 = r34118645 * r34118630;
double r34118647 = r34118644 * r34118646;
double r34118648 = r34118634 - r34118647;
double r34118649 = r34118641 ? r34118648 : r34118639;
double r34118650 = r34118632 ? r34118639 : r34118649;
return r34118650;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.7 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -179455656.42601708 or 186709514.1052932 < y Initial program 46.3
rmApplied associate-/l*29.5
rmApplied flip--45.8
Taylor expanded around inf 0.1
Simplified0.1
if -179455656.42601708 < y < 186709514.1052932Initial program 0.2
rmApplied associate-/l*0.3
rmApplied div-inv0.3
Applied *-un-lft-identity0.3
Applied times-frac0.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2019174
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:herbie-target
(if (< y -3693.8482788297247) (- (/ 1.0 y) (- (/ x y) x)) (if (< y 6799310503.41891) (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))) (- (/ 1.0 y) (- (/ x y) x))))
(- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))