2cbrt (problem 3.3.4)

Percentage Accurate: 53.0% → 99.2%
Time: 10.8s
Alternatives: 9
Speedup: 1.0×

Specification

?
\[\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 9 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: 53.0% 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.2% accurate, 0.4× speedup?

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

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

    \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  2. Step-by-step derivation
    1. add-exp-log53.7%

      \[\leadsto \color{blue}{e^{\log \left(\sqrt[3]{x + 1}\right)}} - \sqrt[3]{x} \]
    2. pow1/353.5%

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

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

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

      \[\leadsto e^{0.3333333333333333 \cdot \color{blue}{\mathsf{log1p}\left(x\right)}} - \sqrt[3]{x} \]
  3. Applied egg-rr53.5%

    \[\leadsto \color{blue}{e^{0.3333333333333333 \cdot \mathsf{log1p}\left(x\right)}} - \sqrt[3]{x} \]
  4. Step-by-step derivation
    1. *-commutative53.5%

      \[\leadsto e^{\color{blue}{\mathsf{log1p}\left(x\right) \cdot 0.3333333333333333}} - \sqrt[3]{x} \]
    2. exp-prod53.4%

      \[\leadsto \color{blue}{{\left(e^{\mathsf{log1p}\left(x\right)}\right)}^{0.3333333333333333}} - \sqrt[3]{x} \]
    3. unpow1/353.8%

      \[\leadsto \color{blue}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}} - \sqrt[3]{x} \]
  5. Simplified53.8%

    \[\leadsto \color{blue}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}} - \sqrt[3]{x} \]
  6. Step-by-step derivation
    1. pow1/326.2%

      \[\leadsto \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} - \color{blue}{{x}^{0.3333333333333333}} \]
  7. Applied egg-rr26.2%

    \[\leadsto \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} - \color{blue}{{x}^{0.3333333333333333}} \]
  8. Step-by-step derivation
    1. pow1/353.8%

      \[\leadsto \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} - \color{blue}{\sqrt[3]{x}} \]
    2. flip3--53.7%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{x}\right)}} \]
    3. div-inv53.7%

      \[\leadsto \color{blue}{\left({\left(\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}\right) \cdot \frac{1}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{x}\right)}} \]
    4. rem-cube-cbrt53.7%

      \[\leadsto \left(\color{blue}{e^{\mathsf{log1p}\left(x\right)}} - {\left(\sqrt[3]{x}\right)}^{3}\right) \cdot \frac{1}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{x}\right)} \]
    5. log1p-udef53.7%

      \[\leadsto \left(e^{\color{blue}{\log \left(1 + x\right)}} - {\left(\sqrt[3]{x}\right)}^{3}\right) \cdot \frac{1}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{x}\right)} \]
    6. add-exp-log53.5%

      \[\leadsto \left(\color{blue}{\left(1 + x\right)} - {\left(\sqrt[3]{x}\right)}^{3}\right) \cdot \frac{1}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{x}\right)} \]
    7. rem-cube-cbrt54.0%

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

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

      \[\leadsto \left(\left(1 + x\right) - x\right) \cdot \frac{1}{{\left(\sqrt[3]{e^{\color{blue}{\log \left(1 + x\right)}}}\right)}^{2} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{x}\right)} \]
    10. add-exp-log54.0%

      \[\leadsto \left(\left(1 + x\right) - x\right) \cdot \frac{1}{{\left(\sqrt[3]{\color{blue}{1 + x}}\right)}^{2} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \cdot \sqrt[3]{x}\right)} \]
    11. distribute-rgt-out54.0%

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

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

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

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

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

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

Alternative 2: 73.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{1 + x}\\ \mathbf{if}\;t_0 - \sqrt[3]{x} \leq 0:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, t_0 + \sqrt[3]{x}, \sqrt[3]{x \cdot x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\log \left(e^{-\sqrt[3]{x}} \cdot e^{t_0}\right)\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (cbrt (+ 1.0 x))))
   (if (<= (- t_0 (cbrt x)) 0.0)
     (/ 1.0 (fma (cbrt x) (+ t_0 (cbrt x)) (cbrt (* x x))))
     (log (* (exp (- (cbrt x))) (exp t_0))))))
