1.0 - \frac{\left(1.0 - x\right) \cdot y}{y + 1.0}\begin{array}{l}
\mathbf{if}\;y \le -30415092808503.895:\\
\;\;\;\;\left(x + \frac{1.0}{y}\right) - \frac{x}{y} \cdot 1.0\\
\mathbf{elif}\;y \le 490339666933239.4:\\
\;\;\;\;\left(1.0 - \left(y \cdot y\right) \cdot \frac{\left(1.0 - x\right) \cdot y}{\left(1.0 \cdot 1.0\right) \cdot 1.0 + \left(y \cdot y\right) \cdot y}\right) - \frac{\left(1.0 - x\right) \cdot y}{\left(1.0 \cdot 1.0\right) \cdot 1.0 + \left(y \cdot y\right) \cdot y} \cdot \left(1.0 \cdot 1.0 - 1.0 \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{1.0}{y}\right) - \frac{x}{y} \cdot 1.0\\
\end{array}double f(double x, double y) {
double r35254140 = 1.0;
double r35254141 = x;
double r35254142 = r35254140 - r35254141;
double r35254143 = y;
double r35254144 = r35254142 * r35254143;
double r35254145 = r35254143 + r35254140;
double r35254146 = r35254144 / r35254145;
double r35254147 = r35254140 - r35254146;
return r35254147;
}
double f(double x, double y) {
double r35254148 = y;
double r35254149 = -30415092808503.895;
bool r35254150 = r35254148 <= r35254149;
double r35254151 = x;
double r35254152 = 1.0;
double r35254153 = r35254152 / r35254148;
double r35254154 = r35254151 + r35254153;
double r35254155 = r35254151 / r35254148;
double r35254156 = r35254155 * r35254152;
double r35254157 = r35254154 - r35254156;
double r35254158 = 490339666933239.4;
bool r35254159 = r35254148 <= r35254158;
double r35254160 = r35254148 * r35254148;
double r35254161 = r35254152 - r35254151;
double r35254162 = r35254161 * r35254148;
double r35254163 = r35254152 * r35254152;
double r35254164 = r35254163 * r35254152;
double r35254165 = r35254160 * r35254148;
double r35254166 = r35254164 + r35254165;
double r35254167 = r35254162 / r35254166;
double r35254168 = r35254160 * r35254167;
double r35254169 = r35254152 - r35254168;
double r35254170 = r35254152 * r35254148;
double r35254171 = r35254163 - r35254170;
double r35254172 = r35254167 * r35254171;
double r35254173 = r35254169 - r35254172;
double r35254174 = r35254159 ? r35254173 : r35254157;
double r35254175 = r35254150 ? r35254157 : r35254174;
return r35254175;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.0 |
|---|---|
| Target | 0.2 |
| Herbie | 0.1 |
if y < -30415092808503.895 or 490339666933239.4 < y Initial program 45.3
rmApplied div-inv45.3
Taylor expanded around inf 0.0
Simplified0.0
if -30415092808503.895 < y < 490339666933239.4Initial program 0.5
rmApplied div-inv0.5
rmApplied flip3-+0.5
Applied associate-/r/0.5
Applied associate-*r*0.5
Simplified0.5
rmApplied distribute-rgt-in0.5
Applied associate--r+0.3
Final simplification0.1
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))))