2cbrt (problem 3.3.4)

Percentage Accurate: 6.9% → 99.1%
Time: 29.9s
Alternatives: 14
Speedup: 1.9×

Specification

?
\[x > 1 \land x < 10^{+308}\]
\[\begin{array}{l} \\ \sqrt[3]{x + 1} - \sqrt[3]{x} \end{array} \]
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
double code(double x) {
	return cbrt((x + 1.0)) - cbrt(x);
}
public static double code(double x) {
	return Math.cbrt((x + 1.0)) - Math.cbrt(x);
}
function code(x)
	return Float64(cbrt(Float64(x + 1.0)) - cbrt(x))
end
code[x_] := N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt[3]{x + 1} - \sqrt[3]{x}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 6.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \sqrt[3]{x + 1} - \sqrt[3]{x} \end{array} \]
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
double code(double x) {
	return cbrt((x + 1.0)) - cbrt(x);
}
public static double code(double x) {
	return Math.cbrt((x + 1.0)) - Math.cbrt(x);
}
function code(x)
	return Float64(cbrt(Float64(x + 1.0)) - cbrt(x))
end
code[x_] := N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt[3]{x + 1} - \sqrt[3]{x}
\end{array}

Alternative 1: 99.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{1 + x}\\ \mathbf{if}\;t\_0 - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot 0.037037037037037035}}{x}\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{x - \left(-1 + x\right)}{\sqrt[3]{x} \cdot \left(\left(-\sqrt[3]{x}\right) - t\_0\right) + \left(0 - {\left(1 + x\right)}^{0.6666666666666666}\right)}\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (cbrt (+ 1.0 x))))
   (if (<= (- t_0 (cbrt x)) 4e-6)
     (/
      (+
       (* (cbrt (/ 1.0 (pow x 2.0))) -0.1111111111111111)
       (cbrt (* x 0.037037037037037035)))
      x)
     (-
      0.0
      (/
       (- x (+ -1.0 x))
       (+
        (* (cbrt x) (- (- (cbrt x)) t_0))
        (- 0.0 (pow (+ 1.0 x) 0.6666666666666666))))))))
double code(double x) {
	double t_0 = cbrt((1.0 + x));
	double tmp;
	if ((t_0 - cbrt(x)) <= 4e-6) {
		tmp = ((cbrt((1.0 / pow(x, 2.0))) * -0.1111111111111111) + cbrt((x * 0.037037037037037035))) / x;
	} else {
		tmp = 0.0 - ((x - (-1.0 + x)) / ((cbrt(x) * (-cbrt(x) - t_0)) + (0.0 - pow((1.0 + x), 0.6666666666666666))));
	}
	return tmp;
}
public static double code(double x) {
	double t_0 = Math.cbrt((1.0 + x));
	double tmp;
	if ((t_0 - Math.cbrt(x)) <= 4e-6) {
		tmp = ((Math.cbrt((1.0 / Math.pow(x, 2.0))) * -0.1111111111111111) + Math.cbrt((x * 0.037037037037037035))) / x;
	} else {
		tmp = 0.0 - ((x - (-1.0 + x)) / ((Math.cbrt(x) * (-Math.cbrt(x) - t_0)) + (0.0 - Math.pow((1.0 + x), 0.6666666666666666))));
	}
	return tmp;
}
function code(x)
	t_0 = cbrt(Float64(1.0 + x))
	tmp = 0.0
	if (Float64(t_0 - cbrt(x)) <= 4e-6)
		tmp = Float64(Float64(Float64(cbrt(Float64(1.0 / (x ^ 2.0))) * -0.1111111111111111) + cbrt(Float64(x * 0.037037037037037035))) / x);
	else
		tmp = Float64(0.0 - Float64(Float64(x - Float64(-1.0 + x)) / Float64(Float64(cbrt(x) * Float64(Float64(-cbrt(x)) - t_0)) + Float64(0.0 - (Float64(1.0 + x) ^ 0.6666666666666666)))));
	end
	return tmp
end
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[N[(t$95$0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], 4e-6], N[(N[(N[(N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * -0.1111111111111111), $MachinePrecision] + N[Power[N[(x * 0.037037037037037035), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(0.0 - N[(N[(x - N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Power[x, 1/3], $MachinePrecision] * N[((-N[Power[x, 1/3], $MachinePrecision]) - t$95$0), $MachinePrecision]), $MachinePrecision] + N[(0.0 - N[Power[N[(1.0 + x), $MachinePrecision], 0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\mathbf{if}\;t\_0 - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\
\;\;\;\;\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot 0.037037037037037035}}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) < 3.99999999999999982e-6

    1. Initial program 5.7%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt5.3%

        \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}}} - \sqrt[3]{x} \]
      2. add-sqr-sqrt5.7%

        \[\leadsto \sqrt{\sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}} - \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}} \]
      3. difference-of-squares5.7%

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

        \[\leadsto \left(\sqrt{\color{blue}{{\left(x + 1\right)}^{0.3333333333333333}}} + \sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      5. sqrt-pow15.7%

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

        \[\leadsto \left({\left(x + 1\right)}^{\color{blue}{0.16666666666666666}} + \sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      7. pow1/35.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + \sqrt{\color{blue}{{x}^{0.3333333333333333}}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      8. sqrt-pow15.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + \color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      9. metadata-eval5.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{\color{blue}{0.16666666666666666}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      10. pow1/33.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left(\sqrt{\color{blue}{{\left(x + 1\right)}^{0.3333333333333333}}} - \sqrt{\sqrt[3]{x}}\right) \]
      11. sqrt-pow13.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left(\color{blue}{{\left(x + 1\right)}^{\left(\frac{0.3333333333333333}{2}\right)}} - \sqrt{\sqrt[3]{x}}\right) \]
      12. metadata-eval3.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{\color{blue}{0.16666666666666666}} - \sqrt{\sqrt[3]{x}}\right) \]
      13. pow1/35.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - \sqrt{\color{blue}{{x}^{0.3333333333333333}}}\right) \]
      14. sqrt-pow15.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - \color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \]
      15. metadata-eval5.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - {x}^{\color{blue}{0.16666666666666666}}\right) \]
    4. Applied egg-rr5.7%

      \[\leadsto \color{blue}{\left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - {x}^{0.16666666666666666}\right)} \]
    5. Taylor expanded in x around inf 99.1%

      \[\leadsto \color{blue}{\frac{-0.1388888888888889 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + \left(0.027777777777777776 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{x}\right)}{x}} \]
    6. Step-by-step derivation
      1. associate-+r+99.1%

        \[\leadsto \frac{\color{blue}{\left(-0.1388888888888889 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.027777777777777776 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) + 0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
      2. distribute-rgt-out99.1%

        \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot \left(-0.1388888888888889 + 0.027777777777777776\right)} + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
      3. metadata-eval99.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{-0.1111111111111111} + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
    7. Simplified99.1%

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \sqrt[3]{x}}{x}} \]
    8. Step-by-step derivation
      1. pow1/391.8%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \color{blue}{{x}^{0.3333333333333333}}}{x} \]
      2. pow191.8%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{{\left(0.3333333333333333 \cdot {x}^{0.3333333333333333}\right)}^{1}}}{x} \]
      3. pow1/399.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + {\left(0.3333333333333333 \cdot \color{blue}{\sqrt[3]{x}}\right)}^{1}}{x} \]
    9. Applied egg-rr99.1%

      \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{{\left(0.3333333333333333 \cdot \sqrt[3]{x}\right)}^{1}}}{x} \]
    10. Step-by-step derivation
      1. unpow199.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
      2. rem-cbrt-cube98.9%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{\sqrt[3]{{\left(0.3333333333333333 \cdot \sqrt[3]{x}\right)}^{3}}}}{x} \]
      3. *-commutative98.9%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{{\color{blue}{\left(\sqrt[3]{x} \cdot 0.3333333333333333\right)}}^{3}}}{x} \]
      4. cube-prod98.9%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{\color{blue}{{\left(\sqrt[3]{x}\right)}^{3} \cdot {0.3333333333333333}^{3}}}}{x} \]
      5. rem-cube-cbrt99.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{\color{blue}{x} \cdot {0.3333333333333333}^{3}}}{x} \]
      6. metadata-eval99.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot \color{blue}{0.037037037037037035}}}{x} \]
    11. Simplified99.1%

      \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{\sqrt[3]{x \cdot 0.037037037037037035}}}{x} \]

    if 3.99999999999999982e-6 < (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x))

    1. Initial program 88.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. pow1/388.6%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
      2. add-sqr-sqrt88.4%

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

        \[\leadsto \sqrt[3]{x + 1} - {\color{blue}{\left({\left(\sqrt{x}\right)}^{2}\right)}}^{0.3333333333333333} \]
      4. pow-pow88.4%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{\left(\sqrt{x}\right)}^{\left(2 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval88.4%

        \[\leadsto \sqrt[3]{x + 1} - {\left(\sqrt{x}\right)}^{\color{blue}{0.6666666666666666}} \]
    4. Applied egg-rr88.4%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{\left(\sqrt{x}\right)}^{0.6666666666666666}} \]
    5. Step-by-step derivation
      1. sqrt-pow288.6%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{\left(\frac{0.6666666666666666}{2}\right)}} \]
      2. metadata-eval88.6%

        \[\leadsto \sqrt[3]{x + 1} - {x}^{\color{blue}{0.3333333333333333}} \]
      3. pow1/388.2%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\sqrt[3]{x}} \]
      4. flip3--88.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)}} \]
      5. frac-2neg88.0%

        \[\leadsto \color{blue}{\frac{-\left({\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}\right)}{-\left(\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)\right)}} \]
      6. rem-cube-cbrt91.1%

        \[\leadsto \frac{-\left(\color{blue}{\left(x + 1\right)} - {\left(\sqrt[3]{x}\right)}^{3}\right)}{-\left(\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)\right)} \]
      7. rem-cube-cbrt97.7%

        \[\leadsto \frac{-\left(\left(x + 1\right) - \color{blue}{x}\right)}{-\left(\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)\right)} \]
      8. pow297.7%

        \[\leadsto \frac{-\left(\left(x + 1\right) - x\right)}{-\left(\color{blue}{{\left(\sqrt[3]{x + 1}\right)}^{2}} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)\right)} \]
      9. distribute-rgt-out98.0%

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

      \[\leadsto \color{blue}{\frac{-\left(\left(x + 1\right) - x\right)}{-\left({\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{x + 1}\right)\right)}} \]
    7. Step-by-step derivation
      1. associate--l+98.8%

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

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

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

      \[\leadsto \color{blue}{\frac{-\left(x + \left(1 - x\right)\right)}{-\left({\left(\sqrt[3]{1 + x}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)}} \]
    9. Step-by-step derivation
      1. +-commutative98.8%

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

        \[\leadsto \frac{-\left(x + \left(1 - x\right)\right)}{-\left(\color{blue}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)} \]
      3. cbrt-unprod99.0%

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

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

        \[\leadsto \frac{-\left(x + \left(1 - x\right)\right)}{-\left(\sqrt[3]{{\color{blue}{\left(1 + x\right)}}^{2}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)} \]
    10. Applied egg-rr99.0%

      \[\leadsto \frac{-\left(x + \left(1 - x\right)\right)}{-\left(\color{blue}{\sqrt[3]{{\left(1 + x\right)}^{2}}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)} \]
    11. Step-by-step derivation
      1. pow1/399.0%

        \[\leadsto \frac{-\left(x + \left(1 - x\right)\right)}{-\left(\color{blue}{{\left({\left(1 + x\right)}^{2}\right)}^{0.3333333333333333}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)} \]
      2. +-commutative99.0%

        \[\leadsto \frac{-\left(x + \left(1 - x\right)\right)}{-\left({\left({\color{blue}{\left(x + 1\right)}}^{2}\right)}^{0.3333333333333333} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)} \]
      3. pow-pow99.0%

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

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

        \[\leadsto \frac{-\left(x + \left(1 - x\right)\right)}{-\left({\left(1 + x\right)}^{\color{blue}{0.6666666666666666}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)} \]
    12. Applied egg-rr99.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot 0.037037037037037035}}{x}\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{x - \left(-1 + x\right)}{\sqrt[3]{x} \cdot \left(\left(-\sqrt[3]{x}\right) - \sqrt[3]{1 + x}\right) + \left(0 - {\left(1 + x\right)}^{0.6666666666666666}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 98.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(1 + x\right)}^{0.16666666666666666}\\ \mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot 0.037037037037037035}}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 + {x}^{0.16666666666666666}\right) \cdot \left(t\_0 - {x}^{0.16666666666666666}\right)\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (pow (+ 1.0 x) 0.16666666666666666)))
   (if (<= (- (cbrt (+ 1.0 x)) (cbrt x)) 4e-6)
     (/
      (+
       (* (cbrt (/ 1.0 (pow x 2.0))) -0.1111111111111111)
       (cbrt (* x 0.037037037037037035)))
      x)
     (*
      (+ t_0 (pow x 0.16666666666666666))
      (- t_0 (pow x 0.16666666666666666))))))
