Average Error: 29.9 → 19.2
Time: 6.0s
Precision: 64
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -4.456969474950534 \cdot 10^{61} \lor \neg \left(x \le 7492.24181969616166\right):\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.333333333333333315, 0.061728395061728392 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{x + 1} - \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\\ \end{array}\]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
\mathbf{if}\;x \le -4.456969474950534 \cdot 10^{61} \lor \neg \left(x \le 7492.24181969616166\right):\\
\;\;\;\;\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.333333333333333315, 0.061728395061728392 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)\\

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

\end{array}
double code(double x) {
	return (cbrt((x + 1.0)) - cbrt(x));
}
double code(double x) {
	double VAR;
	if (((x <= -4.456969474950534e+61) || !(x <= 7492.241819696162))) {
		VAR = fma(pow((1.0 / pow(x, 2.0)), 0.3333333333333333), 0.3333333333333333, ((0.06172839506172839 * pow((1.0 / pow(x, 8.0)), 0.3333333333333333)) - (0.1111111111111111 * pow((1.0 / pow(x, 5.0)), 0.3333333333333333))));
	} else {
		VAR = (cbrt((x + 1.0)) - ((cbrt(cbrt(x)) * cbrt(cbrt(x))) * cbrt(cbrt(x))));
	}
	return VAR;
}

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 < -4.456969474950534e+61 or 7492.241819696162 < x

    1. Initial program 60.7

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

      \[\leadsto \color{blue}{\left(0.333333333333333315 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} + 0.061728395061728392 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}}\right) - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}}\]
    3. Simplified36.8

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.333333333333333315, 0.061728395061728392 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)}\]

    if -4.456969474950534e+61 < x < 7492.241819696162

    1. Initial program 5.1

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt5.0

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -4.456969474950534 \cdot 10^{61} \lor \neg \left(x \le 7492.24181969616166\right):\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.333333333333333315, 0.061728395061728392 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{x + 1} - \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020079 +o rules:numerics
(FPCore (x)
  :name "2cbrt (problem 3.3.4)"
  :precision binary64
  (- (cbrt (+ x 1)) (cbrt x)))