1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -92380677.54763953387737274169921875 \lor \neg \left(y \le 97640792.591452300548553466796875\right):\\
\;\;\;\;x + \left(\frac{1}{y} - \frac{1}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{1 \cdot 1 - y \cdot y} \cdot \left(\left(1 - y\right) \cdot \left(1 - x\right)\right)\\
\end{array}double f(double x, double y) {
double r473296 = 1.0;
double r473297 = x;
double r473298 = r473296 - r473297;
double r473299 = y;
double r473300 = r473298 * r473299;
double r473301 = r473299 + r473296;
double r473302 = r473300 / r473301;
double r473303 = r473296 - r473302;
return r473303;
}
double f(double x, double y) {
double r473304 = y;
double r473305 = -92380677.54763953;
bool r473306 = r473304 <= r473305;
double r473307 = 97640792.5914523;
bool r473308 = r473304 <= r473307;
double r473309 = !r473308;
bool r473310 = r473306 || r473309;
double r473311 = x;
double r473312 = 1.0;
double r473313 = r473312 / r473304;
double r473314 = r473304 / r473311;
double r473315 = r473312 / r473314;
double r473316 = r473313 - r473315;
double r473317 = r473311 + r473316;
double r473318 = r473312 * r473312;
double r473319 = r473304 * r473304;
double r473320 = r473318 - r473319;
double r473321 = r473304 / r473320;
double r473322 = r473312 - r473304;
double r473323 = r473312 - r473311;
double r473324 = r473322 * r473323;
double r473325 = r473321 * r473324;
double r473326 = r473312 - r473325;
double r473327 = r473310 ? r473317 : r473326;
return r473327;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -92380677.54763953 or 97640792.5914523 < y Initial program 45.9
Simplified29.3
Taylor expanded around inf 0.2
Simplified0.2
if -92380677.54763953 < y < 97640792.5914523Initial program 0.1
Simplified0.1
rmApplied *-un-lft-identity0.1
Applied associate-*l*0.1
Simplified0.1
rmApplied flip-+0.1
Applied associate-/r/0.1
Applied associate-*l*0.1
Simplified0.1
Final simplification0.2
herbie shell --seed 2019196
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:herbie-target
(if (< y -3693.8482788297247) (- (/ 1.0 y) (- (/ x y) x)) (if (< y 6799310503.41891) (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))) (- (/ 1.0 y) (- (/ x y) x))))
(- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))