1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -4201198044259844344621563904 \lor \neg \left(y \le \frac{2113735014442253}{4}\right):\\
\;\;\;\;1 \cdot \left(\frac{1}{y} - \frac{x}{y}\right) + x\\
\mathbf{else}:\\
\;\;\;\;\left(1 - {\left(\frac{{y}^{3} \cdot \left(1 - x\right)}{{y}^{3} + {1}^{3}}\right)}^{1}\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 r458313 = 1.0;
double r458314 = x;
double r458315 = r458313 - r458314;
double r458316 = y;
double r458317 = r458315 * r458316;
double r458318 = r458316 + r458313;
double r458319 = r458317 / r458318;
double r458320 = r458313 - r458319;
return r458320;
}
double f(double x, double y) {
double r458321 = y;
double r458322 = -4.2011980442598443e+27;
bool r458323 = r458321 <= r458322;
double r458324 = 2113735014442253.0;
double r458325 = 4.0;
double r458326 = r458324 / r458325;
bool r458327 = r458321 <= r458326;
double r458328 = !r458327;
bool r458329 = r458323 || r458328;
double r458330 = 1.0;
double r458331 = 1.0;
double r458332 = r458331 / r458321;
double r458333 = x;
double r458334 = r458333 / r458321;
double r458335 = r458332 - r458334;
double r458336 = r458330 * r458335;
double r458337 = r458336 + r458333;
double r458338 = 3.0;
double r458339 = pow(r458321, r458338);
double r458340 = r458330 - r458333;
double r458341 = r458339 * r458340;
double r458342 = pow(r458330, r458338);
double r458343 = r458339 + r458342;
double r458344 = r458341 / r458343;
double r458345 = pow(r458344, r458331);
double r458346 = r458330 - r458345;
double r458347 = r458321 / r458343;
double r458348 = r458340 * r458347;
double r458349 = r458330 * r458330;
double r458350 = r458321 * r458330;
double r458351 = r458349 - r458350;
double r458352 = r458348 * r458351;
double r458353 = r458346 - r458352;
double r458354 = r458329 ? r458337 : r458353;
return r458354;
}




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
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.5
rmApplied pow10.5
Applied pow10.5
Applied pow-prod-down0.5
Applied pow10.5
Applied pow10.5
Applied pow-prod-down0.5
Applied pow-prod-down0.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))))