double code(double x) {
	double t_0 = pow((1.0 + x), 0.16666666666666666);
	double tmp;
	if ((cbrt((1.0 + x)) - cbrt(x)) <= 4e-6) {
		tmp = ((cbrt((1.0 / pow(x, 2.0))) * -0.1111111111111111) + cbrt((x * 0.037037037037037035))) / x;
	} else {
		tmp = (t_0 + pow(x, 0.16666666666666666)) * (t_0 - pow(x, 0.16666666666666666));
	}
	return tmp;
}
public static double code(double x) {
	double t_0 = Math.pow((1.0 + x), 0.16666666666666666);
	double tmp;
	if ((Math.cbrt((1.0 + x)) - Math.cbrt(x)) <= 4e-6) {
		tmp = ((Math.cbrt((1.0 / Math.pow(x, 2.0))) * -0.1111111111111111) + Math.cbrt((x * 0.037037037037037035))) / x;
	} else {
		tmp = (t_0 + Math.pow(x, 0.16666666666666666)) * (t_0 - Math.pow(x, 0.16666666666666666));
	}
	return tmp;
}
function code(x)
	t_0 = Float64(1.0 + x) ^ 0.16666666666666666
	tmp = 0.0
	if (Float64(cbrt(Float64(1.0 + x)) - cbrt(x)) <= 4e-6)
		tmp = Float64(Float64(Float64(cbrt(Float64(1.0 / (x ^ 2.0))) * -0.1111111111111111) + cbrt(Float64(x * 0.037037037037037035))) / x);
	else
		tmp = Float64(Float64(t_0 + (x ^ 0.16666666666666666)) * Float64(t_0 - (x ^ 0.16666666666666666)));
	end
	return tmp
end
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], 0.16666666666666666], $MachinePrecision]}, If[LessEqual[N[(N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], 4e-6], N[(N[(N[(N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * -0.1111111111111111), $MachinePrecision] + N[Power[N[(x * 0.037037037037037035), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(t$95$0 + N[Power[x, 0.16666666666666666], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 - N[Power[x, 0.16666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(1 + x\right)}^{0.16666666666666666}\\
\mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\
\;\;\;\;\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot 0.037037037037037035}}{x}\\

\mathbf{else}:\\
\;\;\;\;\left(t\_0 + {x}^{0.16666666666666666}\right) \cdot \left(t\_0 - {x}^{0.16666666666666666}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) < 3.99999999999999982e-6

    1. Initial program 5.7%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt5.3%

        \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}}} - \sqrt[3]{x} \]
      2. add-sqr-sqrt5.7%

        \[\leadsto \sqrt{\sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}} - \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}} \]
      3. difference-of-squares5.7%

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

        \[\leadsto \left(\sqrt{\color{blue}{{\left(x + 1\right)}^{0.3333333333333333}}} + \sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      5. sqrt-pow15.7%

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

        \[\leadsto \left({\left(x + 1\right)}^{\color{blue}{0.16666666666666666}} + \sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      7. pow1/35.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + \sqrt{\color{blue}{{x}^{0.3333333333333333}}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      8. sqrt-pow15.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + \color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      9. metadata-eval5.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{\color{blue}{0.16666666666666666}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      10. pow1/33.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left(\sqrt{\color{blue}{{\left(x + 1\right)}^{0.3333333333333333}}} - \sqrt{\sqrt[3]{x}}\right) \]
      11. sqrt-pow13.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left(\color{blue}{{\left(x + 1\right)}^{\left(\frac{0.3333333333333333}{2}\right)}} - \sqrt{\sqrt[3]{x}}\right) \]
      12. metadata-eval3.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{\color{blue}{0.16666666666666666}} - \sqrt{\sqrt[3]{x}}\right) \]
      13. pow1/35.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - \sqrt{\color{blue}{{x}^{0.3333333333333333}}}\right) \]
      14. sqrt-pow15.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - \color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \]
      15. metadata-eval5.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - {x}^{\color{blue}{0.16666666666666666}}\right) \]
    4. Applied egg-rr5.7%

      \[\leadsto \color{blue}{\left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - {x}^{0.16666666666666666}\right)} \]
    5. Taylor expanded in x around inf 99.1%

      \[\leadsto \color{blue}{\frac{-0.1388888888888889 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + \left(0.027777777777777776 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{x}\right)}{x}} \]
    6. Step-by-step derivation
      1. associate-+r+99.1%

        \[\leadsto \frac{\color{blue}{\left(-0.1388888888888889 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.027777777777777776 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) + 0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
      2. distribute-rgt-out99.1%

        \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot \left(-0.1388888888888889 + 0.027777777777777776\right)} + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
      3. metadata-eval99.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{-0.1111111111111111} + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
    7. Simplified99.1%

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \sqrt[3]{x}}{x}} \]
    8. Step-by-step derivation
      1. pow1/391.8%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \color{blue}{{x}^{0.3333333333333333}}}{x} \]
      2. pow191.8%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{{\left(0.3333333333333333 \cdot {x}^{0.3333333333333333}\right)}^{1}}}{x} \]
      3. pow1/399.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + {\left(0.3333333333333333 \cdot \color{blue}{\sqrt[3]{x}}\right)}^{1}}{x} \]
    9. Applied egg-rr99.1%

      \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{{\left(0.3333333333333333 \cdot \sqrt[3]{x}\right)}^{1}}}{x} \]
    10. Step-by-step derivation
      1. unpow199.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
      2. rem-cbrt-cube98.9%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{\sqrt[3]{{\left(0.3333333333333333 \cdot \sqrt[3]{x}\right)}^{3}}}}{x} \]
      3. *-commutative98.9%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{{\color{blue}{\left(\sqrt[3]{x} \cdot 0.3333333333333333\right)}}^{3}}}{x} \]
      4. cube-prod98.9%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{\color{blue}{{\left(\sqrt[3]{x}\right)}^{3} \cdot {0.3333333333333333}^{3}}}}{x} \]
      5. rem-cube-cbrt99.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{\color{blue}{x} \cdot {0.3333333333333333}^{3}}}{x} \]
      6. metadata-eval99.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot \color{blue}{0.037037037037037035}}}{x} \]
    11. Simplified99.1%

      \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{\sqrt[3]{x \cdot 0.037037037037037035}}}{x} \]

    if 3.99999999999999982e-6 < (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x))

    1. Initial program 88.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt88.3%

        \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}}} - \sqrt[3]{x} \]
      2. add-sqr-sqrt88.2%

        \[\leadsto \sqrt{\sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}} - \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}} \]
      3. difference-of-squares89.4%

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

        \[\leadsto \left(\sqrt{\color{blue}{{\left(x + 1\right)}^{0.3333333333333333}}} + \sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      5. sqrt-pow189.4%

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

        \[\leadsto \left({\left(x + 1\right)}^{\color{blue}{0.16666666666666666}} + \sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      7. pow1/389.4%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + \sqrt{\color{blue}{{x}^{0.3333333333333333}}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      8. sqrt-pow189.4%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + \color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      9. metadata-eval89.4%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{\color{blue}{0.16666666666666666}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      10. pow1/391.6%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left(\sqrt{\color{blue}{{\left(x + 1\right)}^{0.3333333333333333}}} - \sqrt{\sqrt[3]{x}}\right) \]
      11. sqrt-pow192.1%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left(\color{blue}{{\left(x + 1\right)}^{\left(\frac{0.3333333333333333}{2}\right)}} - \sqrt{\sqrt[3]{x}}\right) \]
      12. metadata-eval92.1%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{\color{blue}{0.16666666666666666}} - \sqrt{\sqrt[3]{x}}\right) \]
      13. pow1/391.5%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - \sqrt{\color{blue}{{x}^{0.3333333333333333}}}\right) \]
      14. sqrt-pow191.8%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - \color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \]
      15. metadata-eval91.8%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - {x}^{\color{blue}{0.16666666666666666}}\right) \]
    4. Applied egg-rr91.8%

      \[\leadsto \color{blue}{\left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - {x}^{0.16666666666666666}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot 0.037037037037037035}}{x}\\ \mathbf{else}:\\ \;\;\;\;\left({\left(1 + x\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(1 + x\right)}^{0.16666666666666666} - {x}^{0.16666666666666666}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 98.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot 0.037037037037037035}}{x}\\ \mathbf{else}:\\ \;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= (- (cbrt (+ 1.0 x)) (cbrt x)) 4e-6)
   (/
    (+
     (* (cbrt (/ 1.0 (pow x 2.0))) -0.1111111111111111)
     (cbrt (* x 0.037037037037037035)))
    x)
   (+ (pow (+ 1.0 x) 0.3333333333333333) (- 0.0 (pow x 0.3333333333333333)))))
