1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -6160286086042.84765625 \lor \neg \left(y \le 210063334.3818202316761016845703125\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 r453052 = 1.0;
double r453053 = x;
double r453054 = r453052 - r453053;
double r453055 = y;
double r453056 = r453054 * r453055;
double r453057 = r453055 + r453052;
double r453058 = r453056 / r453057;
double r453059 = r453052 - r453058;
return r453059;
}
double f(double x, double y) {
double r453060 = y;
double r453061 = -6160286086042.848;
bool r453062 = r453060 <= r453061;
double r453063 = 210063334.38182023;
bool r453064 = r453060 <= r453063;
double r453065 = !r453064;
bool r453066 = r453062 || r453065;
double r453067 = x;
double r453068 = 1.0;
double r453069 = r453068 / r453060;
double r453070 = r453067 + r453069;
double r453071 = r453067 / r453060;
double r453072 = r453068 * r453071;
double r453073 = r453070 - r453072;
double r453074 = r453068 - r453067;
double r453075 = r453060 + r453068;
double r453076 = r453060 / r453075;
double r453077 = r453074 * r453076;
double r453078 = r453068 - r453077;
double r453079 = r453066 ? r453073 : r453078;
return r453079;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.8 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -6160286086042.848 or 210063334.38182023 < y Initial program 46.7
rmApplied *-un-lft-identity46.7
Applied times-frac30.0
Simplified30.0
Taylor expanded around inf 0.1
Simplified0.1
if -6160286086042.848 < y < 210063334.38182023Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied times-frac0.3
Simplified0.3
Final simplification0.2
herbie shell --seed 2019323
(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))))