\frac{x0}{1 - x1} - x0
\begin{array}{l}
t_0 := \sqrt[3]{x0} \cdot \sqrt[3]{x0}\\
t_1 := \sqrt[3]{x0} \cdot t_0\\
{e}^{\log \left(\mathsf{fma}\left(x0, \frac{1}{1 - x1}, -t_1\right)\right)} + \mathsf{fma}\left(-\sqrt[3]{x0}, t_0, t_1\right)
\end{array}
(FPCore (x0 x1) :precision binary64 (- (/ x0 (- 1.0 x1)) x0))
(FPCore (x0 x1)
:precision binary64
(let* ((t_0 (* (cbrt x0) (cbrt x0))) (t_1 (* (cbrt x0) t_0)))
(+
(pow E (log (fma x0 (/ 1.0 (- 1.0 x1)) (- t_1))))
(fma (- (cbrt x0)) t_0 t_1))))double code(double x0, double x1) {
return (x0 / (1.0 - x1)) - x0;
}
double code(double x0, double x1) {
double t_0 = cbrt(x0) * cbrt(x0);
double t_1 = cbrt(x0) * t_0;
return pow(((double) M_E), log(fma(x0, (1.0 / (1.0 - x1)), -t_1))) + fma(-cbrt(x0), t_0, t_1);
}




Bits error versus x0




Bits error versus x1
| Original | 8.4 |
|---|---|
| Target | 0.5 |
| Herbie | 2.7 |
Initial program 8.4
Applied add-cube-cbrt_binary648.4
Applied div-inv_binary648.1
Applied prod-diff_binary643.8
Applied add-exp-log_binary643.5
Applied pow1_binary643.5
Applied log-pow_binary643.5
Applied exp-prod_binary642.7
Simplified2.7
Final simplification2.7
herbie shell --seed 2021225
(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.0 x1))
(- (/ x0 (- 1.0 x1)) x0))