\frac{x0}{1 - x1} - x0\begin{array}{l}
\mathbf{if}\;1 - x1 \leq 0.9814:\\
\;\;\;\;\sqrt[3]{x0} \cdot \frac{\left(\sqrt{{\left(\frac{\sqrt[3]{x0}}{1 - x1}\right)}^{3} - {\left(\sqrt[3]{x0}\right)}^{3}} \cdot {x0}^{0.16666666666666666}\right) \cdot \left({x0}^{0.16666666666666666} \cdot \sqrt{\frac{\sqrt[3]{x0}}{1 - x1} \cdot \frac{\sqrt[3]{x0}}{1 - x1} - \sqrt[3]{x0} \cdot \sqrt[3]{x0}}\right)}{\sqrt{\frac{\sqrt[3]{x0}}{1 - x1} \cdot \frac{\sqrt[3]{x0}}{1 - x1} + \left(\sqrt[3]{x0} \cdot \sqrt[3]{x0} + \sqrt[3]{x0} \cdot \frac{\sqrt[3]{x0}}{1 - x1}\right)} \cdot \sqrt{\sqrt[3]{x0} + \frac{\sqrt[3]{x0}}{1 - x1}}}\\
\mathbf{else}:\\
\;\;\;\;x0 \cdot \left(x1 + \left({x1}^{4} + \left({x1}^{3} + {x1}^{2}\right)\right)\right)\\
\end{array}(FPCore (x0 x1) :precision binary64 (- (/ x0 (- 1.0 x1)) x0))
(FPCore (x0 x1)
:precision binary64
(if (<= (- 1.0 x1) 0.9814)
(*
(cbrt x0)
(/
(*
(*
(sqrt (- (pow (/ (cbrt x0) (- 1.0 x1)) 3.0) (pow (cbrt x0) 3.0)))
(pow x0 0.16666666666666666))
(*
(pow x0 0.16666666666666666)
(sqrt
(-
(* (/ (cbrt x0) (- 1.0 x1)) (/ (cbrt x0) (- 1.0 x1)))
(* (cbrt x0) (cbrt x0))))))
(*
(sqrt
(+
(* (/ (cbrt x0) (- 1.0 x1)) (/ (cbrt x0) (- 1.0 x1)))
(+ (* (cbrt x0) (cbrt x0)) (* (cbrt x0) (/ (cbrt x0) (- 1.0 x1))))))
(sqrt (+ (cbrt x0) (/ (cbrt x0) (- 1.0 x1)))))))
(* x0 (+ x1 (+ (pow x1 4.0) (+ (pow x1 3.0) (pow x1 2.0)))))))double code(double x0, double x1) {
return (x0 / (1.0 - x1)) - x0;
}
double code(double x0, double x1) {
double tmp;
if ((1.0 - x1) <= 0.9814) {
tmp = cbrt(x0) * (((sqrt(pow((cbrt(x0) / (1.0 - x1)), 3.0) - pow(cbrt(x0), 3.0)) * pow(x0, 0.16666666666666666)) * (pow(x0, 0.16666666666666666) * sqrt(((cbrt(x0) / (1.0 - x1)) * (cbrt(x0) / (1.0 - x1))) - (cbrt(x0) * cbrt(x0))))) / (sqrt(((cbrt(x0) / (1.0 - x1)) * (cbrt(x0) / (1.0 - x1))) + ((cbrt(x0) * cbrt(x0)) + (cbrt(x0) * (cbrt(x0) / (1.0 - x1))))) * sqrt(cbrt(x0) + (cbrt(x0) / (1.0 - x1)))));
} else {
tmp = x0 * (x1 + (pow(x1, 4.0) + (pow(x1, 3.0) + pow(x1, 2.0))));
}
return tmp;
}




Bits error versus x0




Bits error versus x1
Results
| Original | 8.3 |
|---|---|
| Target | 0.5 |
| Herbie | 2.7 |
if (-.f64 1 x1) < 0.98140000000000005Initial program 5.5
rmApplied *-un-lft-identity_binary645.5
Applied *-un-lft-identity_binary645.5
Applied distribute-lft-out--_binary645.5
Simplified4.4
rmApplied add-cube-cbrt_binary644.4
Applied associate-*r*_binary644.5
Simplified2.6
rmApplied add-sqr-sqrt_binary642.6
Applied add-sqr-sqrt_binary642.6
Applied cbrt-prod_binary642.6
Applied unswap-sqr_binary642.0
Simplified2.0
Simplified2.0
rmApplied flip--_binary642.3
Applied sqrt-div_binary642.3
Applied associate-*l/_binary642.3
Applied flip3--_binary641.6
Applied sqrt-div_binary641.6
Applied associate-*l/_binary641.6
Applied frac-times_binary641.6
if 0.98140000000000005 < (-.f64 1 x1) Initial program 11.3
rmApplied *-un-lft-identity_binary6411.3
Applied *-un-lft-identity_binary6411.3
Applied distribute-lft-out--_binary6411.3
Simplified10.5
Taylor expanded around 0 3.8
Final simplification2.7
herbie shell --seed 2021168
(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))