\sqrt[3]{x + 1} - \sqrt[3]{x}\begin{array}{l}
\mathbf{if}\;x \leq -83186.8837971445:\\
\;\;\;\;\frac{\sqrt[3]{x}}{x} \cdot \left(0.3333333333333333 + \frac{-0.1111111111111111}{x}\right) + \left(\sqrt[3]{x} - \sqrt[3]{-x} \cdot \sqrt[3]{-1}\right)\\
\mathbf{elif}\;x \leq 85400.5263612331:\\
\;\;\;\;\log \left(e^{\sqrt[3]{x + 1} - \sqrt[3]{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt[3]{x} - \sqrt[3]{-x} \cdot \sqrt[3]{-1}\right) + \frac{\sqrt[3]{x}}{x} \cdot \left(0.3333333333333333 + \log \left(e^{\frac{-0.1111111111111111}{x}}\right)\right)\\
\end{array}(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
:precision binary64
(if (<= x -83186.8837971445)
(+
(* (/ (cbrt x) x) (+ 0.3333333333333333 (/ -0.1111111111111111 x)))
(- (cbrt x) (* (cbrt (- x)) (cbrt -1.0))))
(if (<= x 85400.5263612331)
(log (exp (- (cbrt (+ x 1.0)) (cbrt x))))
(+
(- (cbrt x) (* (cbrt (- x)) (cbrt -1.0)))
(*
(/ (cbrt x) x)
(+ 0.3333333333333333 (log (exp (/ -0.1111111111111111 x)))))))))double code(double x) {
return cbrt(x + 1.0) - cbrt(x);
}
double code(double x) {
double tmp;
if (x <= -83186.8837971445) {
tmp = ((cbrt(x) / x) * (0.3333333333333333 + (-0.1111111111111111 / x))) + (cbrt(x) - (cbrt(-x) * cbrt(-1.0)));
} else if (x <= 85400.5263612331) {
tmp = log(exp(cbrt(x + 1.0) - cbrt(x)));
} else {
tmp = (cbrt(x) - (cbrt(-x) * cbrt(-1.0))) + ((cbrt(x) / x) * (0.3333333333333333 + log(exp(-0.1111111111111111 / x))));
}
return tmp;
}



Bits error versus x
Results
if x < -83186.8837971445028Initial program 60.4
Taylor expanded around -inf 64.0
Simplified0.7
if -83186.8837971445028 < x < 85400.5263612331037Initial program 0.2
rmApplied add-log-exp_binary64_4580.2
Applied add-log-exp_binary64_4580.2
Applied diff-log_binary64_5110.2
Simplified0.2
if 85400.5263612331037 < x Initial program 60.3
Taylor expanded around -inf 64.0
Simplified0.7
rmApplied add-log-exp_binary64_4580.7
Final simplification0.4
herbie shell --seed 2020354
(FPCore (x)
:name "2cbrt (problem 3.3.4)"
:precision binary64
(- (cbrt (+ x 1.0)) (cbrt x)))