Average Error: 7.9 → 4.6
Time: 3.8s
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\]
\[\begin{array}{l} \mathbf{if}\;1 - x1 \le 0.98140000000000005:\\ \;\;\;\;\frac{\log \left(e^{\frac{x0}{1 - x1} \cdot \left(\frac{{\left(\sqrt[3]{x0}\right)}^{3}}{\sqrt{{1}^{3} - {x1}^{3}} \cdot \sqrt{1 - x1}} \cdot \sqrt{1 \cdot 1 + \left(x1 \cdot x1 + 1 \cdot x1\right)}\right) - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}\\ \mathbf{else}:\\ \;\;\;\;\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{{\left(\frac{x0}{1 - x1}\right)}^{3} + {x0}^{3}}{x0 \cdot \left(x0 - \frac{x0}{1 - x1}\right) + \frac{x0}{1 - x1} \cdot \frac{x0}{1 - x1}}}\\ \end{array}\]
\frac{x0}{1 - x1} - x0
\begin{array}{l}
\mathbf{if}\;1 - x1 \le 0.98140000000000005:\\
\;\;\;\;\frac{\log \left(e^{\frac{x0}{1 - x1} \cdot \left(\frac{{\left(\sqrt[3]{x0}\right)}^{3}}{\sqrt{{1}^{3} - {x1}^{3}} \cdot \sqrt{1 - x1}} \cdot \sqrt{1 \cdot 1 + \left(x1 \cdot x1 + 1 \cdot x1\right)}\right) - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}\\

\mathbf{else}:\\
\;\;\;\;\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{{\left(\frac{x0}{1 - x1}\right)}^{3} + {x0}^{3}}{x0 \cdot \left(x0 - \frac{x0}{1 - x1}\right) + \frac{x0}{1 - x1} \cdot \frac{x0}{1 - x1}}}\\

\end{array}
double code(double x0, double x1) {
	return ((x0 / (1.0 - x1)) - x0);
}
double code(double x0, double x1) {
	double temp;
	if (((1.0 - x1) <= 0.9814)) {
		temp = (log(exp((((x0 / (1.0 - x1)) * ((pow(cbrt(x0), 3.0) / (sqrt((pow(1.0, 3.0) - pow(x1, 3.0))) * sqrt((1.0 - x1)))) * sqrt(((1.0 * 1.0) + ((x1 * x1) + (1.0 * x1)))))) - (x0 * x0)))) / ((x0 / (1.0 - x1)) + x0));
	} else {
		temp = (log(exp((((x0 / (1.0 - x1)) * (((cbrt(x0) * cbrt(x0)) / sqrt((1.0 - x1))) * (cbrt(x0) / sqrt((1.0 - x1))))) - (x0 * x0)))) / ((pow((x0 / (1.0 - x1)), 3.0) + pow(x0, 3.0)) / ((x0 * (x0 - (x0 / (1.0 - x1)))) + ((x0 / (1.0 - x1)) * (x0 / (1.0 - x1))))));
	}
	return temp;
}

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.2
Herbie4.6
\[\frac{x0 \cdot x1}{1 - x1}\]

Derivation

  1. Split input into 2 regimes
  2. if (- 1.0 x1) < 0.9814

    1. Initial program 4.5

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

      \[\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-sqrt3.1

      \[\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-cbrt3.1

      \[\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-frac5.1

      \[\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-exp5.1

      \[\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-exp5.1

      \[\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-log5.2

      \[\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. Simplified5.2

      \[\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 flip3--5.2

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

      \[\leadsto \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}}{\color{blue}{\frac{\sqrt{{1}^{3} - {x1}^{3}}}{\sqrt{1 \cdot 1 + \left(x1 \cdot x1 + 1 \cdot x1\right)}}}}\right) - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}\]
    16. Applied associate-/r/4.3

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

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

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

    if 0.9814 < (- 1.0 x1)

    1. Initial program 11.2

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

      \[\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-sqrt8.1

      \[\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-cbrt8.1

      \[\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-frac8.1

      \[\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-exp8.1

      \[\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-exp8.1

      \[\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-log7.4

      \[\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. Simplified7.4

      \[\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 flip3-+7.4

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

      \[\leadsto \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{{\left(\frac{x0}{1 - x1}\right)}^{3} + {x0}^{3}}{\color{blue}{x0 \cdot \left(x0 - \frac{x0}{1 - x1}\right) + \frac{x0}{1 - x1} \cdot \frac{x0}{1 - x1}}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification4.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;1 - x1 \le 0.98140000000000005:\\ \;\;\;\;\frac{\log \left(e^{\frac{x0}{1 - x1} \cdot \left(\frac{{\left(\sqrt[3]{x0}\right)}^{3}}{\sqrt{{1}^{3} - {x1}^{3}} \cdot \sqrt{1 - x1}} \cdot \sqrt{1 \cdot 1 + \left(x1 \cdot x1 + 1 \cdot x1\right)}\right) - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}\\ \mathbf{else}:\\ \;\;\;\;\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{{\left(\frac{x0}{1 - x1}\right)}^{3} + {x0}^{3}}{x0 \cdot \left(x0 - \frac{x0}{1 - x1}\right) + \frac{x0}{1 - x1} \cdot \frac{x0}{1 - x1}}}\\ \end{array}\]

Reproduce

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