Average Error: 7.9 → 5.7
Time: 3.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\]
\[\frac{\frac{x0}{1 - x1} \cdot \frac{\frac{x0}{\sqrt{1 - x1}}}{\sqrt{1 - x1}} - x0 \cdot x0}{\left(\sqrt[3]{\frac{x0}{1 - x1} + x0} \cdot \sqrt[3]{\frac{x0}{1 - x1} + x0}\right) \cdot \sqrt[3]{\frac{x0}{1 - x1} + x0}}\]
\frac{x0}{1 - x1} - x0
\frac{\frac{x0}{1 - x1} \cdot \frac{\frac{x0}{\sqrt{1 - x1}}}{\sqrt{1 - x1}} - x0 \cdot x0}{\left(\sqrt[3]{\frac{x0}{1 - x1} + x0} \cdot \sqrt[3]{\frac{x0}{1 - x1} + x0}\right) \cdot \sqrt[3]{\frac{x0}{1 - x1} + x0}}
double code(double x0, double x1) {
	return ((x0 / (1.0 - x1)) - x0);
}
double code(double x0, double x1) {
	return ((((x0 / (1.0 - x1)) * ((x0 / sqrt((1.0 - x1))) / sqrt((1.0 - x1)))) - (x0 * x0)) / ((cbrt(((x0 / (1.0 - x1)) + x0)) * cbrt(((x0 / (1.0 - x1)) + x0))) * 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

Original7.9
Target0.2
Herbie5.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-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 associate-/r*5.6

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

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

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

Reproduce

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