Average Error: 7.8 → 5.1
Time: 6.9s
Precision: 64
\[x0 = 1.855 \land x1 = 2.09000000000000012 \cdot 10^{-4} \lor x0 = 2.98499999999999988 \land x1 = 0.018599999999999998\]
\[\frac{x0}{1 - x1} - x0\]
\[\frac{\log \left(e^{\left(\left(\frac{\sqrt[3]{x0}}{\sqrt{1 - x1}} \cdot \frac{\sqrt[3]{x0}}{\sqrt{1 - x1}}\right) \cdot \sqrt[3]{x0}\right) \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}\]
\frac{x0}{1 - x1} - x0
\frac{\log \left(e^{\left(\left(\frac{\sqrt[3]{x0}}{\sqrt{1 - x1}} \cdot \frac{\sqrt[3]{x0}}{\sqrt{1 - x1}}\right) \cdot \sqrt[3]{x0}\right) \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}
double f(double x0, double x1) {
        double r277104 = x0;
        double r277105 = 1.0;
        double r277106 = x1;
        double r277107 = r277105 - r277106;
        double r277108 = r277104 / r277107;
        double r277109 = r277108 - r277104;
        return r277109;
}

double f(double x0, double x1) {
        double r277110 = x0;
        double r277111 = cbrt(r277110);
        double r277112 = 1.0;
        double r277113 = x1;
        double r277114 = r277112 - r277113;
        double r277115 = sqrt(r277114);
        double r277116 = r277111 / r277115;
        double r277117 = r277116 * r277116;
        double r277118 = r277117 * r277111;
        double r277119 = r277110 / r277114;
        double r277120 = r277118 * r277119;
        double r277121 = r277110 * r277110;
        double r277122 = r277120 - r277121;
        double r277123 = exp(r277122);
        double r277124 = log(r277123);
        double r277125 = r277119 + r277110;
        double r277126 = r277124 / r277125;
        return r277126;
}

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.8
Target0.3
Herbie5.1
\[\frac{x0 \cdot x1}{1 - x1}\]

Derivation

  1. Initial program 7.8

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

    \[\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-sqrt5.6

    \[\leadsto \frac{\frac{x0}{1 - x1} \cdot \frac{x0}{\color{blue}{\sqrt{1 - x1} \cdot \sqrt{1 - x1}}} - x0 \cdot x0}{\frac{x0}{1 - x1} + x0}\]
  6. Applied add-cube-cbrt5.6

    \[\leadsto \frac{\frac{x0}{1 - x1} \cdot \frac{\color{blue}{\left(\sqrt[3]{x0} \cdot \sqrt[3]{x0}\right) \cdot \sqrt[3]{x0}}}{\sqrt{1 - x1} \cdot \sqrt{1 - x1}} - x0 \cdot x0}{\frac{x0}{1 - x1} + x0}\]
  7. Applied times-frac6.6

    \[\leadsto \frac{\frac{x0}{1 - x1} \cdot \color{blue}{\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 - x1} + x0}\]
  8. Using strategy rm
  9. Applied add-log-exp6.6

    \[\leadsto \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) - \color{blue}{\log \left(e^{x0 \cdot x0}\right)}}{\frac{x0}{1 - x1} + x0}\]
  10. Applied add-log-exp6.6

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

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

    \[\leadsto \frac{\log \color{blue}{\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}\]
  13. Using strategy rm
  14. Applied *-un-lft-identity6.3

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

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

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

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

Reproduce

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