Average Error: 8.4 → 6.3
Time: 2.3s
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\]
\[{e}^{\left(2 \cdot \left(1 \cdot \frac{\log \left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)}{1}\right)\right)} \cdot {e}^{\left(\log \left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)\right)}\]
\frac{x0}{1 - x1} - x0
{e}^{\left(2 \cdot \left(1 \cdot \frac{\log \left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)}{1}\right)\right)} \cdot {e}^{\left(\log \left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)\right)}
double code(double x0, double x1) {
	return ((x0 / (1.0 - x1)) - x0);
}
double code(double x0, double x1) {
	return (pow(((double) M_E), (2.0 * (1.0 * (log(cbrt(fma(((cbrt(x0) * cbrt(x0)) / 1.0), (cbrt(x0) / (1.0 - x1)), -x0))) / 1.0)))) * pow(((double) M_E), log(cbrt(fma(((cbrt(x0) * cbrt(x0)) / 1.0), (cbrt(x0) / (1.0 - x1)), -x0)))));
}

Error

Bits error versus x0

Bits error versus x1

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original8.4
Target0.5
Herbie6.3
\[\frac{x0 \cdot x1}{1 - x1}\]

Derivation

  1. Initial program 8.4

    \[\frac{x0}{1 - x1} - x0\]
  2. Using strategy rm
  3. Applied *-un-lft-identity8.4

    \[\leadsto \frac{x0}{\color{blue}{1 \cdot \left(1 - x1\right)}} - x0\]
  4. Applied add-cube-cbrt8.4

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x0} \cdot \sqrt[3]{x0}\right) \cdot \sqrt[3]{x0}}}{1 \cdot \left(1 - x1\right)} - x0\]
  5. Applied times-frac8.1

    \[\leadsto \color{blue}{\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1} \cdot \frac{\sqrt[3]{x0}}{1 - x1}} - x0\]
  6. Applied fma-neg6.3

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\]
  7. Using strategy rm
  8. Applied add-exp-log6.3

    \[\leadsto \color{blue}{e^{\log \left(\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)\right)}}\]
  9. Using strategy rm
  10. Applied pow16.3

    \[\leadsto e^{\log \color{blue}{\left({\left(\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)\right)}^{1}\right)}}\]
  11. Applied log-pow6.3

    \[\leadsto e^{\color{blue}{1 \cdot \log \left(\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)\right)}}\]
  12. Applied exp-prod6.3

    \[\leadsto \color{blue}{{\left(e^{1}\right)}^{\left(\log \left(\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)\right)\right)}}\]
  13. Simplified6.3

    \[\leadsto {\color{blue}{e}}^{\left(\log \left(\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)\right)\right)}\]
  14. Using strategy rm
  15. Applied add-cube-cbrt6.3

    \[\leadsto {e}^{\left(\log \color{blue}{\left(\left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)}\right)}\]
  16. Applied log-prod6.3

    \[\leadsto {e}^{\color{blue}{\left(\log \left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right) + \log \left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)\right)}}\]
  17. Applied unpow-prod-up6.3

    \[\leadsto \color{blue}{{e}^{\left(\log \left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)\right)} \cdot {e}^{\left(\log \left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)\right)}}\]
  18. Simplified6.3

    \[\leadsto \color{blue}{{e}^{\left(2 \cdot \left(1 \cdot \frac{\log \left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)}{1}\right)\right)}} \cdot {e}^{\left(\log \left(\sqrt[3]{\mathsf{fma}\left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{1}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)\right)}\]
  19. Final simplification6.3

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

Reproduce

herbie shell --seed 2020091 +o rules:numerics
(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))