double code(double x) {
	double tmp;
	if ((cbrt((1.0 + x)) - cbrt(x)) <= 4e-6) {
		tmp = ((cbrt((1.0 / pow(x, 2.0))) * -0.1111111111111111) + cbrt((x * 0.037037037037037035))) / x;
	} else {
		tmp = pow((1.0 + x), 0.3333333333333333) + (0.0 - pow(x, 0.3333333333333333));
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if ((Math.cbrt((1.0 + x)) - Math.cbrt(x)) <= 4e-6) {
		tmp = ((Math.cbrt((1.0 / Math.pow(x, 2.0))) * -0.1111111111111111) + Math.cbrt((x * 0.037037037037037035))) / x;
	} else {
		tmp = Math.pow((1.0 + x), 0.3333333333333333) + (0.0 - Math.pow(x, 0.3333333333333333));
	}
	return tmp;
}
function code(x)
	tmp = 0.0
	if (Float64(cbrt(Float64(1.0 + x)) - cbrt(x)) <= 4e-6)
		tmp = Float64(Float64(Float64(cbrt(Float64(1.0 / (x ^ 2.0))) * -0.1111111111111111) + cbrt(Float64(x * 0.037037037037037035))) / x);
	else
		tmp = Float64((Float64(1.0 + x) ^ 0.3333333333333333) + Float64(0.0 - (x ^ 0.3333333333333333)));
	end
	return tmp
end
code[x_] := If[LessEqual[N[(N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], 4e-6], N[(N[(N[(N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * -0.1111111111111111), $MachinePrecision] + N[Power[N[(x * 0.037037037037037035), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[Power[N[(1.0 + x), $MachinePrecision], 0.3333333333333333], $MachinePrecision] + N[(0.0 - N[Power[x, 0.3333333333333333], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\
\;\;\;\;\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot 0.037037037037037035}}{x}\\

\mathbf{else}:\\
\;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) < 3.99999999999999982e-6

    1. Initial program 5.7%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt5.3%

        \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}}} - \sqrt[3]{x} \]
      2. add-sqr-sqrt5.7%

        \[\leadsto \sqrt{\sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}} - \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}} \]
      3. difference-of-squares5.7%

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

        \[\leadsto \left(\sqrt{\color{blue}{{\left(x + 1\right)}^{0.3333333333333333}}} + \sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      5. sqrt-pow15.7%

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

        \[\leadsto \left({\left(x + 1\right)}^{\color{blue}{0.16666666666666666}} + \sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      7. pow1/35.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + \sqrt{\color{blue}{{x}^{0.3333333333333333}}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      8. sqrt-pow15.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + \color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      9. metadata-eval5.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{\color{blue}{0.16666666666666666}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      10. pow1/33.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left(\sqrt{\color{blue}{{\left(x + 1\right)}^{0.3333333333333333}}} - \sqrt{\sqrt[3]{x}}\right) \]
      11. sqrt-pow13.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left(\color{blue}{{\left(x + 1\right)}^{\left(\frac{0.3333333333333333}{2}\right)}} - \sqrt{\sqrt[3]{x}}\right) \]
      12. metadata-eval3.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{\color{blue}{0.16666666666666666}} - \sqrt{\sqrt[3]{x}}\right) \]
      13. pow1/35.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - \sqrt{\color{blue}{{x}^{0.3333333333333333}}}\right) \]
      14. sqrt-pow15.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - \color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \]
      15. metadata-eval5.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - {x}^{\color{blue}{0.16666666666666666}}\right) \]
    4. Applied egg-rr5.7%

      \[\leadsto \color{blue}{\left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - {x}^{0.16666666666666666}\right)} \]
    5. Taylor expanded in x around inf 99.1%

      \[\leadsto \color{blue}{\frac{-0.1388888888888889 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + \left(0.027777777777777776 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{x}\right)}{x}} \]
    6. Step-by-step derivation
      1. associate-+r+99.1%

        \[\leadsto \frac{\color{blue}{\left(-0.1388888888888889 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.027777777777777776 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) + 0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
      2. distribute-rgt-out99.1%

        \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot \left(-0.1388888888888889 + 0.027777777777777776\right)} + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
      3. metadata-eval99.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{-0.1111111111111111} + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
    7. Simplified99.1%

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \sqrt[3]{x}}{x}} \]
    8. Step-by-step derivation
      1. pow1/391.8%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \color{blue}{{x}^{0.3333333333333333}}}{x} \]
      2. pow191.8%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{{\left(0.3333333333333333 \cdot {x}^{0.3333333333333333}\right)}^{1}}}{x} \]
      3. pow1/399.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + {\left(0.3333333333333333 \cdot \color{blue}{\sqrt[3]{x}}\right)}^{1}}{x} \]
    9. Applied egg-rr99.1%

      \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{{\left(0.3333333333333333 \cdot \sqrt[3]{x}\right)}^{1}}}{x} \]
    10. Step-by-step derivation
      1. unpow199.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
      2. rem-cbrt-cube98.9%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{\sqrt[3]{{\left(0.3333333333333333 \cdot \sqrt[3]{x}\right)}^{3}}}}{x} \]
      3. *-commutative98.9%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{{\color{blue}{\left(\sqrt[3]{x} \cdot 0.3333333333333333\right)}}^{3}}}{x} \]
      4. cube-prod98.9%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{\color{blue}{{\left(\sqrt[3]{x}\right)}^{3} \cdot {0.3333333333333333}^{3}}}}{x} \]
      5. rem-cube-cbrt99.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{\color{blue}{x} \cdot {0.3333333333333333}^{3}}}{x} \]
      6. metadata-eval99.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot \color{blue}{0.037037037037037035}}}{x} \]
    11. Simplified99.1%

      \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \color{blue}{\sqrt[3]{x \cdot 0.037037037037037035}}}{x} \]

    if 3.99999999999999982e-6 < (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x))

    1. Initial program 88.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. pow1/388.6%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    4. Applied egg-rr88.6%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    5. Step-by-step derivation
      1. pow1/391.0%

        \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - {x}^{0.3333333333333333} \]
    6. Applied egg-rr91.0%

      \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - {x}^{0.3333333333333333} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + \sqrt[3]{x \cdot 0.037037037037037035}}{x}\\ \mathbf{else}:\\ \;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 98.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{1 + x}\\ \frac{-1}{\left(-{t\_0}^{2}\right) - \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + t\_0\right)} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (cbrt (+ 1.0 x))))
   (/ -1.0 (- (- (pow t_0 2.0)) (* (cbrt x) (+ (cbrt x) t_0))))))
double code(double x) {
	double t_0 = cbrt((1.0 + x));
	return -1.0 / (-pow(t_0, 2.0) - (cbrt(x) * (cbrt(x) + t_0)));
}
public static double code(double x) {
	double t_0 = Math.cbrt((1.0 + x));
	return -1.0 / (-Math.pow(t_0, 2.0) - (Math.cbrt(x) * (Math.cbrt(x) + t_0)));
}
function code(x)
	t_0 = cbrt(Float64(1.0 + x))
	return Float64(-1.0 / Float64(Float64(-(t_0 ^ 2.0)) - Float64(cbrt(x) * Float64(cbrt(x) + t_0))))
