1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -100475634.736784503 \lor \neg \left(y \le 892748271927.31689\right):\\
\;\;\;\;x + \left(\frac{1}{y} - 1 \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 - \frac{\left(1 - x\right) \cdot y}{{y}^{3} + {1}^{3}} \cdot \left(y \cdot y\right)\right) - \left(1 \cdot 1 - y \cdot 1\right) \cdot \frac{\left(1 - x\right) \cdot y}{{y}^{3} + {1}^{3}}\\
\end{array}double f(double x, double y) {
double r567734 = 1.0;
double r567735 = x;
double r567736 = r567734 - r567735;
double r567737 = y;
double r567738 = r567736 * r567737;
double r567739 = r567737 + r567734;
double r567740 = r567738 / r567739;
double r567741 = r567734 - r567740;
return r567741;
}
double f(double x, double y) {
double r567742 = y;
double r567743 = -100475634.7367845;
bool r567744 = r567742 <= r567743;
double r567745 = 892748271927.3169;
bool r567746 = r567742 <= r567745;
double r567747 = !r567746;
bool r567748 = r567744 || r567747;
double r567749 = x;
double r567750 = 1.0;
double r567751 = r567750 / r567742;
double r567752 = r567749 / r567742;
double r567753 = r567750 * r567752;
double r567754 = r567751 - r567753;
double r567755 = r567749 + r567754;
double r567756 = r567750 - r567749;
double r567757 = r567756 * r567742;
double r567758 = 3.0;
double r567759 = pow(r567742, r567758);
double r567760 = pow(r567750, r567758);
double r567761 = r567759 + r567760;
double r567762 = r567757 / r567761;
double r567763 = r567742 * r567742;
double r567764 = r567762 * r567763;
double r567765 = r567750 - r567764;
double r567766 = r567750 * r567750;
double r567767 = r567742 * r567750;
double r567768 = r567766 - r567767;
double r567769 = r567768 * r567762;
double r567770 = r567765 - r567769;
double r567771 = r567748 ? r567755 : r567770;
return r567771;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.5 |
|---|---|
| Target | 0.3 |
| Herbie | 0.2 |
if y < -100475634.7367845 or 892748271927.3169 < y Initial program 46.0
rmApplied flip3-+54.7
Applied associate-/r/54.7
rmApplied sum-cubes54.7
Applied associate-/r*51.1
Simplified46.8
Taylor expanded around inf 0.2
Simplified0.2
if -100475634.7367845 < y < 892748271927.3169Initial program 0.3
rmApplied flip3-+0.3
Applied associate-/r/0.3
rmApplied distribute-rgt-in0.3
Applied associate--r+0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019198
(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))))