Average Error: 30.4 → 9.3
Time: 4.9s
Precision: binary64
\[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
\[\begin{array}{l} \mathbf{if}\;x \leq -55446274.87776053:\\ \;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;\begin{array}{l} t_0 := \sqrt[3]{x + 1}\\ \mathbf{if}\;x \leq 5.1726045598553944 \cdot 10^{-5}:\\ \;\;\;\;\frac{{t_0}^{3} - {\left(\sqrt[3]{x}\right)}^{3}}{t_0 \cdot t_0 + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + t_0 \cdot \sqrt[3]{x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{x}^{0.6666666666666666} + t_0 \cdot \left(t_0 + \sqrt[3]{x}\right)}\\ \end{array}\\ \end{array} \]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
\mathbf{if}\;x \leq -55446274.87776053:\\
\;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}\\

\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_0 := \sqrt[3]{x + 1}\\
\mathbf{if}\;x \leq 5.1726045598553944 \cdot 10^{-5}:\\
\;\;\;\;\frac{{t_0}^{3} - {\left(\sqrt[3]{x}\right)}^{3}}{t_0 \cdot t_0 + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + t_0 \cdot \sqrt[3]{x}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{{x}^{0.6666666666666666} + t_0 \cdot \left(t_0 + \sqrt[3]{x}\right)}\\


\end{array}\\


\end{array}
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
 :precision binary64
 (if (<= x -55446274.87776053)
   (* 0.3333333333333333 (cbrt (/ 1.0 (* x x))))
   (let* ((t_0 (cbrt (+ x 1.0))))
     (if (<= x 5.1726045598553944e-5)
       (/
        (- (pow t_0 3.0) (pow (cbrt x) 3.0))
        (+ (* t_0 t_0) (+ (* (cbrt x) (cbrt x)) (* t_0 (cbrt x)))))
       (/ 1.0 (+ (pow x 0.6666666666666666) (* t_0 (+ t_0 (cbrt x)))))))))
double code(double x) {
	return cbrt(x + 1.0) - cbrt(x);
}
double code(double x) {
	double tmp;
	if (x <= -55446274.87776053) {
		tmp = 0.3333333333333333 * cbrt(1.0 / (x * x));
	} else {
		double t_0 = cbrt(x + 1.0);
		double tmp_1;
		if (x <= 5.1726045598553944e-5) {
			tmp_1 = (pow(t_0, 3.0) - pow(cbrt(x), 3.0)) / ((t_0 * t_0) + ((cbrt(x) * cbrt(x)) + (t_0 * cbrt(x))));
		} else {
			tmp_1 = 1.0 / (pow(x, 0.6666666666666666) + (t_0 * (t_0 + cbrt(x))));
		}
		tmp = tmp_1;
	}
	return tmp;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if x < -55446274.87776053

    1. Initial program 60.6

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Taylor expanded around inf 34.3

      \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}} \]
    3. Simplified32.3

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}} \]

    if -55446274.87776053 < x < 5.1726045598553944e-5

    1. Initial program 0.2

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Using strategy rm
    3. Applied flip3--_binary640.2

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)}} \]

    if 5.1726045598553944e-5 < x

    1. Initial program 58.7

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Using strategy rm
    3. Applied flip3--_binary6458.6

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

      \[\leadsto \frac{\color{blue}{1}}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)} \]
    5. Simplified4.4

      \[\leadsto \frac{1}{\color{blue}{{x}^{0.6666666666666666} + \sqrt[3]{1 + x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification9.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -55446274.87776053:\\ \;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}\\ \mathbf{elif}\;x \leq 5.1726045598553944 \cdot 10^{-5}:\\ \;\;\;\;\frac{{\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{x}^{0.6666666666666666} + \sqrt[3]{x + 1} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}\\ \end{array} \]

Reproduce

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