double code(double x) {
	double t_0 = cbrt((1.0 + x));
	double tmp;
	if ((t_0 - cbrt(x)) <= 0.0) {
		tmp = 1.0 / fma(cbrt(x), (t_0 + cbrt(x)), cbrt((x * x)));
	} else {
		tmp = log((exp(-cbrt(x)) * exp(t_0)));
	}
	return tmp;
}
function code(x)
	t_0 = cbrt(Float64(1.0 + x))
	tmp = 0.0
	if (Float64(t_0 - cbrt(x)) <= 0.0)
		tmp = Float64(1.0 / fma(cbrt(x), Float64(t_0 + cbrt(x)), cbrt(Float64(x * x))));
	else
		tmp = log(Float64(exp(Float64(-cbrt(x))) * exp(t_0)));
	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], 0.0], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(t$95$0 + N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision] + N[Power[N[(x * x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[(N[Exp[(-N[Power[x, 1/3], $MachinePrecision])], $MachinePrecision] * N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\mathbf{if}\;t_0 - \sqrt[3]{x} \leq 0:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, t_0 + \sqrt[3]{x}, \sqrt[3]{x \cdot x}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (cbrt.f64 (+.f64 x 1)) (cbrt.f64 x)) < 0.0

    1. Initial program 4.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. flip3--4.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{\color{blue}{1 + x}} + \sqrt[3]{x}, \sqrt[3]{{\left(x + 1\right)}^{2}}\right)} \]
      10. +-commutative47.5%

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{{\color{blue}{\left(1 + x\right)}}^{2}}\right)} \]
    5. Simplified47.5%

      \[\leadsto \color{blue}{\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{{\left(1 + x\right)}^{2}}\right)}} \]
    6. Step-by-step derivation
      1. pow1/345.3%

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

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{{\left(1 + x\right)}^{0.6666666666666666}}\right)} \]
    8. Taylor expanded in x around inf 45.3%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{{\left({x}^{2}\right)}^{0.3333333333333333}}\right)} \]
    9. Step-by-step derivation
      1. unpow245.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\color{blue}{\left(x \cdot x\right)}}^{0.3333333333333333}\right)} \]
      2. unpow1/347.5%

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{\sqrt[3]{x \cdot x}}\right)} \]
    10. Simplified47.5%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{\sqrt[3]{x \cdot x}}\right)} \]

    if 0.0 < (-.f64 (cbrt.f64 (+.f64 x 1)) (cbrt.f64 x))

    1. Initial program 99.1%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. add-exp-log97.5%

        \[\leadsto \color{blue}{e^{\log \left(\sqrt[3]{x + 1}\right)}} - \sqrt[3]{x} \]
      2. pow1/397.5%

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

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

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

        \[\leadsto e^{0.3333333333333333 \cdot \color{blue}{\mathsf{log1p}\left(x\right)}} - \sqrt[3]{x} \]
    3. Applied egg-rr97.5%

      \[\leadsto \color{blue}{e^{0.3333333333333333 \cdot \mathsf{log1p}\left(x\right)}} - \sqrt[3]{x} \]
    4. Step-by-step derivation
      1. *-commutative97.5%

        \[\leadsto e^{\color{blue}{\mathsf{log1p}\left(x\right) \cdot 0.3333333333333333}} - \sqrt[3]{x} \]
      2. exp-prod97.5%

        \[\leadsto \color{blue}{{\left(e^{\mathsf{log1p}\left(x\right)}\right)}^{0.3333333333333333}} - \sqrt[3]{x} \]
      3. unpow1/397.5%

        \[\leadsto \color{blue}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}} - \sqrt[3]{x} \]
    5. Simplified97.5%

      \[\leadsto \color{blue}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}} - \sqrt[3]{x} \]
    6. Step-by-step derivation
      1. pow1/346.4%

        \[\leadsto \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} - \color{blue}{{x}^{0.3333333333333333}} \]
    7. Applied egg-rr46.4%

      \[\leadsto \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} - \color{blue}{{x}^{0.3333333333333333}} \]
    8. Step-by-step derivation
      1. pow1/397.5%

        \[\leadsto \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} - \color{blue}{\sqrt[3]{x}} \]
      2. sub-neg97.5%

        \[\leadsto \color{blue}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} + \left(-\sqrt[3]{x}\right)} \]
      3. +-commutative97.5%

        \[\leadsto \color{blue}{\left(-\sqrt[3]{x}\right) + \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}} \]
      4. add-log-exp97.5%

        \[\leadsto \color{blue}{\log \left(e^{-\sqrt[3]{x}}\right)} + \sqrt[3]{e^{\mathsf{log1p}\left(x\right)}} \]
      5. add-log-exp97.5%

        \[\leadsto \log \left(e^{-\sqrt[3]{x}}\right) + \color{blue}{\log \left(e^{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}}\right)} \]
      6. sum-log97.5%

        \[\leadsto \color{blue}{\log \left(e^{-\sqrt[3]{x}} \cdot e^{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}}\right)} \]
      7. log1p-udef97.5%

        \[\leadsto \log \left(e^{-\sqrt[3]{x}} \cdot e^{\sqrt[3]{e^{\color{blue}{\log \left(1 + x\right)}}}}\right) \]
      8. add-exp-log99.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \leq 0:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{x \cdot x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\log \left(e^{-\sqrt[3]{x}} \cdot e^{\sqrt[3]{1 + x}}\right)\\ \end{array} \]