end
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]}, N[(-1.0 / N[((-N[Power[t$95$0, 2.0], $MachinePrecision]) - N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\frac{-1}{\left(-{t\_0}^{2}\right) - \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + t\_0\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 8.6%

    \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. pow1/39.4%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    2. add-sqr-sqrt9.4%

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

      \[\leadsto \sqrt[3]{x + 1} - {\color{blue}{\left({\left(\sqrt{x}\right)}^{2}\right)}}^{0.3333333333333333} \]
    4. pow-pow9.4%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{\left(\sqrt{x}\right)}^{\left(2 \cdot 0.3333333333333333\right)}} \]
    5. metadata-eval9.4%

      \[\leadsto \sqrt[3]{x + 1} - {\left(\sqrt{x}\right)}^{\color{blue}{0.6666666666666666}} \]
  4. Applied egg-rr9.4%

    \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{\left(\sqrt{x}\right)}^{0.6666666666666666}} \]
  5. Step-by-step derivation
    1. sqrt-pow29.4%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{\left(\frac{0.6666666666666666}{2}\right)}} \]
    2. metadata-eval9.4%

      \[\leadsto \sqrt[3]{x + 1} - {x}^{\color{blue}{0.3333333333333333}} \]
    3. pow1/38.6%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\sqrt[3]{x}} \]
    4. flip3--8.8%

      \[\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)}} \]
    5. frac-2neg8.8%

      \[\leadsto \color{blue}{\frac{-\left({\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}\right)}{-\left(\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)\right)}} \]
    6. rem-cube-cbrt7.8%

      \[\leadsto \frac{-\left(\color{blue}{\left(x + 1\right)} - {\left(\sqrt[3]{x}\right)}^{3}\right)}{-\left(\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)\right)} \]
    7. rem-cube-cbrt10.9%

      \[\leadsto \frac{-\left(\left(x + 1\right) - \color{blue}{x}\right)}{-\left(\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)\right)} \]
    8. pow210.9%

      \[\leadsto \frac{-\left(\left(x + 1\right) - x\right)}{-\left(\color{blue}{{\left(\sqrt[3]{x + 1}\right)}^{2}} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)\right)} \]
    9. distribute-rgt-out10.9%

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

    \[\leadsto \color{blue}{\frac{-\left(\left(x + 1\right) - x\right)}{-\left({\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{x + 1}\right)\right)}} \]
  7. Step-by-step derivation
    1. associate--l+10.9%

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

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

      \[\leadsto \frac{-\left(x + \left(1 - x\right)\right)}{-\left({\left(\sqrt[3]{1 + x}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{\color{blue}{1 + x}}\right)\right)} \]
  8. Simplified10.9%

    \[\leadsto \color{blue}{\frac{-\left(x + \left(1 - x\right)\right)}{-\left({\left(\sqrt[3]{1 + x}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)}} \]
  9. Taylor expanded in x around 0 98.4%

    \[\leadsto \frac{-\color{blue}{1}}{-\left({\left(\sqrt[3]{1 + x}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)} \]
  10. Final simplification98.4%

    \[\leadsto \frac{-1}{\left(-{\left(\sqrt[3]{1 + x}\right)}^{2}\right) - \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)} \]
  11. Add Preprocessing

Alternative 5: 98.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\ \;\;\;\;0 - \frac{\sqrt[3]{x} \cdot \left(-0.3333333333333333\right) + \left(0 - -0.1111111111111111 \cdot {x}^{-0.6666666666666666}\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= (- (cbrt (+ 1.0 x)) (cbrt x)) 4e-6)
   (-
    0.0
    (/
     (+
      (* (cbrt x) (- 0.3333333333333333))
      (- 0.0 (* -0.1111111111111111 (pow x -0.6666666666666666))))
     x))
   (+ (pow (+ 1.0 x) 0.3333333333333333) (- 0.0 (pow x 0.3333333333333333)))))
double code(double x) {
	double tmp;
	if ((cbrt((1.0 + x)) - cbrt(x)) <= 4e-6) {
		tmp = 0.0 - (((cbrt(x) * -0.3333333333333333) + (0.0 - (-0.1111111111111111 * pow(x, -0.6666666666666666)))) / x);
	} else {
		tmp = pow((1.0 + x), 0.3333333333333333) + (0.0 - pow(x, 0.3333333333333333));
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if ((Math.cbrt((1.0 + x)) - Math.cbrt(x)) <= 4e-6) {
		tmp = 0.0 - (((Math.cbrt(x) * -0.3333333333333333) + (0.0 - (-0.1111111111111111 * Math.pow(x, -0.6666666666666666)))) / x);
	} else {
		tmp = Math.pow((1.0 + x), 0.3333333333333333) + (0.0 - Math.pow(x, 0.3333333333333333));
	}
	return tmp;
}
function code(x)
	tmp = 0.0
	if (Float64(cbrt(Float64(1.0 + x)) - cbrt(x)) <= 4e-6)
		tmp = Float64(0.0 - Float64(Float64(Float64(cbrt(x) * Float64(-0.3333333333333333)) + Float64(0.0 - Float64(-0.1111111111111111 * (x ^ -0.6666666666666666)))) / x));
	else
		tmp = Float64((Float64(1.0 + x) ^ 0.3333333333333333) + Float64(0.0 - (x ^ 0.3333333333333333)));
	end
	return tmp
end
code[x_] := If[LessEqual[N[(N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], 4e-6], N[(0.0 - N[(N[(N[(N[Power[x, 1/3], $MachinePrecision] * (-0.3333333333333333)), $MachinePrecision] + N[(0.0 - N[(-0.1111111111111111 * N[Power[x, -0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(1.0 + x), $MachinePrecision], 0.3333333333333333], $MachinePrecision] + N[(0.0 - N[Power[x, 0.3333333333333333], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\
\;\;\;\;0 - \frac{\sqrt[3]{x} \cdot \left(-0.3333333333333333\right) + \left(0 - -0.1111111111111111 \cdot {x}^{-0.6666666666666666}\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) < 3.99999999999999982e-6

    1. Initial program 5.7%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt5.3%

        \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}}} - \sqrt[3]{x} \]
      2. add-sqr-sqrt5.7%

        \[\leadsto \sqrt{\sqrt[3]{x + 1}} \cdot \sqrt{\sqrt[3]{x + 1}} - \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}} \]
      3. difference-of-squares5.7%

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

        \[\leadsto \left(\sqrt{\color{blue}{{\left(x + 1\right)}^{0.3333333333333333}}} + \sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      5. sqrt-pow15.7%

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

        \[\leadsto \left({\left(x + 1\right)}^{\color{blue}{0.16666666666666666}} + \sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      7. pow1/35.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + \sqrt{\color{blue}{{x}^{0.3333333333333333}}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      8. sqrt-pow15.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + \color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      9. metadata-eval5.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{\color{blue}{0.16666666666666666}}\right) \cdot \left(\sqrt{\sqrt[3]{x + 1}} - \sqrt{\sqrt[3]{x}}\right) \]
      10. pow1/33.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left(\sqrt{\color{blue}{{\left(x + 1\right)}^{0.3333333333333333}}} - \sqrt{\sqrt[3]{x}}\right) \]
      11. sqrt-pow13.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left(\color{blue}{{\left(x + 1\right)}^{\left(\frac{0.3333333333333333}{2}\right)}} - \sqrt{\sqrt[3]{x}}\right) \]
      12. metadata-eval3.2%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{\color{blue}{0.16666666666666666}} - \sqrt{\sqrt[3]{x}}\right) \]
      13. pow1/35.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - \sqrt{\color{blue}{{x}^{0.3333333333333333}}}\right) \]
      14. sqrt-pow15.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - \color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}\right) \]
      15. metadata-eval5.7%

        \[\leadsto \left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - {x}^{\color{blue}{0.16666666666666666}}\right) \]
    4. Applied egg-rr5.7%

      \[\leadsto \color{blue}{\left({\left(x + 1\right)}^{0.16666666666666666} + {x}^{0.16666666666666666}\right) \cdot \left({\left(x + 1\right)}^{0.16666666666666666} - {x}^{0.16666666666666666}\right)} \]
    5. Taylor expanded in x around inf 99.1%

      \[\leadsto \color{blue}{\frac{-0.1388888888888889 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + \left(0.027777777777777776 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{x}\right)}{x}} \]
    6. Step-by-step derivation
      1. associate-+r+99.1%

        \[\leadsto \frac{\color{blue}{\left(-0.1388888888888889 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.027777777777777776 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) + 0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
      2. distribute-rgt-out99.1%

        \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot \left(-0.1388888888888889 + 0.027777777777777776\right)} + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
      3. metadata-eval99.1%

        \[\leadsto \frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{-0.1111111111111111} + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
    7. Simplified99.1%

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{1}{{x}^{2}}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \sqrt[3]{x}}{x}} \]
    8. Step-by-step derivation
      1. pow1/399.1%

        \[\leadsto \frac{\color{blue}{{\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
      2. pow-flip99.1%

        \[\leadsto \frac{{\color{blue}{\left({x}^{\left(-2\right)}\right)}}^{0.3333333333333333} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
      3. pow-pow99.1%

        \[\leadsto \frac{\color{blue}{{x}^{\left(\left(-2\right) \cdot 0.3333333333333333\right)}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
      4. metadata-eval99.1%

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

        \[\leadsto \frac{{x}^{\color{blue}{-0.6666666666666666}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]
    9. Applied egg-rr99.1%

      \[\leadsto \frac{\color{blue}{{x}^{-0.6666666666666666}} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \sqrt[3]{x}}{x} \]

    if 3.99999999999999982e-6 < (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x))

    1. Initial program 88.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. pow1/388.6%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    4. Applied egg-rr88.6%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    5. Step-by-step derivation
      1. pow1/391.0%

        \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - {x}^{0.3333333333333333} \]
    6. Applied egg-rr91.0%

      \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - {x}^{0.3333333333333333} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 4 \cdot 10^{-6}:\\ \;\;\;\;0 - \frac{\sqrt[3]{x} \cdot \left(-0.3333333333333333\right) + \left(0 - -0.1111111111111111 \cdot {x}^{-0.6666666666666666}\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 65.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 62000000:\\ \;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+193}:\\ \;\;\;\;x \cdot \left(0.3333333333333333 \cdot e^{0.3333333333333333 \cdot \left(-5 \cdot \log x\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1 + \sqrt[3]{x} \cdot \left(1 + \sqrt[3]{x}\right)}\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= x 62000000.0)
   (+ (pow (+ 1.0 x) 0.3333333333333333) (- 0.0 (pow x 0.3333333333333333)))
   (if (<= x 1.35e+154)
     (cbrt (/ 0.037037037037037035 (pow x 2.0)))
     (if (<= x 7.5e+193)
       (*
        x
        (* 0.3333333333333333 (exp (* 0.3333333333333333 (* -5.0 (log x))))))
       (/ 1.0 (+ 1.0 (* (cbrt x) (+ 1.0 (cbrt x)))))))))
double code(double x) {
	double tmp;
	if (x <= 62000000.0) {
		tmp = pow((1.0 + x), 0.3333333333333333) + (0.0 - pow(x, 0.3333333333333333));
	} else if (x <= 1.35e+154) {
		tmp = cbrt((0.037037037037037035 / pow(x, 2.0)));
	} else if (x <= 7.5e+193) {
		tmp = x * (0.3333333333333333 * exp((0.3333333333333333 * (-5.0 * log(x)))));
	} else {
		tmp = 1.0 / (1.0 + (cbrt(x) * (1.0 + cbrt(x))));
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if (x <= 62000000.0) {
		tmp = Math.pow((1.0 + x), 0.3333333333333333) + (0.0 - Math.pow(x, 0.3333333333333333));
	} else if (x <= 1.35e+154) {
		tmp = Math.cbrt((0.037037037037037035 / Math.pow(x, 2.0)));
	} else if (x <= 7.5e+193) {
		tmp = x * (0.3333333333333333 * Math.exp((0.3333333333333333 * (-5.0 * Math.log(x)))));
	} else {
		tmp = 1.0 / (1.0 + (Math.cbrt(x) * (1.0 + Math.cbrt(x))));
	}
	return tmp;
}
function code(x)
	tmp = 0.0
	if (x <= 62000000.0)
		tmp = Float64((Float64(1.0 + x) ^ 0.3333333333333333) + Float64(0.0 - (x ^ 0.3333333333333333)));
	elseif (x <= 1.35e+154)
		tmp = cbrt(Float64(0.037037037037037035 / (x ^ 2.0)));
	elseif (x <= 7.5e+193)
		tmp = Float64(x * Float64(0.3333333333333333 * exp(Float64(0.3333333333333333 * Float64(-5.0 * log(x))))));
	else
		tmp = Float64(1.0 / Float64(1.0 + Float64(cbrt(x) * Float64(1.0 + cbrt(x)))));
	end
	return tmp
end
code[x_] := If[LessEqual[x, 62000000.0], N[(N[Power[N[(1.0 + x), $MachinePrecision], 0.3333333333333333], $MachinePrecision] + N[(0.0 - N[Power[x, 0.3333333333333333], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e+154], N[Power[N[(0.037037037037037035 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], If[LessEqual[x, 7.5e+193], N[(x * N[(0.3333333333333333 * N[Exp[N[(0.3333333333333333 * N[(-5.0 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 + N[(N[Power[x, 1/3], $MachinePrecision] * N[(1.0 + N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 62000000:\\
\;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\

\mathbf{elif}\;x \leq 7.5 \cdot 10^{+193}:\\
\;\;\;\;x \cdot \left(0.3333333333333333 \cdot e^{0.3333333333333333 \cdot \left(-5 \cdot \log x\right)}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < 6.2e7

    1. Initial program 85.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. pow1/385.3%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    4. Applied egg-rr85.3%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    5. Step-by-step derivation
      1. pow1/388.5%

        \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - {x}^{0.3333333333333333} \]
    6. Applied egg-rr88.5%

      \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - {x}^{0.3333333333333333} \]

    if 6.2e7 < x < 1.35000000000000003e154

    1. Initial program 6.4%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube6.4%

        \[\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)}} \]
      2. pow36.4%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(\sqrt[3]{x + 1} - \sqrt[3]{x}\right)}^{3}}} \]
    4. Applied egg-rr6.4%

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

      \[\leadsto \sqrt[3]{\color{blue}{\frac{0.037037037037037035}{{x}^{2}}}} \]

    if 1.35000000000000003e154 < x < 7.5000000000000008e193

    1. Initial program 4.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg4.2%

        \[\leadsto \color{blue}{\sqrt[3]{x + 1} + \left(-\sqrt[3]{x}\right)} \]
      2. +-commutative4.2%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{x}\right) + \sqrt[3]{x + 1}} \]
      3. add-sqr-sqrt3.9%

        \[\leadsto \left(-\color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}}\right) + \sqrt[3]{x + 1} \]
      4. distribute-rgt-neg-in3.9%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\sqrt[3]{x}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right)} \]
      6. pow1/34.7%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      8. metadata-eval4.7%

        \[\leadsto \mathsf{fma}\left({x}^{\color{blue}{0.16666666666666666}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      9. pow1/34.7%

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

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, \sqrt[3]{x + 1}\right) \]
      11. metadata-eval4.7%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{\color{blue}{0.16666666666666666}}, \sqrt[3]{x + 1}\right) \]
    4. Applied egg-rr4.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{0.16666666666666666}, \sqrt[3]{x + 1}\right)} \]
    5. Taylor expanded in x around inf 4.2%

      \[\leadsto \color{blue}{x \cdot \left(\sqrt[3]{\frac{1}{{x}^{2}}} + \left(-1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-+r+4.2%

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

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

        \[\leadsto x \cdot \left(\color{blue}{0} \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      4. mul0-lft4.2%

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

        \[\leadsto x \cdot \color{blue}{\left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    7. Simplified4.2%

      \[\leadsto \color{blue}{x \cdot \left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    8. Step-by-step derivation
      1. pow1/34.2%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{\left(\frac{1}{{x}^{5}}\right)}^{0.3333333333333333}}\right) \]
      2. pow-to-exp4.2%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{e^{\log \left(\frac{1}{{x}^{5}}\right) \cdot 0.3333333333333333}}\right) \]
      3. pow-flip4.2%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot e^{\log \color{blue}{\left({x}^{\left(-5\right)}\right)} \cdot 0.3333333333333333}\right) \]
      4. log-pow86.1%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot e^{\color{blue}{\left(\left(-5\right) \cdot \log x\right)} \cdot 0.3333333333333333}\right) \]
      5. metadata-eval86.1%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot e^{\left(\color{blue}{-5} \cdot \log x\right) \cdot 0.3333333333333333}\right) \]
    9. Applied egg-rr86.1%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{e^{\left(-5 \cdot \log x\right) \cdot 0.3333333333333333}}\right) \]

    if 7.5000000000000008e193 < x

    1. Initial program 5.0%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. pow1/33.7%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
      2. add-sqr-sqrt3.7%

        \[\leadsto \sqrt[3]{x + 1} - {\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}}^{0.3333333333333333} \]
      3. pow23.7%

        \[\leadsto \sqrt[3]{x + 1} - {\color{blue}{\left({\left(\sqrt{x}\right)}^{2}\right)}}^{0.3333333333333333} \]
      4. pow-pow3.7%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{\left(\sqrt{x}\right)}^{\left(2 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval3.7%

        \[\leadsto \sqrt[3]{x + 1} - {\left(\sqrt{x}\right)}^{\color{blue}{0.6666666666666666}} \]
    4. Applied egg-rr3.7%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{\left(\sqrt{x}\right)}^{0.6666666666666666}} \]
    5. Step-by-step derivation
      1. sqrt-pow23.7%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{\left(\frac{0.6666666666666666}{2}\right)}} \]
      2. metadata-eval3.7%

        \[\leadsto \sqrt[3]{x + 1} - {x}^{\color{blue}{0.3333333333333333}} \]
      3. pow1/35.0%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\sqrt[3]{x}} \]
      4. flip3--5.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)}} \]
      5. frac-2neg5.0%

        \[\leadsto \color{blue}{\frac{-\left({\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}\right)}{-\left(\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)\right)}} \]
      6. rem-cube-cbrt3.1%

        \[\leadsto \frac{-\left(\color{blue}{\left(x + 1\right)} - {\left(\sqrt[3]{x}\right)}^{3}\right)}{-\left(\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)\right)} \]
      7. rem-cube-cbrt5.0%

        \[\leadsto \frac{-\left(\left(x + 1\right) - \color{blue}{x}\right)}{-\left(\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)\right)} \]
      8. pow25.0%

        \[\leadsto \frac{-\left(\left(x + 1\right) - x\right)}{-\left(\color{blue}{{\left(\sqrt[3]{x + 1}\right)}^{2}} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)\right)} \]
      9. distribute-rgt-out5.0%

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

      \[\leadsto \color{blue}{\frac{-\left(\left(x + 1\right) - x\right)}{-\left({\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{x + 1}\right)\right)}} \]
    7. Step-by-step derivation
      1. associate--l+5.0%

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

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

        \[\leadsto \frac{-\left(x + \left(1 - x\right)\right)}{-\left({\left(\sqrt[3]{1 + x}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{\color{blue}{1 + x}}\right)\right)} \]
    8. Simplified5.0%

      \[\leadsto \color{blue}{\frac{-\left(x + \left(1 - x\right)\right)}{-\left({\left(\sqrt[3]{1 + x}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)}} \]
    9. Taylor expanded in x around 0 98.4%

      \[\leadsto \frac{-\color{blue}{1}}{-\left({\left(\sqrt[3]{1 + x}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)\right)} \]
    10. Taylor expanded in x around 0 17.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 62000000:\\ \;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+193}:\\ \;\;\;\;x \cdot \left(0.3333333333333333 \cdot e^{0.3333333333333333 \cdot \left(-5 \cdot \log x\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1 + \sqrt[3]{x} \cdot \left(1 + \sqrt[3]{x}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 60.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 62000000:\\ \;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(0.3333333333333333 \cdot e^{0.3333333333333333 \cdot \left(-5 \cdot \log x\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= x 62000000.0)
   (+ (pow (+ 1.0 x) 0.3333333333333333) (- 0.0 (pow x 0.3333333333333333)))
   (if (<= x 1.35e+154)
     (cbrt (/ 0.037037037037037035 (pow x 2.0)))
     (*
      x
      (* 0.3333333333333333 (exp (* 0.3333333333333333 (* -5.0 (log x)))))))))
double code(double x) {
	double tmp;
	if (x <= 62000000.0) {
		tmp = pow((1.0 + x), 0.3333333333333333) + (0.0 - pow(x, 0.3333333333333333));
	} else if (x <= 1.35e+154) {
		tmp = cbrt((0.037037037037037035 / pow(x, 2.0)));
	} else {
		tmp = x * (0.3333333333333333 * exp((0.3333333333333333 * (-5.0 * log(x)))));
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if (x <= 62000000.0) {
		tmp = Math.pow((1.0 + x), 0.3333333333333333) + (0.0 - Math.pow(x, 0.3333333333333333));
	} else if (x <= 1.35e+154) {
		tmp = Math.cbrt((0.037037037037037035 / Math.pow(x, 2.0)));
	} else {
		tmp = x * (0.3333333333333333 * Math.exp((0.3333333333333333 * (-5.0 * Math.log(x)))));
	}
	return tmp;
}
function code(x)
	tmp = 0.0
	if (x <= 62000000.0)
		tmp = Float64((Float64(1.0 + x) ^ 0.3333333333333333) + Float64(0.0 - (x ^ 0.3333333333333333)));
	elseif (x <= 1.35e+154)
		tmp = cbrt(Float64(0.037037037037037035 / (x ^ 2.0)));
	else
		tmp = Float64(x * Float64(0.3333333333333333 * exp(Float64(0.3333333333333333 * Float64(-5.0 * log(x))))));
	end
	return tmp
end
code[x_] := If[LessEqual[x, 62000000.0], N[(N[Power[N[(1.0 + x), $MachinePrecision], 0.3333333333333333], $MachinePrecision] + N[(0.0 - N[Power[x, 0.3333333333333333], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e+154], N[Power[N[(0.037037037037037035 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], N[(x * N[(0.3333333333333333 * N[Exp[N[(0.3333333333333333 * N[(-5.0 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 62000000:\\
\;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.3333333333333333 \cdot e^{0.3333333333333333 \cdot \left(-5 \cdot \log x\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 6.2e7

    1. Initial program 85.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. pow1/385.3%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    4. Applied egg-rr85.3%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    5. Step-by-step derivation
      1. pow1/388.5%

        \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - {x}^{0.3333333333333333} \]
    6. Applied egg-rr88.5%

      \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - {x}^{0.3333333333333333} \]

    if 6.2e7 < x < 1.35000000000000003e154

    1. Initial program 6.4%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube6.4%

        \[\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)}} \]
      2. pow36.4%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(\sqrt[3]{x + 1} - \sqrt[3]{x}\right)}^{3}}} \]
    4. Applied egg-rr6.4%

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

      \[\leadsto \sqrt[3]{\color{blue}{\frac{0.037037037037037035}{{x}^{2}}}} \]

    if 1.35000000000000003e154 < x

    1. Initial program 4.8%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg4.8%

        \[\leadsto \color{blue}{\sqrt[3]{x + 1} + \left(-\sqrt[3]{x}\right)} \]
      2. +-commutative4.8%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{x}\right) + \sqrt[3]{x + 1}} \]
      3. add-sqr-sqrt3.9%

        \[\leadsto \left(-\color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}}\right) + \sqrt[3]{x + 1} \]
      4. distribute-rgt-neg-in3.9%

        \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \left(-\sqrt{\sqrt[3]{x}}\right)} + \sqrt[3]{x + 1} \]
      5. fma-define3.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\sqrt[3]{x}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right)} \]
      6. pow1/33.9%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      8. metadata-eval3.9%

        \[\leadsto \mathsf{fma}\left({x}^{\color{blue}{0.16666666666666666}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      9. pow1/33.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\sqrt{\color{blue}{{x}^{0.3333333333333333}}}, \sqrt[3]{x + 1}\right) \]
      10. sqrt-pow13.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, \sqrt[3]{x + 1}\right) \]
      11. metadata-eval3.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{\color{blue}{0.16666666666666666}}, \sqrt[3]{x + 1}\right) \]
    4. Applied egg-rr3.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{0.16666666666666666}, \sqrt[3]{x + 1}\right)} \]
    5. Taylor expanded in x around inf 4.8%

      \[\leadsto \color{blue}{x \cdot \left(\sqrt[3]{\frac{1}{{x}^{2}}} + \left(-1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-+r+4.8%

        \[\leadsto x \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{1}{{x}^{2}}} + -1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
      2. distribute-rgt1-in4.8%

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

        \[\leadsto x \cdot \left(\color{blue}{0} \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      4. mul0-lft4.8%

        \[\leadsto x \cdot \left(\color{blue}{0} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      5. +-lft-identity4.8%

        \[\leadsto x \cdot \color{blue}{\left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    7. Simplified4.8%

      \[\leadsto \color{blue}{x \cdot \left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    8. Step-by-step derivation
      1. pow1/34.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{\left(\frac{1}{{x}^{5}}\right)}^{0.3333333333333333}}\right) \]
      2. pow-to-exp4.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{e^{\log \left(\frac{1}{{x}^{5}}\right) \cdot 0.3333333333333333}}\right) \]
      3. pow-flip4.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot e^{\log \color{blue}{\left({x}^{\left(-5\right)}\right)} \cdot 0.3333333333333333}\right) \]
      4. log-pow25.9%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot e^{\color{blue}{\left(\left(-5\right) \cdot \log x\right)} \cdot 0.3333333333333333}\right) \]
      5. metadata-eval25.9%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot e^{\left(\color{blue}{-5} \cdot \log x\right) \cdot 0.3333333333333333}\right) \]
    9. Applied egg-rr25.9%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{e^{\left(-5 \cdot \log x\right) \cdot 0.3333333333333333}}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 62000000:\\ \;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(0.3333333333333333 \cdot e^{0.3333333333333333 \cdot \left(-5 \cdot \log x\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 60.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 27000000:\\ \;\;\;\;\sqrt[3]{1 + x} - \sqrt[3]{x}\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= x 27000000.0)
   (- (cbrt (+ 1.0 x)) (cbrt x))
   (if (<= x 1.35e+154)
     (cbrt (/ 0.037037037037037035 (pow x 2.0)))
     (* (- x) (* (pow x -1.6666666666666667) (- 0.3333333333333333))))))
double code(double x) {
	double tmp;
	if (x <= 27000000.0) {
		tmp = cbrt((1.0 + x)) - cbrt(x);
	} else if (x <= 1.35e+154) {
		tmp = cbrt((0.037037037037037035 / pow(x, 2.0)));
	} else {
		tmp = -x * (pow(x, -1.6666666666666667) * -0.3333333333333333);
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if (x <= 27000000.0) {
		tmp = Math.cbrt((1.0 + x)) - Math.cbrt(x);
	} else if (x <= 1.35e+154) {
		tmp = Math.cbrt((0.037037037037037035 / Math.pow(x, 2.0)));
	} else {
		tmp = -x * (Math.pow(x, -1.6666666666666667) * -0.3333333333333333);
	}
	return tmp;
}
function code(x)
	tmp = 0.0
	if (x <= 27000000.0)
		tmp = Float64(cbrt(Float64(1.0 + x)) - cbrt(x));
	elseif (x <= 1.35e+154)
		tmp = cbrt(Float64(0.037037037037037035 / (x ^ 2.0)));
	else
		tmp = Float64(Float64(-x) * Float64((x ^ -1.6666666666666667) * Float64(-0.3333333333333333)));
	end
	return tmp
end
code[x_] := If[LessEqual[x, 27000000.0], N[(N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e+154], N[Power[N[(0.037037037037037035 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], N[((-x) * N[(N[Power[x, -1.6666666666666667], $MachinePrecision] * (-0.3333333333333333)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 27000000:\\
\;\;\;\;\sqrt[3]{1 + x} - \sqrt[3]{x}\\

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 2.7e7

    1. Initial program 88.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing

    if 2.7e7 < x < 1.35000000000000003e154

    1. Initial program 6.9%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube6.9%

        \[\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)}} \]
      2. pow36.9%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(\sqrt[3]{x + 1} - \sqrt[3]{x}\right)}^{3}}} \]
    4. Applied egg-rr6.9%

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

      \[\leadsto \sqrt[3]{\color{blue}{\frac{0.037037037037037035}{{x}^{2}}}} \]

    if 1.35000000000000003e154 < x

    1. Initial program 4.8%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg4.8%

        \[\leadsto \color{blue}{\sqrt[3]{x + 1} + \left(-\sqrt[3]{x}\right)} \]
      2. +-commutative4.8%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{x}\right) + \sqrt[3]{x + 1}} \]
      3. add-sqr-sqrt3.9%

        \[\leadsto \left(-\color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}}\right) + \sqrt[3]{x + 1} \]
      4. distribute-rgt-neg-in3.9%

        \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \left(-\sqrt{\sqrt[3]{x}}\right)} + \sqrt[3]{x + 1} \]
      5. fma-define3.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\sqrt[3]{x}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right)} \]
      6. pow1/33.9%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      8. metadata-eval3.9%

        \[\leadsto \mathsf{fma}\left({x}^{\color{blue}{0.16666666666666666}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      9. pow1/33.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\sqrt{\color{blue}{{x}^{0.3333333333333333}}}, \sqrt[3]{x + 1}\right) \]
      10. sqrt-pow13.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, \sqrt[3]{x + 1}\right) \]
      11. metadata-eval3.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{\color{blue}{0.16666666666666666}}, \sqrt[3]{x + 1}\right) \]
    4. Applied egg-rr3.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{0.16666666666666666}, \sqrt[3]{x + 1}\right)} \]
    5. Taylor expanded in x around inf 4.8%

      \[\leadsto \color{blue}{x \cdot \left(\sqrt[3]{\frac{1}{{x}^{2}}} + \left(-1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-+r+4.8%

        \[\leadsto x \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{1}{{x}^{2}}} + -1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
      2. distribute-rgt1-in4.8%

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

        \[\leadsto x \cdot \left(\color{blue}{0} \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      4. mul0-lft4.8%

        \[\leadsto x \cdot \left(\color{blue}{0} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      5. +-lft-identity4.8%

        \[\leadsto x \cdot \color{blue}{\left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    7. Simplified4.8%

      \[\leadsto \color{blue}{x \cdot \left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    8. Step-by-step derivation
      1. pow1/34.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{\left(\frac{1}{{x}^{5}}\right)}^{0.3333333333333333}}\right) \]
      2. pow-flip4.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {\color{blue}{\left({x}^{\left(-5\right)}\right)}}^{0.3333333333333333}\right) \]
      3. pow-pow25.4%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{x}^{\left(\left(-5\right) \cdot 0.3333333333333333\right)}}\right) \]
      4. metadata-eval25.4%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {x}^{\left(\color{blue}{-5} \cdot 0.3333333333333333\right)}\right) \]
      5. metadata-eval25.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {x}^{\color{blue}{-1.6666666666666667}}\right) \]
    9. Applied egg-rr25.8%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{x}^{-1.6666666666666667}}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 27000000:\\ \;\;\;\;\sqrt[3]{1 + x} - \sqrt[3]{x}\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 60.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 18000000:\\ \;\;\;\;\sqrt[3]{1 + x} + \left(0 - {x}^{0.3333333333333333}\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= x 18000000.0)
   (+ (cbrt (+ 1.0 x)) (- 0.0 (pow x 0.3333333333333333)))
   (if (<= x 1.35e+154)
     (cbrt (/ 0.037037037037037035 (pow x 2.0)))
     (* (- x) (* (pow x -1.6666666666666667) (- 0.3333333333333333))))))
