Average Error: 30.3 → 0.6
Time: 3.8s
Precision: binary64
\[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
\[\begin{array}{l} t_0 := \sqrt[3]{x + 1}\\ t_1 := \frac{\mathsf{fma}\left(\sqrt[3]{\frac{1}{{x}^{4}}}, -0.1111111111111111, 0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}}\right)}{t_0 + \sqrt[3]{x}}\\ \mathbf{if}\;x \leq -59070.69068753034:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 87181.48070041489:\\ \;\;\;\;\log \left(e^{t_0 - \sqrt[3]{x}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
t_0 := \sqrt[3]{x + 1}\\
t_1 := \frac{\mathsf{fma}\left(\sqrt[3]{\frac{1}{{x}^{4}}}, -0.1111111111111111, 0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}}\right)}{t_0 + \sqrt[3]{x}}\\
\mathbf{if}\;x \leq -59070.69068753034:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 87181.48070041489:\\
\;\;\;\;\log \left(e^{t_0 - \sqrt[3]{x}}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (cbrt (+ x 1.0)))
        (t_1
         (/
          (fma
           (cbrt (/ 1.0 (pow x 4.0)))
           -0.1111111111111111
           (* 0.6666666666666666 (cbrt (/ 1.0 x))))
          (+ t_0 (cbrt x)))))
   (if (<= x -59070.69068753034)
     t_1
     (if (<= x 87181.48070041489) (log (exp (- t_0 (cbrt x)))) t_1))))
double code(double x) {
	return cbrt(x + 1.0) - cbrt(x);
}
double code(double x) {
	double t_0 = cbrt(x + 1.0);
	double t_1 = fma(cbrt(1.0 / pow(x, 4.0)), -0.1111111111111111, (0.6666666666666666 * cbrt(1.0 / x))) / (t_0 + cbrt(x));
	double tmp;
	if (x <= -59070.69068753034) {
		tmp = t_1;
	} else if (x <= 87181.48070041489) {
		tmp = log(exp(t_0 - cbrt(x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if x < -59070.690687530339 or 87181.48070041489 < x

    1. Initial program 60.3

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Applied flip--_binary6460.3

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} - \sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}} \]
    3. Taylor expanded in x around inf 35.4

      \[\leadsto \frac{\color{blue}{0.6666666666666666 \cdot {\left(\frac{1}{x}\right)}^{0.3333333333333333} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{4}}\right)}^{0.3333333333333333}}}{\sqrt[3]{x + 1} + \sqrt[3]{x}} \]
    4. Simplified1.1

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt[3]{\frac{1}{{x}^{4}}}, -0.1111111111111111, 0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}}\right)}}{\sqrt[3]{x + 1} + \sqrt[3]{x}} \]

    if -59070.690687530339 < x < 87181.48070041489

    1. Initial program 0.2

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Applied add-log-exp_binary640.2

      \[\leadsto \color{blue}{\log \left(e^{\sqrt[3]{x + 1} - \sqrt[3]{x}}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -59070.69068753034:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt[3]{\frac{1}{{x}^{4}}}, -0.1111111111111111, 0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}}\right)}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \mathbf{elif}\;x \leq 87181.48070041489:\\ \;\;\;\;\log \left(e^{\sqrt[3]{x + 1} - \sqrt[3]{x}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt[3]{\frac{1}{{x}^{4}}}, -0.1111111111111111, 0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}}\right)}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \end{array} \]

Reproduce

herbie shell --seed 2022088 
(FPCore (x)
  :name "2cbrt (problem 3.3.4)"
  :precision binary64
  (- (cbrt (+ x 1.0)) (cbrt x)))