Alternative 3: 87.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{1 + x} + \sqrt[3]{x}\\ \mathbf{if}\;x \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, t_0, 1\right)}\\ \mathbf{elif}\;x \leq -1:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, t_0, \sqrt[3]{x \cdot x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, t_0, {\left(1 + x\right)}^{0.6666666666666666}\right)}\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (+ (cbrt (+ 1.0 x)) (cbrt x))))
   (if (<= x -1.35e+154)
     (/ 1.0 (fma (cbrt x) t_0 1.0))
     (if (<= x -1.0)
       (/ 1.0 (fma (cbrt x) t_0 (cbrt (* x x))))
       (/ 1.0 (fma (cbrt x) t_0 (pow (+ 1.0 x) 0.6666666666666666)))))))
double code(double x) {
	double t_0 = cbrt((1.0 + x)) + cbrt(x);
	double tmp;
	if (x <= -1.35e+154) {
		tmp = 1.0 / fma(cbrt(x), t_0, 1.0);
	} else if (x <= -1.0) {
		tmp = 1.0 / fma(cbrt(x), t_0, cbrt((x * x)));
	} else {
		tmp = 1.0 / fma(cbrt(x), t_0, pow((1.0 + x), 0.6666666666666666));
	}
	return tmp;
}
function code(x)
	t_0 = Float64(cbrt(Float64(1.0 + x)) + cbrt(x))
	tmp = 0.0
	if (x <= -1.35e+154)
		tmp = Float64(1.0 / fma(cbrt(x), t_0, 1.0));
	elseif (x <= -1.0)
		tmp = Float64(1.0 / fma(cbrt(x), t_0, cbrt(Float64(x * x))));
	else
		tmp = Float64(1.0 / fma(cbrt(x), t_0, (Float64(1.0 + x) ^ 0.6666666666666666)));
	end
	return tmp
end
code[x_] := Block[{t$95$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[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.0], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * t$95$0 + N[Power[N[(x * x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * t$95$0 + N[Power[N[(1.0 + x), $MachinePrecision], 0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x} + \sqrt[3]{x}\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, t_0, 1\right)}\\

\mathbf{elif}\;x \leq -1:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, t_0, \sqrt[3]{x \cdot x}\right)}\\

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


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

    1. Initial program 4.8%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. flip3--4.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)}} \]
      2. div-inv4.8%

        \[\leadsto \color{blue}{\left({\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}\right) \cdot \frac{1}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)}} \]
      3. rem-cube-cbrt3.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{{\color{blue}{\left(1 + x\right)}}^{2}}\right)} \]
    5. Simplified4.8%

      \[\leadsto \color{blue}{\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{{\left(1 + x\right)}^{2}}\right)}} \]
    6. Taylor expanded in x around 0 20.0%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{1}\right)} \]

    if -1.35000000000000003e154 < x < -1

    1. Initial program 9.4%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. flip3--9.5%

        \[\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)}} \]
      2. div-inv9.5%

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

        \[\leadsto \left(\color{blue}{\left(x + 1\right)} - {\left(\sqrt[3]{x}\right)}^{3}\right) \cdot \frac{1}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)} \]
      4. rem-cube-cbrt11.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(x + 1\right) - x\right) \cdot \frac{1}{\sqrt[3]{{\left(x + 1\right)}^{2}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/11.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{{\color{blue}{\left(1 + x\right)}}^{2}}\right)} \]
    5. Simplified99.2%

      \[\leadsto \color{blue}{\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{{\left(1 + x\right)}^{2}}\right)}} \]
    6. Step-by-step derivation
      1. pow1/394.7%

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(1 + x\right)}^{\color{blue}{0.6666666666666666}}\right)} \]
    7. Applied egg-rr0.0%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{{\left(1 + x\right)}^{0.6666666666666666}}\right)} \]
    8. Taylor expanded in x around inf 90.3%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{{\left({x}^{2}\right)}^{0.3333333333333333}}\right)} \]
    9. Step-by-step derivation
      1. unpow290.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\color{blue}{\left(x \cdot x\right)}}^{0.3333333333333333}\right)} \]
      2. unpow1/394.8%

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{\sqrt[3]{x \cdot x}}\right)} \]
    10. Simplified94.8%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{\sqrt[3]{x \cdot x}}\right)} \]

    if -1 < x

    1. Initial program 72.6%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. flip3--72.5%

        \[\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)}} \]
      2. div-inv72.5%

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

        \[\leadsto \left(\color{blue}{\left(x + 1\right)} - {\left(\sqrt[3]{x}\right)}^{3}\right) \cdot \frac{1}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)} \]
      4. rem-cube-cbrt72.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(x + 1\right) - x\right) \cdot \frac{1}{\sqrt[3]{{\left(x + 1\right)}^{2}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/72.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{{\color{blue}{\left(1 + x\right)}}^{2}}\right)} \]
    5. Simplified82.2%

      \[\leadsto \color{blue}{\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{{\left(1 + x\right)}^{2}}\right)}} \]
    6. Step-by-step derivation
      1. pow1/381.8%

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(1 + x\right)}^{\color{blue}{0.6666666666666666}}\right)} \]
    7. Applied egg-rr97.8%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{{\left(1 + x\right)}^{0.6666666666666666}}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, 1\right)}\\ \mathbf{elif}\;x \leq -1:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{x \cdot x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(1 + x\right)}^{0.6666666666666666}\right)}\\ \end{array} \]

