1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -119383534.4574892520904541015625 \lor \neg \left(y \le 240320796.851219654083251953125\right):\\
\;\;\;\;1 \cdot \left(\frac{1}{y} - \frac{x}{y}\right) + x\\
\mathbf{else}:\\
\;\;\;\;1 - \left(\left(1 - x\right) \cdot \frac{y}{y \cdot y - 1 \cdot 1}\right) \cdot \left(y - 1\right)\\
\end{array}double f(double x, double y) {
double r717906 = 1.0;
double r717907 = x;
double r717908 = r717906 - r717907;
double r717909 = y;
double r717910 = r717908 * r717909;
double r717911 = r717909 + r717906;
double r717912 = r717910 / r717911;
double r717913 = r717906 - r717912;
return r717913;
}
double f(double x, double y) {
double r717914 = y;
double r717915 = -119383534.45748925;
bool r717916 = r717914 <= r717915;
double r717917 = 240320796.85121965;
bool r717918 = r717914 <= r717917;
double r717919 = !r717918;
bool r717920 = r717916 || r717919;
double r717921 = 1.0;
double r717922 = 1.0;
double r717923 = r717922 / r717914;
double r717924 = x;
double r717925 = r717924 / r717914;
double r717926 = r717923 - r717925;
double r717927 = r717921 * r717926;
double r717928 = r717927 + r717924;
double r717929 = r717921 - r717924;
double r717930 = r717914 * r717914;
double r717931 = r717921 * r717921;
double r717932 = r717930 - r717931;
double r717933 = r717914 / r717932;
double r717934 = r717929 * r717933;
double r717935 = r717914 - r717921;
double r717936 = r717934 * r717935;
double r717937 = r717921 - r717936;
double r717938 = r717920 ? r717928 : r717937;
return r717938;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.4 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -119383534.45748925 or 240320796.85121965 < y Initial program 46.1
Taylor expanded around inf 0.2
Simplified0.2
if -119383534.45748925 < y < 240320796.85121965Initial program 0.2
rmApplied *-un-lft-identity0.2
Applied times-frac0.2
Simplified0.2
rmApplied flip-+0.2
Applied associate-/r/0.2
Applied associate-*r*0.2
Final simplification0.2
herbie shell --seed 2019362
(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))))