1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -127752568.37720934 \lor \neg \left(y \le 152679725.13905564\right):\\
\;\;\;\;\left(x + \frac{1}{y}\right) - 1 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;1 - \left(1 - x\right) \cdot \frac{y}{y + 1}\\
\end{array}double f(double x, double y) {
double r705446 = 1.0;
double r705447 = x;
double r705448 = r705446 - r705447;
double r705449 = y;
double r705450 = r705448 * r705449;
double r705451 = r705449 + r705446;
double r705452 = r705450 / r705451;
double r705453 = r705446 - r705452;
return r705453;
}
double f(double x, double y) {
double r705454 = y;
double r705455 = -127752568.37720934;
bool r705456 = r705454 <= r705455;
double r705457 = 152679725.13905564;
bool r705458 = r705454 <= r705457;
double r705459 = !r705458;
bool r705460 = r705456 || r705459;
double r705461 = x;
double r705462 = 1.0;
double r705463 = r705462 / r705454;
double r705464 = r705461 + r705463;
double r705465 = r705461 / r705454;
double r705466 = r705462 * r705465;
double r705467 = r705464 - r705466;
double r705468 = r705462 - r705461;
double r705469 = r705454 + r705462;
double r705470 = r705454 / r705469;
double r705471 = r705468 * r705470;
double r705472 = r705462 - r705471;
double r705473 = r705460 ? r705467 : r705472;
return r705473;
}




Bits error versus x




Bits error versus y
Results
| Original | 21.9 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -127752568.37720934 or 152679725.13905564 < y Initial program 45.0
rmApplied *-un-lft-identity45.0
Applied times-frac29.0
Simplified29.0
Taylor expanded around inf 0.2
Simplified0.2
if -127752568.37720934 < y < 152679725.13905564Initial program 0.2
rmApplied *-un-lft-identity0.2
Applied times-frac0.1
Simplified0.1
Final simplification0.2
herbie shell --seed 2020046
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:herbie-target
(if (< y -3693.8482788297247) (- (/ 1 y) (- (/ x y) x)) (if (< y 6799310503.41891) (- 1 (/ (* (- 1 x) y) (+ y 1))) (- (/ 1 y) (- (/ x y) x))))
(- 1 (/ (* (- 1 x) y) (+ y 1))))