1.0 - \frac{\left(1.0 - x\right) \cdot y}{y + 1.0}\begin{array}{l}
\mathbf{if}\;y \le -3.477097239245187 \cdot 10^{+19}:\\
\;\;\;\;\left(x + \frac{1.0}{y}\right) - \frac{x}{y} \cdot 1.0\\
\mathbf{elif}\;y \le 140606760.23202688:\\
\;\;\;\;1.0 - \left(y - 1.0\right) \cdot \left(\frac{y}{y + 1.0} \cdot \frac{1.0 - x}{y - 1.0}\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 r36032364 = 1.0;
double r36032365 = x;
double r36032366 = r36032364 - r36032365;
double r36032367 = y;
double r36032368 = r36032366 * r36032367;
double r36032369 = r36032367 + r36032364;
double r36032370 = r36032368 / r36032369;
double r36032371 = r36032364 - r36032370;
return r36032371;
}
double f(double x, double y) {
double r36032372 = y;
double r36032373 = -3.477097239245187e+19;
bool r36032374 = r36032372 <= r36032373;
double r36032375 = x;
double r36032376 = 1.0;
double r36032377 = r36032376 / r36032372;
double r36032378 = r36032375 + r36032377;
double r36032379 = r36032375 / r36032372;
double r36032380 = r36032379 * r36032376;
double r36032381 = r36032378 - r36032380;
double r36032382 = 140606760.23202688;
bool r36032383 = r36032372 <= r36032382;
double r36032384 = r36032372 - r36032376;
double r36032385 = r36032372 + r36032376;
double r36032386 = r36032372 / r36032385;
double r36032387 = r36032376 - r36032375;
double r36032388 = r36032387 / r36032384;
double r36032389 = r36032386 * r36032388;
double r36032390 = r36032384 * r36032389;
double r36032391 = r36032376 - r36032390;
double r36032392 = r36032383 ? r36032391 : r36032381;
double r36032393 = r36032374 ? r36032381 : r36032392;
return r36032393;
}




Bits error versus x




Bits error versus y
Results
| Original | 21.1 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
if y < -3.477097239245187e+19 or 140606760.23202688 < y Initial program 44.8
rmApplied *-un-lft-identity44.8
Applied times-frac29.6
Simplified29.6
Taylor expanded around inf 0.1
Simplified0.1
if -3.477097239245187e+19 < y < 140606760.23202688Initial program 0.5
rmApplied *-un-lft-identity0.5
Applied times-frac0.5
Simplified0.5
rmApplied flip-+0.5
Applied associate-/r/0.5
Applied associate-*r*0.5
Simplified0.5
Final simplification0.3
herbie shell --seed 2019164
(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))))