\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
t_0 := \sqrt[3]{x + 1}\\
\mathbf{if}\;t_0 - \sqrt[3]{x} \leq 7.126099148990761 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(0.06172839506172839, \sqrt[3]{\frac{1}{{x}^{8}}}, \mathsf{fma}\left(\sqrt[3]{\frac{1}{{x}^{5}}}, -0.1111111111111111, 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right) - \sqrt[3]{x}\\
\end{array}
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ x 1.0))))
(if (<= (- t_0 (cbrt x)) 7.126099148990761e-5)
(fma
0.06172839506172839
(cbrt (/ 1.0 (pow x 8.0)))
(fma
(cbrt (/ 1.0 (pow x 5.0)))
-0.1111111111111111
(* 0.3333333333333333 (cbrt (/ 1.0 (* x x))))))
(- (log1p (expm1 t_0)) (cbrt x)))))double code(double x) {
return cbrt((x + 1.0)) - cbrt(x);
}
double code(double x) {
double t_0 = cbrt((x + 1.0));
double tmp;
if ((t_0 - cbrt(x)) <= 7.126099148990761e-5) {
tmp = fma(0.06172839506172839, cbrt((1.0 / pow(x, 8.0))), fma(cbrt((1.0 / pow(x, 5.0))), -0.1111111111111111, (0.3333333333333333 * cbrt((1.0 / (x * x))))));
} else {
tmp = log1p(expm1(t_0)) - cbrt(x);
}
return tmp;
}



Bits error versus x
if (-.f64 (cbrt.f64 (+.f64 x 1)) (cbrt.f64 x)) < 7.126099149e-5Initial program 60.4
Taylor expanded in x around inf 39.0
Simplified31.0
if 7.126099149e-5 < (-.f64 (cbrt.f64 (+.f64 x 1)) (cbrt.f64 x)) Initial program 0.2
Applied egg-rr0.3
Final simplification15.3
herbie shell --seed 2022130
(FPCore (x)
:name "2cbrt (problem 3.3.4)"
:precision binary64
(- (cbrt (+ x 1.0)) (cbrt x)))