1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -4201198044259844344621563904 \lor \neg \left(y \le 528433753610563.25\right):\\
\;\;\;\;\left(x + \frac{1}{y}\right) - 1 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(1 - \frac{\left(1 - x\right) \cdot {y}^{3}}{{y}^{3} + {1}^{3}}\right) - \left(\left(1 - x\right) \cdot \frac{y}{{y}^{3} + {1}^{3}}\right) \cdot \left(1 \cdot 1 - y \cdot 1\right)\\
\end{array}double f(double x, double y) {
double r561979 = 1.0;
double r561980 = x;
double r561981 = r561979 - r561980;
double r561982 = y;
double r561983 = r561981 * r561982;
double r561984 = r561982 + r561979;
double r561985 = r561983 / r561984;
double r561986 = r561979 - r561985;
return r561986;
}
double f(double x, double y) {
double r561987 = y;
double r561988 = -4.2011980442598443e+27;
bool r561989 = r561987 <= r561988;
double r561990 = 528433753610563.25;
bool r561991 = r561987 <= r561990;
double r561992 = !r561991;
bool r561993 = r561989 || r561992;
double r561994 = x;
double r561995 = 1.0;
double r561996 = r561995 / r561987;
double r561997 = r561994 + r561996;
double r561998 = r561994 / r561987;
double r561999 = r561995 * r561998;
double r562000 = r561997 - r561999;
double r562001 = r561995 - r561994;
double r562002 = 3.0;
double r562003 = pow(r561987, r562002);
double r562004 = r562001 * r562003;
double r562005 = pow(r561995, r562002);
double r562006 = r562003 + r562005;
double r562007 = r562004 / r562006;
double r562008 = r561995 - r562007;
double r562009 = r561987 / r562006;
double r562010 = r562001 * r562009;
double r562011 = r561995 * r561995;
double r562012 = r561987 * r561995;
double r562013 = r562011 - r562012;
double r562014 = r562010 * r562013;
double r562015 = r562008 - r562014;
double r562016 = r561993 ? r562000 : r562015;
return r562016;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -4.2011980442598443e+27 or 528433753610563.25 < y Initial program 46.8
rmApplied *-un-lft-identity46.8
Applied times-frac29.8
Simplified29.8
rmApplied flip3-+53.6
Applied associate-/r/53.6
Applied associate-*r*53.6
Taylor expanded around inf 0.0
Simplified0.0
if -4.2011980442598443e+27 < y < 528433753610563.25Initial program 1.1
rmApplied *-un-lft-identity1.1
Applied times-frac1.0
Simplified1.0
rmApplied flip3-+1.1
Applied associate-/r/1.1
Applied associate-*r*1.1
rmApplied distribute-lft-in1.1
Applied associate--r+0.5
Simplified0.4
Final simplification0.2
herbie shell --seed 2019303
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:herbie-target
(if (< y -3693.84827882972468) (- (/ 1 y) (- (/ x y) x)) (if (< y 6799310503.41891003) (- 1 (/ (* (- 1 x) y) (+ y 1))) (- (/ 1 y) (- (/ x y) x))))
(- 1 (/ (* (- 1 x) y) (+ y 1))))