Average Error: 7.9 → 4.7
Time: 3.5s
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{x0}{1 - x1} \cdot \frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} - x0 \cdot x0}\right)}{\sqrt[3]{{\left(\frac{x0}{1 - x1}\right)}^{3}} + x0}\]
\frac{x0}{1 - x1} - x0
\frac{\log \left(e^{\frac{x0}{1 - x1} \cdot \frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} - x0 \cdot x0}\right)}{\sqrt[3]{{\left(\frac{x0}{1 - x1}\right)}^{3}} + x0}
double f(double x0, double x1) {
        double r224056 = x0;
        double r224057 = 1.0;
        double r224058 = x1;
        double r224059 = r224057 - r224058;
        double r224060 = r224056 / r224059;
        double r224061 = r224060 - r224056;
        return r224061;
}

double f(double x0, double x1) {
        double r224062 = x0;
        double r224063 = 1.0;
        double r224064 = x1;
        double r224065 = r224063 - r224064;
        double r224066 = r224062 / r224065;
        double r224067 = sqrt(r224062);
        double r224068 = r224065 / r224067;
        double r224069 = r224067 / r224068;
        double r224070 = r224066 * r224069;
        double r224071 = r224062 * r224062;
        double r224072 = r224070 - r224071;
        double r224073 = exp(r224072);
        double r224074 = log(r224073);
        double r224075 = 3.0;
        double r224076 = pow(r224066, r224075);
        double r224077 = cbrt(r224076);
        double r224078 = r224077 + r224062;
        double r224079 = r224074 / r224078;
        return r224079;
}

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-log-exp7.3

    \[\leadsto \frac{\frac{x0}{1 - x1} \cdot \frac{x0}{1 - x1} - \color{blue}{\log \left(e^{x0 \cdot x0}\right)}}{\frac{x0}{1 - x1} + x0}\]
  6. Applied add-log-exp7.3

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

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

    \[\leadsto \frac{\log \color{blue}{\left(e^{\frac{x0}{1 - x1} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}}{\frac{x0}{1 - x1} + x0}\]
  9. Using strategy rm
  10. Applied add-sqr-sqrt6.7

    \[\leadsto \frac{\log \left(e^{\frac{x0}{1 - x1} \cdot \frac{\color{blue}{\sqrt{x0} \cdot \sqrt{x0}}}{1 - x1} - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}\]
  11. Applied associate-/l*4.7

    \[\leadsto \frac{\log \left(e^{\frac{x0}{1 - x1} \cdot \color{blue}{\frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}}} - 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{x0}{1 - x1} \cdot \frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} - 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{x0}{1 - x1} \cdot \frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} - 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{x0}{1 - x1} \cdot \frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} - 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{x0}{1 - x1} \cdot \frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} - 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{x0}{1 - x1} \cdot \frac{\sqrt{x0}}{\frac{1 - x1}{\sqrt{x0}}} - x0 \cdot x0}\right)}{\sqrt[3]{{\left(\frac{x0}{1 - x1}\right)}^{3}} + x0}\]

Reproduce

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