double code(double x) {
	double tmp;
	if (x <= 18000000.0) {
		tmp = cbrt((1.0 + x)) + (0.0 - pow(x, 0.3333333333333333));
	} else if (x <= 1.35e+154) {
		tmp = cbrt((0.037037037037037035 / pow(x, 2.0)));
	} else {
		tmp = -x * (pow(x, -1.6666666666666667) * -0.3333333333333333);
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if (x <= 18000000.0) {
		tmp = Math.cbrt((1.0 + x)) + (0.0 - Math.pow(x, 0.3333333333333333));
	} else if (x <= 1.35e+154) {
		tmp = Math.cbrt((0.037037037037037035 / Math.pow(x, 2.0)));
	} else {
		tmp = -x * (Math.pow(x, -1.6666666666666667) * -0.3333333333333333);
	}
	return tmp;
}
function code(x)
	tmp = 0.0
	if (x <= 18000000.0)
		tmp = Float64(cbrt(Float64(1.0 + x)) + Float64(0.0 - (x ^ 0.3333333333333333)));
	elseif (x <= 1.35e+154)
		tmp = cbrt(Float64(0.037037037037037035 / (x ^ 2.0)));
	else
		tmp = Float64(Float64(-x) * Float64((x ^ -1.6666666666666667) * Float64(-0.3333333333333333)));
	end
	return tmp
end
code[x_] := If[LessEqual[x, 18000000.0], N[(N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.0 - N[Power[x, 0.3333333333333333], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e+154], N[Power[N[(0.037037037037037035 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], N[((-x) * N[(N[Power[x, -1.6666666666666667], $MachinePrecision] * (-0.3333333333333333)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 18000000:\\
\;\;\;\;\sqrt[3]{1 + x} + \left(0 - {x}^{0.3333333333333333}\right)\\

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 1.8e7

    1. Initial program 88.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. pow1/388.6%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    4. Applied egg-rr88.6%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]

    if 1.8e7 < x < 1.35000000000000003e154

    1. Initial program 6.9%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube6.9%

        \[\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)}} \]
      2. pow36.9%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(\sqrt[3]{x + 1} - \sqrt[3]{x}\right)}^{3}}} \]
    4. Applied egg-rr6.9%

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

      \[\leadsto \sqrt[3]{\color{blue}{\frac{0.037037037037037035}{{x}^{2}}}} \]

    if 1.35000000000000003e154 < x

    1. Initial program 4.8%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg4.8%

        \[\leadsto \color{blue}{\sqrt[3]{x + 1} + \left(-\sqrt[3]{x}\right)} \]
      2. +-commutative4.8%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{x}\right) + \sqrt[3]{x + 1}} \]
      3. add-sqr-sqrt3.9%

        \[\leadsto \left(-\color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}}\right) + \sqrt[3]{x + 1} \]
      4. distribute-rgt-neg-in3.9%

        \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \left(-\sqrt{\sqrt[3]{x}}\right)} + \sqrt[3]{x + 1} \]
      5. fma-define3.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\sqrt[3]{x}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right)} \]
      6. pow1/33.9%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      8. metadata-eval3.9%

        \[\leadsto \mathsf{fma}\left({x}^{\color{blue}{0.16666666666666666}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      9. pow1/33.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\sqrt{\color{blue}{{x}^{0.3333333333333333}}}, \sqrt[3]{x + 1}\right) \]
      10. sqrt-pow13.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, \sqrt[3]{x + 1}\right) \]
      11. metadata-eval3.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{\color{blue}{0.16666666666666666}}, \sqrt[3]{x + 1}\right) \]
    4. Applied egg-rr3.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{0.16666666666666666}, \sqrt[3]{x + 1}\right)} \]
    5. Taylor expanded in x around inf 4.8%

      \[\leadsto \color{blue}{x \cdot \left(\sqrt[3]{\frac{1}{{x}^{2}}} + \left(-1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-+r+4.8%

        \[\leadsto x \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{1}{{x}^{2}}} + -1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
      2. distribute-rgt1-in4.8%

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

        \[\leadsto x \cdot \left(\color{blue}{0} \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      4. mul0-lft4.8%

        \[\leadsto x \cdot \left(\color{blue}{0} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      5. +-lft-identity4.8%

        \[\leadsto x \cdot \color{blue}{\left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    7. Simplified4.8%

      \[\leadsto \color{blue}{x \cdot \left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    8. Step-by-step derivation
      1. pow1/34.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{\left(\frac{1}{{x}^{5}}\right)}^{0.3333333333333333}}\right) \]
      2. pow-flip4.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {\color{blue}{\left({x}^{\left(-5\right)}\right)}}^{0.3333333333333333}\right) \]
      3. pow-pow25.4%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{x}^{\left(\left(-5\right) \cdot 0.3333333333333333\right)}}\right) \]
      4. metadata-eval25.4%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {x}^{\left(\color{blue}{-5} \cdot 0.3333333333333333\right)}\right) \]
      5. metadata-eval25.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {x}^{\color{blue}{-1.6666666666666667}}\right) \]
    9. Applied egg-rr25.8%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{x}^{-1.6666666666666667}}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 18000000:\\ \;\;\;\;\sqrt[3]{1 + x} + \left(0 - {x}^{0.3333333333333333}\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 60.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 62000000:\\ \;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= x 62000000.0)
   (+ (pow (+ 1.0 x) 0.3333333333333333) (- 0.0 (pow x 0.3333333333333333)))
   (if (<= x 1.35e+154)
     (cbrt (/ 0.037037037037037035 (pow x 2.0)))
     (* (- x) (* (pow x -1.6666666666666667) (- 0.3333333333333333))))))
