\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))));
}




Bits error versus x0




Bits error versus x1
Results
| Original | 7.9 |
|---|---|
| Target | 0.2 |
| Herbie | 5.7 |
Initial program 7.9
rmApplied flip--7.3
rmApplied add-sqr-sqrt5.6
Applied associate-/r*5.6
rmApplied add-cube-cbrt5.7
Final simplification5.7
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))