\frac{x0}{1 - x1} - x0\begin{array}{l}
\mathbf{if}\;x1 \le 0.0182045976562499982:\\
\;\;\;\;\frac{\frac{x0}{1 - x1} \cdot \left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{\sqrt{1 - x1}} \cdot \frac{\sqrt[3]{x0}}{\sqrt{1 - x1}}\right) - x0 \cdot x0}{\frac{x0}{1 \cdot 1 - x1 \cdot x1} \cdot \left(1 + x1\right) + x0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log \left(e^{\frac{x0 \cdot \frac{{\left(\sqrt[3]{x0}\right)}^{3}}{1 - x1}}{1 - x1} - x0 \cdot x0}\right)}{\frac{x0}{1 \cdot 1 - x1 \cdot x1} \cdot \left(1 + x1\right) + x0}\\
\end{array}double f(double x0, double x1) {
double r223388 = x0;
double r223389 = 1.0;
double r223390 = x1;
double r223391 = r223389 - r223390;
double r223392 = r223388 / r223391;
double r223393 = r223392 - r223388;
return r223393;
}
double f(double x0, double x1) {
double r223394 = x1;
double r223395 = 0.018204597656249998;
bool r223396 = r223394 <= r223395;
double r223397 = x0;
double r223398 = 1.0;
double r223399 = r223398 - r223394;
double r223400 = r223397 / r223399;
double r223401 = cbrt(r223397);
double r223402 = r223401 * r223401;
double r223403 = sqrt(r223399);
double r223404 = r223402 / r223403;
double r223405 = r223401 / r223403;
double r223406 = r223404 * r223405;
double r223407 = r223400 * r223406;
double r223408 = r223397 * r223397;
double r223409 = r223407 - r223408;
double r223410 = r223398 * r223398;
double r223411 = r223394 * r223394;
double r223412 = r223410 - r223411;
double r223413 = r223397 / r223412;
double r223414 = r223398 + r223394;
double r223415 = r223413 * r223414;
double r223416 = r223415 + r223397;
double r223417 = r223409 / r223416;
double r223418 = 3.0;
double r223419 = pow(r223401, r223418);
double r223420 = r223419 / r223399;
double r223421 = r223397 * r223420;
double r223422 = r223421 / r223399;
double r223423 = r223422 - r223408;
double r223424 = exp(r223423);
double r223425 = log(r223424);
double r223426 = r223425 / r223416;
double r223427 = r223396 ? r223417 : r223426;
return r223427;
}




Bits error versus x0




Bits error versus x1
Results
| Original | 7.9 |
|---|---|
| Target | 0.3 |
| Herbie | 5.0 |
if x1 < 0.018204597656249998Initial program 11.2
rmApplied flip--11.4
rmApplied add-sqr-sqrt8.1
Applied add-cube-cbrt8.1
Applied times-frac8.1
rmApplied flip--8.0
Applied associate-/r/8.0
if 0.018204597656249998 < x1 Initial program 4.5
rmApplied flip--3.2
rmApplied add-sqr-sqrt3.2
Applied add-cube-cbrt3.2
Applied times-frac5.2
rmApplied flip--5.2
Applied associate-/r/5.2
rmApplied add-log-exp5.2
Applied add-log-exp5.2
Applied diff-log5.2
Simplified2.0
Final simplification5.0
herbie shell --seed 2020047
(FPCore (x0 x1)
:name "(- (/ x0 (- 1 x1)) x0)"
:precision binary64
:pre (or (and (== x0 1.855) (== x1 0.000209)) (and (== x0 2.985) (== x1 0.0186)))
:herbie-target
(/ (* x0 x1) (- 1 x1))
(- (/ x0 (- 1 x1)) x0))