double code(double x) {
	double tmp;
	if (x <= 62000000.0) {
		tmp = pow((1.0 + x), 0.3333333333333333) + (0.0 - pow(x, 0.3333333333333333));
	} else if (x <= 1.35e+154) {
		tmp = cbrt((0.037037037037037035 / pow(x, 2.0)));
	} else {
		tmp = -x * (pow(x, -1.6666666666666667) * -0.3333333333333333);
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if (x <= 62000000.0) {
		tmp = Math.pow((1.0 + x), 0.3333333333333333) + (0.0 - Math.pow(x, 0.3333333333333333));
	} else if (x <= 1.35e+154) {
		tmp = Math.cbrt((0.037037037037037035 / Math.pow(x, 2.0)));
	} else {
		tmp = -x * (Math.pow(x, -1.6666666666666667) * -0.3333333333333333);
	}
	return tmp;
}
function code(x)
	tmp = 0.0
	if (x <= 62000000.0)
		tmp = Float64((Float64(1.0 + x) ^ 0.3333333333333333) + Float64(0.0 - (x ^ 0.3333333333333333)));
	elseif (x <= 1.35e+154)
		tmp = cbrt(Float64(0.037037037037037035 / (x ^ 2.0)));
	else
		tmp = Float64(Float64(-x) * Float64((x ^ -1.6666666666666667) * Float64(-0.3333333333333333)));
	end
	return tmp
end
code[x_] := If[LessEqual[x, 62000000.0], N[(N[Power[N[(1.0 + x), $MachinePrecision], 0.3333333333333333], $MachinePrecision] + N[(0.0 - N[Power[x, 0.3333333333333333], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e+154], N[Power[N[(0.037037037037037035 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], N[((-x) * N[(N[Power[x, -1.6666666666666667], $MachinePrecision] * (-0.3333333333333333)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 62000000:\\
\;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 6.2e7

    1. Initial program 85.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. pow1/385.3%

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    4. Applied egg-rr85.3%

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
    5. Step-by-step derivation
      1. pow1/388.5%

        \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - {x}^{0.3333333333333333} \]
    6. Applied egg-rr88.5%

      \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} - {x}^{0.3333333333333333} \]

    if 6.2e7 < x < 1.35000000000000003e154

    1. Initial program 6.4%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube6.4%

        \[\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)}} \]
      2. pow36.4%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(\sqrt[3]{x + 1} - \sqrt[3]{x}\right)}^{3}}} \]
    4. Applied egg-rr6.4%

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

      \[\leadsto \sqrt[3]{\color{blue}{\frac{0.037037037037037035}{{x}^{2}}}} \]

    if 1.35000000000000003e154 < x

    1. Initial program 4.8%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg4.8%

        \[\leadsto \color{blue}{\sqrt[3]{x + 1} + \left(-\sqrt[3]{x}\right)} \]
      2. +-commutative4.8%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{x}\right) + \sqrt[3]{x + 1}} \]
      3. add-sqr-sqrt3.9%

        \[\leadsto \left(-\color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}}\right) + \sqrt[3]{x + 1} \]
      4. distribute-rgt-neg-in3.9%

        \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \left(-\sqrt{\sqrt[3]{x}}\right)} + \sqrt[3]{x + 1} \]
      5. fma-define3.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\sqrt[3]{x}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right)} \]
      6. pow1/33.9%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      8. metadata-eval3.9%

        \[\leadsto \mathsf{fma}\left({x}^{\color{blue}{0.16666666666666666}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      9. pow1/33.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\sqrt{\color{blue}{{x}^{0.3333333333333333}}}, \sqrt[3]{x + 1}\right) \]
      10. sqrt-pow13.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, \sqrt[3]{x + 1}\right) \]
      11. metadata-eval3.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{\color{blue}{0.16666666666666666}}, \sqrt[3]{x + 1}\right) \]
    4. Applied egg-rr3.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{0.16666666666666666}, \sqrt[3]{x + 1}\right)} \]
    5. Taylor expanded in x around inf 4.8%

      \[\leadsto \color{blue}{x \cdot \left(\sqrt[3]{\frac{1}{{x}^{2}}} + \left(-1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-+r+4.8%

        \[\leadsto x \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{1}{{x}^{2}}} + -1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
      2. distribute-rgt1-in4.8%

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

        \[\leadsto x \cdot \left(\color{blue}{0} \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      4. mul0-lft4.8%

        \[\leadsto x \cdot \left(\color{blue}{0} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      5. +-lft-identity4.8%

        \[\leadsto x \cdot \color{blue}{\left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    7. Simplified4.8%

      \[\leadsto \color{blue}{x \cdot \left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    8. Step-by-step derivation
      1. pow1/34.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{\left(\frac{1}{{x}^{5}}\right)}^{0.3333333333333333}}\right) \]
      2. pow-flip4.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {\color{blue}{\left({x}^{\left(-5\right)}\right)}}^{0.3333333333333333}\right) \]
      3. pow-pow25.4%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{x}^{\left(\left(-5\right) \cdot 0.3333333333333333\right)}}\right) \]
      4. metadata-eval25.4%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {x}^{\left(\color{blue}{-5} \cdot 0.3333333333333333\right)}\right) \]
      5. metadata-eval25.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {x}^{\color{blue}{-1.6666666666666667}}\right) \]
    9. Applied egg-rr25.8%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{x}^{-1.6666666666666667}}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 62000000:\\ \;\;\;\;{\left(1 + x\right)}^{0.3333333333333333} + \left(0 - {x}^{0.3333333333333333}\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= x 1.35e+154)
   (cbrt (/ 0.037037037037037035 (pow x 2.0)))
   (* (- x) (* (pow x -1.6666666666666667) (- 0.3333333333333333)))))
