Average Error: 7.9 → 4.7
Time: 3.2s
Precision: 64
\[x0 = 1.854999999999999982236431605997495353222 \land x1 = 2.090000000000000115064208161541614572343 \cdot 10^{-4} \lor x0 = 2.984999999999999875655021241982467472553 \land x1 = 0.01859999999999999847899445626353553961962\]
\[\frac{x0}{1 - x1} - x0\]
\[\frac{\log \left(e^{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\sqrt[3]{{\left(\frac{x0}{1 - x1}\right)}^{3}} + x0}\]
\frac{x0}{1 - x1} - x0
\frac{\log \left(e^{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\sqrt[3]{{\left(\frac{x0}{1 - x1}\right)}^{3}} + x0}
double f(double x0, double x1) {
        double r177662 = x0;
        double r177663 = 1.0;
        double r177664 = x1;
        double r177665 = r177663 - r177664;
        double r177666 = r177662 / r177665;
        double r177667 = r177666 - r177662;
        return r177667;
}

double f(double x0, double x1) {
        double r177668 = x0;
        double r177669 = sqrt(r177668);
        double r177670 = 1.0;
        double r177671 = x1;
        double r177672 = r177670 - r177671;
        double r177673 = r177672 / r177669;
        double r177674 = r177669 / r177673;
        double r177675 = r177668 / r177672;
        double r177676 = r177674 * r177675;
        double r177677 = r177668 * r177668;
        double r177678 = r177676 - r177677;
        double r177679 = exp(r177678);
        double r177680 = log(r177679);
        double r177681 = 3.0;
        double r177682 = pow(r177675, r177681);
        double r177683 = cbrt(r177682);
        double r177684 = r177683 + r177668;
        double r177685 = r177680 / r177684;
        return r177685;
}

Error

Bits error versus x0

Bits error versus x1

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original7.9
Target0.3
Herbie4.7
\[\frac{x0 \cdot x1}{1 - x1}\]

Derivation

  1. Initial program 7.9

    \[\frac{x0}{1 - x1} - x0\]
  2. Using strategy rm
  3. Applied flip--7.3

    \[\leadsto \color{blue}{\frac{\frac{x0}{1 - x1} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}{\frac{x0}{1 - x1} + x0}}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt7.3

    \[\leadsto \frac{\frac{\color{blue}{\sqrt{x0} \cdot \sqrt{x0}}}{1 - x1} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}{\frac{x0}{1 - x1} + x0}\]
  6. Applied associate-/l*5.7

    \[\leadsto \frac{\color{blue}{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}}} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}{\frac{x0}{1 - x1} + x0}\]
  7. Using strategy rm
  8. Applied add-log-exp5.7

    \[\leadsto \frac{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1} - \color{blue}{\log \left(e^{x0 \cdot x0}\right)}}{\frac{x0}{1 - x1} + x0}\]
  9. Applied add-log-exp5.7

    \[\leadsto \frac{\color{blue}{\log \left(e^{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1}}\right)} - \log \left(e^{x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}\]
  10. Applied diff-log5.5

    \[\leadsto \frac{\color{blue}{\log \left(\frac{e^{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1}}}{e^{x0 \cdot x0}}\right)}}{\frac{x0}{1 - x1} + x0}\]
  11. Simplified4.7

    \[\leadsto \frac{\log \color{blue}{\left(e^{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}}{\frac{x0}{1 - x1} + x0}\]
  12. Using strategy rm
  13. Applied add-cbrt-cube4.7

    \[\leadsto \frac{\log \left(e^{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\frac{x0}{\color{blue}{\sqrt[3]{\left(\left(1 - x1\right) \cdot \left(1 - x1\right)\right) \cdot \left(1 - x1\right)}}} + x0}\]
  14. Applied add-cbrt-cube4.7

    \[\leadsto \frac{\log \left(e^{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\frac{\color{blue}{\sqrt[3]{\left(x0 \cdot x0\right) \cdot x0}}}{\sqrt[3]{\left(\left(1 - x1\right) \cdot \left(1 - x1\right)\right) \cdot \left(1 - x1\right)}} + x0}\]
  15. Applied cbrt-undiv4.7

    \[\leadsto \frac{\log \left(e^{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\color{blue}{\sqrt[3]{\frac{\left(x0 \cdot x0\right) \cdot x0}{\left(\left(1 - x1\right) \cdot \left(1 - x1\right)\right) \cdot \left(1 - x1\right)}}} + x0}\]
  16. Simplified4.7

    \[\leadsto \frac{\log \left(e^{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\sqrt[3]{\color{blue}{{\left(\frac{x0}{1 - x1}\right)}^{3}}} + x0}\]
  17. Final simplification4.7

    \[\leadsto \frac{\log \left(e^{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\sqrt[3]{{\left(\frac{x0}{1 - x1}\right)}^{3}} + x0}\]

Reproduce

herbie shell --seed 2020002 
(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))