Average Error: 29.9 → 0.5
Time: 4.4s
Precision: binary64
\[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
\[\begin{array}{l} \mathbf{if}\;x \leq -1.0054654754205168 \lor \neg \left(x \leq 66997.7420196915\right):\\ \;\;\;\;\frac{\sqrt[3]{x}}{x} \cdot \left(0.3333333333333333 - \frac{0.1111111111111111}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{{\left(x + 1\right)}^{0.6666666666666666}}, \sqrt[3]{\sqrt[3]{x + 1}}, -\sqrt[3]{x}\right)\\ \end{array} \]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
\mathbf{if}\;x \leq -1.0054654754205168 \lor \neg \left(x \leq 66997.7420196915\right):\\
\;\;\;\;\frac{\sqrt[3]{x}}{x} \cdot \left(0.3333333333333333 - \frac{0.1111111111111111}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{{\left(x + 1\right)}^{0.6666666666666666}}, \sqrt[3]{\sqrt[3]{x + 1}}, -\sqrt[3]{x}\right)\\


\end{array}
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
 :precision binary64
 (if (or (<= x -1.0054654754205168) (not (<= x 66997.7420196915)))
   (* (/ (cbrt x) x) (- 0.3333333333333333 (/ 0.1111111111111111 x)))
   (fma
    (cbrt (pow (+ x 1.0) 0.6666666666666666))
    (cbrt (cbrt (+ x 1.0)))
    (- (cbrt x)))))
double code(double x) {
	return cbrt(x + 1.0) - cbrt(x);
}
double code(double x) {
	double tmp;
	if ((x <= -1.0054654754205168) || !(x <= 66997.7420196915)) {
		tmp = (cbrt(x) / x) * (0.3333333333333333 - (0.1111111111111111 / x));
	} else {
		tmp = fma(cbrt(pow((x + 1.0), 0.6666666666666666)), cbrt(cbrt(x + 1.0)), -cbrt(x));
	}
	return tmp;
}

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if x < -1.0054654754205168 or 66997.7420196915 < x

    1. Initial program 60.0

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Applied add-cube-cbrt_binary6460.1

      \[\leadsto \sqrt[3]{x + 1} - \sqrt[3]{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}} \]
    3. Applied cbrt-prod_binary6460.2

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

      \[\leadsto \color{blue}{\left(0.3333333333333333 \cdot \frac{e^{0.3333333333333333 \cdot \left(\log -1 - \log \left(\frac{-1}{x}\right)\right)}}{x} + e^{0.3333333333333333 \cdot \left(\log -1 - \log \left(\frac{-1}{x}\right)\right)}\right) - \left(0.1111111111111111 \cdot \frac{e^{0.3333333333333333 \cdot \left(\log -1 - \log \left(\frac{-1}{x}\right)\right)}}{{x}^{2}} + {\left(-1 \cdot x\right)}^{0.3333333333333333} \cdot \sqrt[3]{-1}\right)} \]
    5. Simplified0.9

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x}}{x} \cdot \left(0.3333333333333333 - \frac{0.1111111111111111}{x}\right)} \]

    if -1.0054654754205168 < x < 66997.7420196915

    1. Initial program 0.1

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Applied pow1/3_binary640.1

      \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - \sqrt[3]{x} \]
    3. Applied add-cube-cbrt_binary640.1

      \[\leadsto {\left(x + 1\right)}^{0.3333333333333333} - \color{blue}{\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}} \]
    4. Applied add-cube-cbrt_binary640.1

      \[\leadsto {\color{blue}{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}\right)}}^{0.3333333333333333} - \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}} \]
    5. Applied unpow-prod-down_binary640.1

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right)}^{0.3333333333333333} \cdot {\left(\sqrt[3]{x + 1}\right)}^{0.3333333333333333}} - \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}} \]
    6. Applied prod-diff_binary640.1

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right)}^{0.3333333333333333}, {\left(\sqrt[3]{x + 1}\right)}^{0.3333333333333333}, -\sqrt[3]{\sqrt[3]{x}} \cdot \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right)\right) + \mathsf{fma}\left(-\sqrt[3]{\sqrt[3]{x}}, \sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}, \sqrt[3]{\sqrt[3]{x}} \cdot \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right)\right)} \]
    7. Simplified0.1

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

      \[\leadsto \mathsf{fma}\left(\sqrt[3]{{\left(1 + x\right)}^{0.6666666666666666}}, \sqrt[3]{\sqrt[3]{1 + x}}, -\sqrt[3]{x}\right) + \color{blue}{0} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.0054654754205168 \lor \neg \left(x \leq 66997.7420196915\right):\\ \;\;\;\;\frac{\sqrt[3]{x}}{x} \cdot \left(0.3333333333333333 - \frac{0.1111111111111111}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{{\left(x + 1\right)}^{0.6666666666666666}}, \sqrt[3]{\sqrt[3]{x + 1}}, -\sqrt[3]{x}\right)\\ \end{array} \]

Reproduce

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