double code(double x) {
	double tmp;
	if (x <= 1.35e+154) {
		tmp = cbrt((0.037037037037037035 / pow(x, 2.0)));
	} else {
		tmp = -x * (pow(x, -1.6666666666666667) * -0.3333333333333333);
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if (x <= 1.35e+154) {
		tmp = Math.cbrt((0.037037037037037035 / Math.pow(x, 2.0)));
	} else {
		tmp = -x * (Math.pow(x, -1.6666666666666667) * -0.3333333333333333);
	}
	return tmp;
}
function code(x)
	tmp = 0.0
	if (x <= 1.35e+154)
		tmp = cbrt(Float64(0.037037037037037035 / (x ^ 2.0)));
	else
		tmp = Float64(Float64(-x) * Float64((x ^ -1.6666666666666667) * Float64(-0.3333333333333333)));
	end
	return tmp
end
code[x_] := If[LessEqual[x, 1.35e+154], N[Power[N[(0.037037037037037035 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], N[((-x) * N[(N[Power[x, -1.6666666666666667], $MachinePrecision] * (-0.3333333333333333)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.35000000000000003e154

    1. Initial program 13.0%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube13.0%

        \[\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)}} \]
      2. pow313.0%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(\sqrt[3]{x + 1} - \sqrt[3]{x}\right)}^{3}}} \]
    4. Applied egg-rr13.0%

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

      \[\leadsto \sqrt[3]{\color{blue}{\frac{0.037037037037037035}{{x}^{2}}}} \]

    if 1.35000000000000003e154 < x

    1. Initial program 4.8%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg4.8%

        \[\leadsto \color{blue}{\sqrt[3]{x + 1} + \left(-\sqrt[3]{x}\right)} \]
      2. +-commutative4.8%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{x}\right) + \sqrt[3]{x + 1}} \]
      3. add-sqr-sqrt3.9%

        \[\leadsto \left(-\color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}}\right) + \sqrt[3]{x + 1} \]
      4. distribute-rgt-neg-in3.9%

        \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \left(-\sqrt{\sqrt[3]{x}}\right)} + \sqrt[3]{x + 1} \]
      5. fma-define3.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\sqrt[3]{x}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right)} \]
      6. pow1/33.9%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      8. metadata-eval3.9%

        \[\leadsto \mathsf{fma}\left({x}^{\color{blue}{0.16666666666666666}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
      9. pow1/33.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\sqrt{\color{blue}{{x}^{0.3333333333333333}}}, \sqrt[3]{x + 1}\right) \]
      10. sqrt-pow13.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, \sqrt[3]{x + 1}\right) \]
      11. metadata-eval3.9%

        \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{\color{blue}{0.16666666666666666}}, \sqrt[3]{x + 1}\right) \]
    4. Applied egg-rr3.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{0.16666666666666666}, \sqrt[3]{x + 1}\right)} \]
    5. Taylor expanded in x around inf 4.8%

      \[\leadsto \color{blue}{x \cdot \left(\sqrt[3]{\frac{1}{{x}^{2}}} + \left(-1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\right)} \]
    6. Step-by-step derivation
      1. associate-+r+4.8%

        \[\leadsto x \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{1}{{x}^{2}}} + -1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
      2. distribute-rgt1-in4.8%

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

        \[\leadsto x \cdot \left(\color{blue}{0} \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      4. mul0-lft4.8%

        \[\leadsto x \cdot \left(\color{blue}{0} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
      5. +-lft-identity4.8%

        \[\leadsto x \cdot \color{blue}{\left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    7. Simplified4.8%

      \[\leadsto \color{blue}{x \cdot \left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    8. Step-by-step derivation
      1. pow1/34.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{\left(\frac{1}{{x}^{5}}\right)}^{0.3333333333333333}}\right) \]
      2. pow-flip4.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {\color{blue}{\left({x}^{\left(-5\right)}\right)}}^{0.3333333333333333}\right) \]
      3. pow-pow25.4%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{x}^{\left(\left(-5\right) \cdot 0.3333333333333333\right)}}\right) \]
      4. metadata-eval25.4%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {x}^{\left(\color{blue}{-5} \cdot 0.3333333333333333\right)}\right) \]
      5. metadata-eval25.8%

        \[\leadsto x \cdot \left(0.3333333333333333 \cdot {x}^{\color{blue}{-1.6666666666666667}}\right) \]
    9. Applied egg-rr25.8%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{x}^{-1.6666666666666667}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{0.037037037037037035}{{x}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 55.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right) \end{array} \]
(FPCore (x)
 :precision binary64
 (* (- x) (* (pow x -1.6666666666666667) (- 0.3333333333333333))))