Alternative 4: 58.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, 1\right)} \end{array} \]
(FPCore (x)
 :precision binary64
 (/ 1.0 (fma (cbrt x) (+ (cbrt (+ 1.0 x)) (cbrt x)) 1.0)))
double code(double x) {
	return 1.0 / fma(cbrt(x), (cbrt((1.0 + x)) + cbrt(x)), 1.0);
}
function code(x)
	return Float64(1.0 / fma(cbrt(x), Float64(cbrt(Float64(1.0 + x)) + cbrt(x)), 1.0))
end
code[x_] := N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, 1\right)}
\end{array}
Derivation
  1. Initial program 55.8%

    \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  2. Step-by-step derivation
    1. flip3--55.7%

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

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

      \[\leadsto \left(\color{blue}{\left(x + 1\right)} - {\left(\sqrt[3]{x}\right)}^{3}\right) \cdot \frac{1}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)} \]
    4. rem-cube-cbrt56.1%

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(x + 1\right) - x\right) \cdot \frac{1}{\sqrt[3]{{\left(x + 1\right)}^{2}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}} \]
  4. Step-by-step derivation
    1. associate-*r/56.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{{\color{blue}{\left(1 + x\right)}}^{2}}\right)} \]
  5. Simplified75.9%

    \[\leadsto \color{blue}{\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{{\left(1 + x\right)}^{2}}\right)}} \]
  6. Taylor expanded in x around 0 61.4%

    \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{1}\right)} \]
  7. Final simplification61.4%

    \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, 1\right)} \]

