Average Error: 29.7 → 9.0
Time: 4.9s
Precision: binary64
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \leq -1052.8852819088763:\\ \;\;\;\;\sqrt[3]{\left(\frac{0.037037037037037035}{x \cdot x} + \frac{0.03292181069958848}{{x}^{4}}\right) - \left(\frac{0.037037037037037035}{{x}^{3}} + \frac{0.02880658436213992}{{x}^{5}}\right)}\\ \mathbf{elif}\;x \leq 0.0016450788605323252:\\ \;\;\;\;e^{\log \left(\sqrt[3]{x + 1} - \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}\]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
\mathbf{if}\;x \leq -1052.8852819088763:\\
\;\;\;\;\sqrt[3]{\left(\frac{0.037037037037037035}{x \cdot x} + \frac{0.03292181069958848}{{x}^{4}}\right) - \left(\frac{0.037037037037037035}{{x}^{3}} + \frac{0.02880658436213992}{{x}^{5}}\right)}\\

\mathbf{elif}\;x \leq 0.0016450788605323252:\\
\;\;\;\;e^{\log \left(\sqrt[3]{x + 1} - \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}
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
 :precision binary64
 (if (<= x -1052.8852819088763)
   (cbrt
    (-
     (+ (/ 0.037037037037037035 (* x x)) (/ 0.03292181069958848 (pow x 4.0)))
     (+
      (/ 0.037037037037037035 (pow x 3.0))
      (/ 0.02880658436213992 (pow x 5.0)))))
   (if (<= x 0.0016450788605323252)
     (exp (log (- (cbrt (+ x 1.0)) (cbrt x))))
     (/
      1.0
      (+
       (pow x 0.6666666666666666)
       (* (cbrt (+ x 1.0)) (+ (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 <= -1052.8852819088763) {
		tmp = cbrt(((0.037037037037037035 / (x * x)) + (0.03292181069958848 / pow(x, 4.0))) - ((0.037037037037037035 / pow(x, 3.0)) + (0.02880658436213992 / pow(x, 5.0))));
	} else if (x <= 0.0016450788605323252) {
		tmp = exp(log(cbrt(x + 1.0) - cbrt(x)));
	} else {
		tmp = 1.0 / (pow(x, 0.6666666666666666) + (cbrt(x + 1.0) * (cbrt(x + 1.0) + cbrt(x))));
	}
	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 < -1052.88528190887632

    1. Initial program 60.1

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied add-cbrt-cube_binary64_45560.1

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

      \[\leadsto \sqrt[3]{\color{blue}{{\left(\sqrt[3]{1 + x} - \sqrt[3]{x}\right)}^{3}}}\]
    5. Taylor expanded around inf 32.0

      \[\leadsto \sqrt[3]{\color{blue}{\left(0.037037037037037035 \cdot \frac{1}{{x}^{2}} + 0.03292181069958848 \cdot \frac{1}{{x}^{4}}\right) - \left(0.02880658436213992 \cdot \frac{1}{{x}^{5}} + 0.037037037037037035 \cdot \frac{1}{{x}^{3}}\right)}}\]
    6. Simplified32.0

      \[\leadsto \sqrt[3]{\color{blue}{\left(\frac{0.037037037037037035}{x \cdot x} + \frac{0.03292181069958848}{{x}^{4}}\right) - \left(\frac{0.037037037037037035}{{x}^{3}} + \frac{0.02880658436213992}{{x}^{5}}\right)}}\]

    if -1052.88528190887632 < x < 0.00164507886053232521

    1. Initial program 0.1

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied add-exp-log_binary64_4570.1

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

    if 0.00164507886053232521 < x

    1. Initial program 59.1

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

      \[\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.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1052.8852819088763:\\ \;\;\;\;\sqrt[3]{\left(\frac{0.037037037037037035}{x \cdot x} + \frac{0.03292181069958848}{{x}^{4}}\right) - \left(\frac{0.037037037037037035}{{x}^{3}} + \frac{0.02880658436213992}{{x}^{5}}\right)}\\ \mathbf{elif}\;x \leq 0.0016450788605323252:\\ \;\;\;\;e^{\log \left(\sqrt[3]{x + 1} - \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 2021028 
(FPCore (x)
  :name "2cbrt (problem 3.3.4)"
  :precision binary64
  (- (cbrt (+ x 1.0)) (cbrt x)))