double code(double x) {
	return -x * (pow(x, -1.6666666666666667) * -0.3333333333333333);
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = -x * ((x ** (-1.6666666666666667d0)) * -0.3333333333333333d0)
end function
public static double code(double x) {
	return -x * (Math.pow(x, -1.6666666666666667) * -0.3333333333333333);
}
def code(x):
	return -x * (math.pow(x, -1.6666666666666667) * -0.3333333333333333)
function code(x)
	return Float64(Float64(-x) * Float64((x ^ -1.6666666666666667) * Float64(-0.3333333333333333)))
end
function tmp = code(x)
	tmp = -x * ((x ^ -1.6666666666666667) * -0.3333333333333333);
end
code[x_] := N[((-x) * N[(N[Power[x, -1.6666666666666667], $MachinePrecision] * (-0.3333333333333333)), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right)
\end{array}
Derivation
  1. Initial program 8.6%

    \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. sub-neg8.6%

      \[\leadsto \color{blue}{\sqrt[3]{x + 1} + \left(-\sqrt[3]{x}\right)} \]
    2. +-commutative8.6%

      \[\leadsto \color{blue}{\left(-\sqrt[3]{x}\right) + \sqrt[3]{x + 1}} \]
    3. add-sqr-sqrt8.4%

      \[\leadsto \left(-\color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}}\right) + \sqrt[3]{x + 1} \]
    4. distribute-rgt-neg-in8.4%

      \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \left(-\sqrt{\sqrt[3]{x}}\right)} + \sqrt[3]{x + 1} \]
    5. fma-define8.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\sqrt[3]{x}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right)} \]
    6. pow1/39.4%

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
    8. metadata-eval9.4%

      \[\leadsto \mathsf{fma}\left({x}^{\color{blue}{0.16666666666666666}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
    9. pow1/39.3%

      \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\sqrt{\color{blue}{{x}^{0.3333333333333333}}}, \sqrt[3]{x + 1}\right) \]
    10. sqrt-pow19.3%

      \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, \sqrt[3]{x + 1}\right) \]
    11. metadata-eval9.3%

      \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{\color{blue}{0.16666666666666666}}, \sqrt[3]{x + 1}\right) \]
  4. Applied egg-rr9.3%

    \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{0.16666666666666666}, \sqrt[3]{x + 1}\right)} \]
  5. Taylor expanded in x around inf 6.7%

    \[\leadsto \color{blue}{x \cdot \left(\sqrt[3]{\frac{1}{{x}^{2}}} + \left(-1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\right)} \]
  6. Step-by-step derivation
    1. associate-+r+20.0%

      \[\leadsto x \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{1}{{x}^{2}}} + -1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
    2. distribute-rgt1-in20.0%

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

      \[\leadsto x \cdot \left(\color{blue}{0} \cdot \sqrt[3]{\frac{1}{{x}^{2}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
    4. mul0-lft20.0%

      \[\leadsto x \cdot \left(\color{blue}{0} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) \]
    5. +-lft-identity20.0%

      \[\leadsto x \cdot \color{blue}{\left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
  7. Simplified20.0%

    \[\leadsto \color{blue}{x \cdot \left(0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)} \]
  8. Step-by-step derivation
    1. pow1/319.0%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{\left(\frac{1}{{x}^{5}}\right)}^{0.3333333333333333}}\right) \]
    2. pow-flip19.7%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot {\color{blue}{\left({x}^{\left(-5\right)}\right)}}^{0.3333333333333333}\right) \]
    3. pow-pow52.5%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{x}^{\left(\left(-5\right) \cdot 0.3333333333333333\right)}}\right) \]
    4. metadata-eval52.5%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot {x}^{\left(\color{blue}{-5} \cdot 0.3333333333333333\right)}\right) \]
    5. metadata-eval53.3%

      \[\leadsto x \cdot \left(0.3333333333333333 \cdot {x}^{\color{blue}{-1.6666666666666667}}\right) \]
  9. Applied egg-rr53.3%

    \[\leadsto x \cdot \left(0.3333333333333333 \cdot \color{blue}{{x}^{-1.6666666666666667}}\right) \]
  10. Final simplification53.3%

    \[\leadsto \left(-x\right) \cdot \left({x}^{-1.6666666666666667} \cdot \left(-0.3333333333333333\right)\right) \]
  11. Add Preprocessing

Alternative 13: 5.4% accurate, 2.0× speedup?

\[\begin{array}{l} \\ 1 + \sqrt[3]{x} \end{array} \]
(FPCore (x) :precision binary64 (+ 1.0 (cbrt x)))
double code(double x) {
	return 1.0 + cbrt(x);
}
public static double code(double x) {
	return 1.0 + Math.cbrt(x);
}
function code(x)
	return Float64(1.0 + cbrt(x))
end
code[x_] := N[(1.0 + N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
1 + \sqrt[3]{x}
\end{array}
Derivation
  1. Initial program 8.6%

    \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0 1.8%

    \[\leadsto \color{blue}{1 - \sqrt[3]{x}} \]
  4. Step-by-step derivation
    1. sub-neg1.8%

      \[\leadsto \color{blue}{1 + \left(-\sqrt[3]{x}\right)} \]
    2. rem-square-sqrt0.0%

      \[\leadsto 1 + \color{blue}{\sqrt{-\sqrt[3]{x}} \cdot \sqrt{-\sqrt[3]{x}}} \]
    3. fabs-sqr0.0%

      \[\leadsto 1 + \color{blue}{\left|\sqrt{-\sqrt[3]{x}} \cdot \sqrt{-\sqrt[3]{x}}\right|} \]
    4. rem-square-sqrt5.4%

      \[\leadsto 1 + \left|\color{blue}{-\sqrt[3]{x}}\right| \]
    5. fabs-neg5.4%

      \[\leadsto 1 + \color{blue}{\left|\sqrt[3]{x}\right|} \]
    6. unpow1/35.4%

      \[\leadsto 1 + \left|\color{blue}{{x}^{0.3333333333333333}}\right| \]
    7. metadata-eval5.4%

      \[\leadsto 1 + \left|{x}^{\color{blue}{\left(2 \cdot 0.16666666666666666\right)}}\right| \]
    8. pow-sqr5.4%

      \[\leadsto 1 + \left|\color{blue}{{x}^{0.16666666666666666} \cdot {x}^{0.16666666666666666}}\right| \]
    9. fabs-sqr5.4%

      \[\leadsto 1 + \color{blue}{{x}^{0.16666666666666666} \cdot {x}^{0.16666666666666666}} \]
    10. pow-sqr5.4%

      \[\leadsto 1 + \color{blue}{{x}^{\left(2 \cdot 0.16666666666666666\right)}} \]
    11. metadata-eval5.4%

      \[\leadsto 1 + {x}^{\color{blue}{0.3333333333333333}} \]
    12. unpow1/35.4%

      \[\leadsto 1 + \color{blue}{\sqrt[3]{x}} \]
  5. Simplified5.4%

    \[\leadsto \color{blue}{1 + \sqrt[3]{x}} \]
  6. Final simplification5.4%

    \[\leadsto 1 + \sqrt[3]{x} \]
  7. Add Preprocessing

Alternative 14: 4.1% accurate, 205.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x) :precision binary64 0.0)
double code(double x) {
	return 0.0;
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = 0.0d0
end function
public static double code(double x) {
	return 0.0;
}
def code(x):
	return 0.0
function code(x)
	return 0.0
end
function tmp = code(x)
	tmp = 0.0;
end
code[x_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 8.6%

    \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. sub-neg8.6%

      \[\leadsto \color{blue}{\sqrt[3]{x + 1} + \left(-\sqrt[3]{x}\right)} \]
    2. +-commutative8.6%

      \[\leadsto \color{blue}{\left(-\sqrt[3]{x}\right) + \sqrt[3]{x + 1}} \]
    3. add-sqr-sqrt8.4%

      \[\leadsto \left(-\color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}}\right) + \sqrt[3]{x + 1} \]
    4. distribute-rgt-neg-in8.4%

      \[\leadsto \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \left(-\sqrt{\sqrt[3]{x}}\right)} + \sqrt[3]{x + 1} \]
    5. fma-define8.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{\sqrt[3]{x}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right)} \]
    6. pow1/39.4%

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
    8. metadata-eval9.4%

      \[\leadsto \mathsf{fma}\left({x}^{\color{blue}{0.16666666666666666}}, -\sqrt{\sqrt[3]{x}}, \sqrt[3]{x + 1}\right) \]
    9. pow1/39.3%

      \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\sqrt{\color{blue}{{x}^{0.3333333333333333}}}, \sqrt[3]{x + 1}\right) \]
    10. sqrt-pow19.3%

      \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -\color{blue}{{x}^{\left(\frac{0.3333333333333333}{2}\right)}}, \sqrt[3]{x + 1}\right) \]
    11. metadata-eval9.3%

      \[\leadsto \mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{\color{blue}{0.16666666666666666}}, \sqrt[3]{x + 1}\right) \]
  4. Applied egg-rr9.3%

    \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{0.16666666666666666}, -{x}^{0.16666666666666666}, \sqrt[3]{x + 1}\right)} \]
  5. Taylor expanded in x around inf 4.2%

    \[\leadsto \color{blue}{x \cdot \left(\sqrt[3]{\frac{1}{{x}^{2}}} + -1 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right)} \]
  6. Step-by-step derivation
    1. distribute-rgt1-in4.2%

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

      \[\leadsto x \cdot \left(\color{blue}{0} \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\right) \]
    3. mul0-lft4.2%

      \[\leadsto x \cdot \color{blue}{0} \]
    4. mul0-rgt4.2%

      \[\leadsto \color{blue}{0} \]
  7. Simplified4.2%

    \[\leadsto \color{blue}{0} \]
  8. Final simplification4.2%

    \[\leadsto 0 \]
  9. Add Preprocessing

Developer target: 98.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{x + 1}\\ \frac{1}{\left(t\_0 \cdot t\_0 + \sqrt[3]{x} \cdot t\_0\right) + \sqrt[3]{x} \cdot \sqrt[3]{x}} \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (cbrt (+ x 1.0))))
   (/ 1.0 (+ (+ (* t_0 t_0) (* (cbrt x) t_0)) (* (cbrt x) (cbrt x))))))
double code(double x) {
	double t_0 = cbrt((x + 1.0));
	return 1.0 / (((t_0 * t_0) + (cbrt(x) * t_0)) + (cbrt(x) * cbrt(x)));
}
public static double code(double x) {
	double t_0 = Math.cbrt((x + 1.0));
	return 1.0 / (((t_0 * t_0) + (Math.cbrt(x) * t_0)) + (Math.cbrt(x) * Math.cbrt(x)));
}
function code(x)
	t_0 = cbrt(Float64(x + 1.0))
	return Float64(1.0 / Float64(Float64(Float64(t_0 * t_0) + Float64(cbrt(x) * t_0)) + Float64(cbrt(x) * cbrt(x))))
end
code[x_] := Block[{t$95$0 = N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision]}, N[(1.0 / N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] + N[(N[Power[x, 1/3], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[Power[x, 1/3], $MachinePrecision] * N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt[3]{x + 1}\\
\frac{1}{\left(t\_0 \cdot t\_0 + \sqrt[3]{x} \cdot t\_0\right) + \sqrt[3]{x} \cdot \sqrt[3]{x}}
\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024077 
(FPCore (x)
  :name "2cbrt (problem 3.3.4)"
  :precision binary64
  :pre (and (> x 1.0) (< x 1e+308))

  :alt
  (/ 1.0 (+ (+ (* (cbrt (+ x 1.0)) (cbrt (+ x 1.0))) (* (cbrt x) (cbrt (+ x 1.0)))) (* (cbrt x) (cbrt x))))

  (- (cbrt (+ x 1.0)) (cbrt x)))