\frac{x0}{1 - x1} - x0\begin{array}{l}
\mathbf{if}\;x1 \le 2.12089080810546861 \cdot 10^{-4}:\\
\;\;\;\;\frac{\log \left(e^{\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}\right)}{\frac{x0}{1 - x1} + x0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log \left(e^{\frac{x0}{1 - x1} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}\\
\end{array}double f(double x0, double x1) {
double r194571 = x0;
double r194572 = 1.0;
double r194573 = x1;
double r194574 = r194572 - r194573;
double r194575 = r194571 / r194574;
double r194576 = r194575 - r194571;
return r194576;
}
double f(double x0, double x1) {
double r194577 = x1;
double r194578 = 0.00021208908081054686;
bool r194579 = r194577 <= r194578;
double r194580 = x0;
double r194581 = 1.0;
double r194582 = r194581 - r194577;
double r194583 = r194580 / r194582;
double r194584 = cbrt(r194580);
double r194585 = r194584 * r194584;
double r194586 = sqrt(r194582);
double r194587 = r194585 / r194586;
double r194588 = r194584 / r194586;
double r194589 = r194587 * r194588;
double r194590 = r194583 * r194589;
double r194591 = r194580 * r194580;
double r194592 = r194590 - r194591;
double r194593 = exp(r194592);
double r194594 = log(r194593);
double r194595 = r194583 + r194580;
double r194596 = r194594 / r194595;
double r194597 = r194583 * r194583;
double r194598 = r194597 - r194591;
double r194599 = exp(r194598);
double r194600 = log(r194599);
double r194601 = r194600 / r194595;
double r194602 = r194579 ? r194596 : r194601;
return r194602;
}




Bits error versus x0




Bits error versus x1
Results
| Original | 7.9 |
|---|---|
| Target | 0.2 |
| Herbie | 4.7 |
if x1 < 0.00021208908081054686Initial program 11.2
rmApplied flip--11.4
rmApplied add-sqr-sqrt8.0
Applied add-cube-cbrt8.0
Applied times-frac8.0
rmApplied add-log-exp8.0
Applied add-log-exp8.0
Applied diff-log7.3
Simplified7.3
if 0.00021208908081054686 < x1 Initial program 4.5
rmApplied flip--3.1
rmApplied add-log-exp3.1
Applied add-log-exp3.1
Applied diff-log3.5
Simplified1.9
Final simplification4.7
herbie shell --seed 2020059
(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))