Alternative 5: 53.0% accurate, 1.0× speedup?

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

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

    \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  2. Step-by-step derivation
    1. add-exp-log53.7%

      \[\leadsto \color{blue}{e^{\log \left(\sqrt[3]{x + 1}\right)}} - \sqrt[3]{x} \]
    2. pow1/353.5%

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

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

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

      \[\leadsto e^{0.3333333333333333 \cdot \color{blue}{\mathsf{log1p}\left(x\right)}} - \sqrt[3]{x} \]
  3. Applied egg-rr53.5%

    \[\leadsto \color{blue}{e^{0.3333333333333333 \cdot \mathsf{log1p}\left(x\right)}} - \sqrt[3]{x} \]
  4. Step-by-step derivation
    1. *-commutative53.5%

      \[\leadsto e^{\color{blue}{\mathsf{log1p}\left(x\right) \cdot 0.3333333333333333}} - \sqrt[3]{x} \]
    2. exp-prod53.4%

      \[\leadsto \color{blue}{{\left(e^{\mathsf{log1p}\left(x\right)}\right)}^{0.3333333333333333}} - \sqrt[3]{x} \]
    3. unpow1/353.8%

      \[\leadsto \color{blue}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}} - \sqrt[3]{x} \]
  5. Simplified53.8%

    \[\leadsto \color{blue}{\sqrt[3]{e^{\mathsf{log1p}\left(x\right)}}} - \sqrt[3]{x} \]
  6. Step-by-step derivation
    1. log1p-udef53.8%

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

      \[\leadsto \sqrt[3]{e^{\log \color{blue}{\left(x + 1\right)}}} - \sqrt[3]{x} \]
    3. add-exp-log55.8%

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

      \[\leadsto \sqrt[3]{\color{blue}{\frac{x \cdot x - 1 \cdot 1}{x - 1}}} - \sqrt[3]{x} \]
    5. metadata-eval55.0%

      \[\leadsto \sqrt[3]{\frac{x \cdot x - \color{blue}{1}}{x - 1}} - \sqrt[3]{x} \]
    6. div-sub55.0%

      \[\leadsto \sqrt[3]{\color{blue}{\frac{x \cdot x}{x - 1} - \frac{1}{x - 1}}} - \sqrt[3]{x} \]
    7. sub-neg55.0%

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

      \[\leadsto \sqrt[3]{\frac{x \cdot x}{x + \color{blue}{-1}} - \frac{1}{x - 1}} - \sqrt[3]{x} \]
    9. sub-neg55.0%

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

      \[\leadsto \sqrt[3]{\frac{x \cdot x}{x + -1} - \frac{1}{x + \color{blue}{-1}}} - \sqrt[3]{x} \]
  7. Applied egg-rr55.0%

    \[\leadsto \sqrt[3]{\color{blue}{\frac{x \cdot x}{x + -1} - \frac{1}{x + -1}}} - \sqrt[3]{x} \]
  8. Step-by-step derivation
    1. associate-/l*55.8%

      \[\leadsto \sqrt[3]{\color{blue}{\frac{x}{\frac{x + -1}{x}}} - \frac{1}{x + -1}} - \sqrt[3]{x} \]
  9. Simplified55.8%

    \[\leadsto \sqrt[3]{\color{blue}{\frac{x}{\frac{x + -1}{x}} - \frac{1}{x + -1}}} - \sqrt[3]{x} \]
  10. Final simplification55.8%

    \[\leadsto \sqrt[3]{\frac{x}{\frac{x + -1}{x}} + \frac{-1}{x + -1}} - \sqrt[3]{x} \]

Alternative 6: 53.0% accurate, 1.0× speedup?

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

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

    \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  2. Final simplification55.8%

    \[\leadsto \sqrt[3]{1 + x} - \sqrt[3]{x} \]

Alternative 7: 50.6% accurate, 1.9× speedup?

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

\\
1 + \left(x \cdot 0.3333333333333333 - \sqrt[3]{x}\right)
\end{array}
Derivation
  1. Initial program 55.8%

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

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

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

      \[\leadsto \left(1 + \left(0.3333333333333333 \cdot x + -0.1111111111111111 \cdot \color{blue}{\left(x \cdot x\right)}\right)\right) - \sqrt[3]{x} \]
    3. associate-*r*53.2%

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

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

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

    \[\leadsto \color{blue}{\left(1 + x \cdot \left(0.3333333333333333 + x \cdot -0.1111111111111111\right)\right)} - \sqrt[3]{x} \]
  5. Taylor expanded in x around 0 53.8%

    \[\leadsto \left(1 + \color{blue}{0.3333333333333333 \cdot x}\right) - \sqrt[3]{x} \]
  6. Step-by-step derivation
    1. *-commutative53.8%

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

    \[\leadsto \left(1 + \color{blue}{x \cdot 0.3333333333333333}\right) - \sqrt[3]{x} \]
  8. Step-by-step derivation
    1. associate--l+53.8%

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

      \[\leadsto \color{blue}{\left(x \cdot 0.3333333333333333 - \sqrt[3]{x}\right) + 1} \]
  9. Applied egg-rr53.8%

    \[\leadsto \color{blue}{\left(x \cdot 0.3333333333333333 - \sqrt[3]{x}\right) + 1} \]
  10. Final simplification53.8%

    \[\leadsto 1 + \left(x \cdot 0.3333333333333333 - \sqrt[3]{x}\right) \]

Alternative 8: 3.7% 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 55.8%

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

    \[\leadsto \color{blue}{0} \]
  3. Final simplification3.6%

    \[\leadsto 0 \]

Alternative 9: 49.7% accurate, 205.0× speedup?

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

\\
1
\end{array}
Derivation
  1. Initial program 55.8%

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

    \[\leadsto \color{blue}{1} \]
  3. Final simplification52.6%

    \[\leadsto 1 \]

Reproduce

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