Average Error: 30.5 → 0.4
Time: 2.7s
Precision: binary64
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \leq -76484.35332027072 \lor \neg \left(x \leq 78115.69009331349\right):\\ \;\;\;\;\frac{\sqrt[3]{x}}{x} \cdot \left(0.3333333333333333 + \frac{-0.1111111111111111}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\log \left(e^{\frac{\sqrt[3]{1 + {x}^{3}}}{\sqrt[3]{x \cdot x + \left(1 - x\right)}} - \sqrt[3]{x}}\right)\\ \end{array}\]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
\mathbf{if}\;x \leq -76484.35332027072 \lor \neg \left(x \leq 78115.69009331349\right):\\
\;\;\;\;\frac{\sqrt[3]{x}}{x} \cdot \left(0.3333333333333333 + \frac{-0.1111111111111111}{x}\right)\\

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

\end{array}
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
 :precision binary64
 (if (or (<= x -76484.35332027072) (not (<= x 78115.69009331349)))
   (* (/ (cbrt x) x) (+ 0.3333333333333333 (/ -0.1111111111111111 x)))
   (log
    (exp
     (-
      (/ (cbrt (+ 1.0 (pow x 3.0))) (cbrt (+ (* x x) (- 1.0 x))))
      (cbrt x))))))
double code(double x) {
	return cbrt(x + 1.0) - cbrt(x);
}
double code(double x) {
	double tmp;
	if ((x <= -76484.35332027072) || !(x <= 78115.69009331349)) {
		tmp = (cbrt(x) / x) * (0.3333333333333333 + (-0.1111111111111111 / x));
	} else {
		tmp = log(exp((cbrt(1.0 + pow(x, 3.0)) / cbrt((x * x) + (1.0 - x))) - 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 2 regimes
  2. if x < -76484.353320270719 or 78115.690093313489 < x

    1. Initial program 60.6

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Taylor expanded 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)}\]
    3. Simplified0.6

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

    if -76484.353320270719 < x < 78115.690093313489

    1. Initial program 0.2

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

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

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

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

      \[\leadsto \frac{\sqrt[3]{1 + {x}^{3}}}{\color{blue}{\sqrt[3]{x \cdot x + \left(1 - x\right)}}} - \sqrt[3]{x}\]
    7. Using strategy rm
    8. Applied add-log-exp_binary640.2

      \[\leadsto \frac{\sqrt[3]{1 + {x}^{3}}}{\sqrt[3]{x \cdot x + \left(1 - x\right)}} - \color{blue}{\log \left(e^{\sqrt[3]{x}}\right)}\]
    9. Applied add-log-exp_binary640.2

      \[\leadsto \color{blue}{\log \left(e^{\frac{\sqrt[3]{1 + {x}^{3}}}{\sqrt[3]{x \cdot x + \left(1 - x\right)}}}\right)} - \log \left(e^{\sqrt[3]{x}}\right)\]
    10. Applied diff-log_binary640.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -76484.35332027072 \lor \neg \left(x \leq 78115.69009331349\right):\\ \;\;\;\;\frac{\sqrt[3]{x}}{x} \cdot \left(0.3333333333333333 + \frac{-0.1111111111111111}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\log \left(e^{\frac{\sqrt[3]{1 + {x}^{3}}}{\sqrt[3]{x \cdot x + \left(1 - x\right)}} - \sqrt[3]{x}}\right)\\ \end{array}\]

Reproduce

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