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 r800121 = 1.0;
double r800122 = x;
double r800123 = r800121 - r800122;
double r800124 = y;
double r800125 = r800123 * r800124;
double r800126 = r800124 + r800121;
double r800127 = r800125 / r800126;
double r800128 = r800121 - r800127;
return r800128;
}
double f(double x, double y) {
double r800129 = y;
double r800130 = -127752568.37720934;
bool r800131 = r800129 <= r800130;
double r800132 = 152679725.13905564;
bool r800133 = r800129 <= r800132;
double r800134 = !r800133;
bool r800135 = r800131 || r800134;
double r800136 = x;
double r800137 = 1.0;
double r800138 = r800137 / r800129;
double r800139 = r800136 + r800138;
double r800140 = r800136 / r800129;
double r800141 = r800137 * r800140;
double r800142 = r800139 - r800141;
double r800143 = r800137 - r800136;
double r800144 = r800129 + r800137;
double r800145 = r800129 / r800144;
double r800146 = r800143 * r800145;
double r800147 = r800137 - r800146;
double r800148 = r800135 ? r800142 : r800147;
return r800148;
}




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))))