1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -12832313739411.76171875:\\
\;\;\;\;x + \left(\frac{1}{y} - \frac{x}{y} \cdot 1\right)\\
\mathbf{elif}\;y \le 1637963662191947:\\
\;\;\;\;\left(1 - \left(y \cdot y\right) \cdot \frac{y \cdot \frac{1 - x}{\left(y \cdot y - 1 \cdot y\right) + 1 \cdot 1}}{y + 1}\right) - \left(y \cdot \frac{\frac{1 - x}{\left(y \cdot y - 1 \cdot y\right) + 1 \cdot 1}}{y + 1}\right) \cdot \left(1 \cdot 1 - 1 \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{1}{y} - \frac{x}{y} \cdot 1\right)\\
\end{array}double f(double x, double y) {
double r34082721 = 1.0;
double r34082722 = x;
double r34082723 = r34082721 - r34082722;
double r34082724 = y;
double r34082725 = r34082723 * r34082724;
double r34082726 = r34082724 + r34082721;
double r34082727 = r34082725 / r34082726;
double r34082728 = r34082721 - r34082727;
return r34082728;
}
double f(double x, double y) {
double r34082729 = y;
double r34082730 = -12832313739411.762;
bool r34082731 = r34082729 <= r34082730;
double r34082732 = x;
double r34082733 = 1.0;
double r34082734 = r34082733 / r34082729;
double r34082735 = r34082732 / r34082729;
double r34082736 = r34082735 * r34082733;
double r34082737 = r34082734 - r34082736;
double r34082738 = r34082732 + r34082737;
double r34082739 = 1637963662191947.0;
bool r34082740 = r34082729 <= r34082739;
double r34082741 = r34082729 * r34082729;
double r34082742 = r34082733 - r34082732;
double r34082743 = r34082733 * r34082729;
double r34082744 = r34082741 - r34082743;
double r34082745 = r34082733 * r34082733;
double r34082746 = r34082744 + r34082745;
double r34082747 = r34082742 / r34082746;
double r34082748 = r34082729 * r34082747;
double r34082749 = r34082729 + r34082733;
double r34082750 = r34082748 / r34082749;
double r34082751 = r34082741 * r34082750;
double r34082752 = r34082733 - r34082751;
double r34082753 = r34082747 / r34082749;
double r34082754 = r34082729 * r34082753;
double r34082755 = r34082745 - r34082743;
double r34082756 = r34082754 * r34082755;
double r34082757 = r34082752 - r34082756;
double r34082758 = r34082740 ? r34082757 : r34082738;
double r34082759 = r34082731 ? r34082738 : r34082758;
return r34082759;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.6 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -12832313739411.762 or 1637963662191947.0 < y Initial program 46.3
rmApplied flip3-+55.1
Applied associate-/r/55.1
Simplified53.3
Taylor expanded around inf 0.0
Simplified0.0
if -12832313739411.762 < y < 1637963662191947.0Initial program 0.5
rmApplied flip3-+0.5
Applied associate-/r/0.5
Simplified0.5
rmApplied cube-unmult0.5
Applied cube-unmult0.5
Applied sum-cubes0.5
Applied associate-/r*0.5
rmApplied distribute-rgt-in0.5
Applied associate--r+0.3
rmApplied associate-*l/0.3
Final simplification0.2
herbie shell --seed 2019168
(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))))