2cbrt (problem 3.3.4)

Percentage Accurate: 53.8% → 99.1%
Time: 11.2s
Alternatives: 11
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 11 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.8% 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 0:\\ \;\;\;\;\frac{1}{\sqrt[3]{x} \cdot \left(t_0 + \sqrt[3]{x} \cdot 2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 + x\right) - x}{\sqrt[3]{{\left(1 + x\right)}^{2}} + \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))))
   (if (<= (- t_0 (cbrt x)) 0.0)
     (/ 1.0 (* (cbrt x) (+ t_0 (* (cbrt x) 2.0))))
     (/
      (- (+ 1.0 x) x)
      (+ (cbrt (pow (+ 1.0 x) 2.0)) (* (cbrt x) (+ (cbrt x) 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 / (cbrt(x) * (t_0 + (cbrt(x) * 2.0)));
	} else {
		tmp = ((1.0 + x) - x) / (cbrt(pow((1.0 + x), 2.0)) + (cbrt(x) * (cbrt(x) + t_0)));
	}
	return tmp;
}
public static double code(double x) {
	double t_0 = Math.cbrt((1.0 + x));
	double tmp;
	if ((t_0 - Math.cbrt(x)) <= 0.0) {
		tmp = 1.0 / (Math.cbrt(x) * (t_0 + (Math.cbrt(x) * 2.0)));
	} else {
		tmp = ((1.0 + x) - x) / (Math.cbrt(Math.pow((1.0 + x), 2.0)) + (Math.cbrt(x) * (Math.cbrt(x) + 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 / Float64(cbrt(x) * Float64(t_0 + Float64(cbrt(x) * 2.0))));
	else
		tmp = Float64(Float64(Float64(1.0 + x) - x) / Float64(cbrt((Float64(1.0 + x) ^ 2.0)) + Float64(cbrt(x) * Float64(cbrt(x) + 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[(N[Power[x, 1/3], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + x), $MachinePrecision] - x), $MachinePrecision] / N[(N[Power[N[Power[N[(1.0 + x), $MachinePrecision], 2.0], $MachinePrecision], 1/3], $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}\\
\mathbf{if}\;t_0 - \sqrt[3]{x} \leq 0:\\
\;\;\;\;\frac{1}{\sqrt[3]{x} \cdot \left(t_0 + \sqrt[3]{x} \cdot 2\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + x\right) - x}{\sqrt[3]{{\left(1 + x\right)}^{2}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + 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+48.6%

        \[\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. +-inverses48.6%

        \[\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-eval48.6%

        \[\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. +-commutative48.6%

        \[\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-def48.6%

        \[\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. +-commutative48.6%

        \[\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. +-commutative48.6%

        \[\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. Simplified48.6%

      \[\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/346.4%

        \[\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-pow44.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-eval44.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-rr44.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 46.4%

      \[\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. unpow1/348.6%

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{\sqrt[3]{x \cdot x}}\right)} \]
    11. Step-by-step derivation
      1. expm1-log1p-u48.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{x \cdot x}\right)}\right)\right)} \]
      2. expm1-udef4.8%

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{1}{\sqrt[3]{x} \cdot \left(\left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) + \sqrt[3]{x}\right)}\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def98.7%

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

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

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

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

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

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

    1. Initial program 98.8%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. flip3--98.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. rem-cube-cbrt99.2%

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

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

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

        \[\leadsto \frac{\left(x + 1\right) - x}{\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)} \]
      6. distribute-rgt-out99.8%

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

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

      \[\leadsto \color{blue}{\frac{\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. Recombined 2 regimes into one program.
  4. Final simplification99.3%

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

Alternative 2: 98.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{1 + x}\\ \mathbf{if}\;t_0 - \sqrt[3]{x} \leq 10^{-9}:\\ \;\;\;\;\frac{1}{\sqrt[3]{x} \cdot \left(t_0 + \sqrt[3]{x} \cdot 2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \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))))
   (if (<= (- t_0 (cbrt x)) 1e-9)
     (/ 1.0 (* (cbrt x) (+ t_0 (* (cbrt x) 2.0))))
     (/
      1.0
      (fma (cbrt x) (+ (cbrt x) t_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)) <= 1e-9) {
		tmp = 1.0 / (cbrt(x) * (t_0 + (cbrt(x) * 2.0)));
	} else {
		tmp = 1.0 / fma(cbrt(x), (cbrt(x) + t_0), 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)) <= 1e-9)
		tmp = Float64(1.0 / Float64(cbrt(x) * Float64(t_0 + Float64(cbrt(x) * 2.0))));
	else
		tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) + t_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], 1e-9], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(t$95$0 + N[(N[Power[x, 1/3], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + t$95$0), $MachinePrecision] + N[Power[N[(1.0 + x), $MachinePrecision], 0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t_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 1)) (cbrt.f64 x)) < 1.00000000000000006e-9

    1. Initial program 4.4%

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

        \[\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.4%

        \[\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-cbrt4.6%

        \[\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.9%

        \[\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.9%

        \[\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.9%

        \[\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.9%

        \[\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.9%

        \[\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.9%

      \[\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.9%

        \[\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.9%

        \[\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.9%

        \[\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+49.0%

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

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

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

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

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

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

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

      \[\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/346.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-pow44.4%

        \[\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-eval44.4%

        \[\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-rr44.4%

      \[\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 46.7%

      \[\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. unpow1/348.9%

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{\sqrt[3]{x \cdot x}}\right)} \]
    11. Step-by-step derivation
      1. expm1-log1p-u48.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{x \cdot x}\right)}\right)\right)} \]
      2. expm1-udef5.2%

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{1}{\sqrt[3]{x} \cdot \left(\left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) + \sqrt[3]{x}\right)}\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def98.6%

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

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

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

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

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

    if 1.00000000000000006e-9 < (-.f64 (cbrt.f64 (+.f64 x 1)) (cbrt.f64 x))

    1. Initial program 99.4%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. flip3--99.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-inv99.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-cbrt99.2%

        \[\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-cbrt99.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-unprod99.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. pow299.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-out99.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. +-commutative99.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-rr99.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/99.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-identity99.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. +-commutative99.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+99.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. +-inverses99.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-eval99.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. +-commutative99.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-def99.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. +-commutative99.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. +-commutative99.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. Simplified99.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. Step-by-step derivation
      1. pow1/399.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-pow99.9%

        \[\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-eval99.9%

        \[\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-rr99.9%

      \[\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 2 regimes into one program.
  4. Final simplification99.2%

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

Alternative 3: 99.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
t_1 := \frac{1}{t_0}\\
\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t_0, \frac{\frac{1}{t_1}}{t_1}\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 51.1%

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

      \[\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-inv51.1%

      \[\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-cbrt51.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-cbrt51.6%

      \[\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-unprod51.6%

      \[\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. pow251.6%

      \[\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-out51.6%

      \[\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. +-commutative51.6%

      \[\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-rr51.6%

    \[\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/51.6%

      \[\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-identity51.6%

      \[\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. +-commutative51.6%

      \[\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+74.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{\color{blue}{\left(x + 1\right)} \cdot \left(1 + x\right)}\right)} \]
    3. add-cube-cbrt73.9%

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}\right) \cdot \color{blue}{\left(x + 1\right)}}\right)} \]
    5. add-cube-cbrt73.9%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}\right) \cdot \color{blue}{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}\right)}}\right)} \]
    6. swap-sqr73.9%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{\color{blue}{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right)\right) \cdot \left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right)}}\right)} \]
    7. add-cbrt-cube99.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{\frac{\sqrt[3]{\mathsf{fma}\left(x, x, -1\right)}}{\sqrt[3]{x + -1}} \cdot \frac{\sqrt[3]{\mathsf{fma}\left(x, x, -1\right)}}{\sqrt[3]{x + -1}}}\right)} \]
    17. clear-num74.1%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \frac{\sqrt[3]{\frac{\mathsf{fma}\left(x, x, \color{blue}{-1}\right)}{x + -1}}}{\frac{1}{\sqrt[3]{1 + x}}}\right)} \]
    8. cbrt-undiv74.0%

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

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

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

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \frac{\frac{1}{\frac{1}{\sqrt[3]{\frac{\color{blue}{x \cdot x - 1}}{x + -1}}}}}{\frac{1}{\sqrt[3]{1 + x}}}\right)} \]
    14. metadata-eval73.9%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \frac{\frac{1}{\frac{1}{\sqrt[3]{\frac{x \cdot x - \color{blue}{-1 \cdot -1}}{x + -1}}}}}{\frac{1}{\sqrt[3]{1 + x}}}\right)} \]
    15. flip--99.2%

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

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

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

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

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

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

Alternative 4: 99.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t_0, \frac{t_0}{\frac{1}{t_0}}\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 51.1%

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

      \[\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-inv51.1%

      \[\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-cbrt51.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-cbrt51.6%

      \[\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-unprod51.6%

      \[\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. pow251.6%

      \[\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-out51.6%

      \[\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. +-commutative51.6%

      \[\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-rr51.6%

    \[\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/51.6%

      \[\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-identity51.6%

      \[\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. +-commutative51.6%

      \[\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+74.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{\color{blue}{\left(x + 1\right)} \cdot \left(1 + x\right)}\right)} \]
    3. add-cube-cbrt73.9%

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}\right) \cdot \color{blue}{\left(x + 1\right)}}\right)} \]
    5. add-cube-cbrt73.9%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}\right) \cdot \color{blue}{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}\right)}}\right)} \]
    6. swap-sqr73.9%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{\color{blue}{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right)\right) \cdot \left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right)}}\right)} \]
    7. add-cbrt-cube99.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{\frac{\sqrt[3]{\mathsf{fma}\left(x, x, -1\right)}}{\sqrt[3]{x + -1}} \cdot \frac{\sqrt[3]{\mathsf{fma}\left(x, x, -1\right)}}{\sqrt[3]{x + -1}}}\right)} \]
    17. clear-num74.1%

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

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

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

Alternative 5: 99.2% accurate, 0.3× speedup?

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

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

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

      \[\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-inv51.1%

      \[\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-cbrt51.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-cbrt51.6%

      \[\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-unprod51.6%

      \[\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. pow251.6%

      \[\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-out51.6%

      \[\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. +-commutative51.6%

      \[\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-rr51.6%

    \[\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/51.6%

      \[\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-identity51.6%

      \[\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. +-commutative51.6%

      \[\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+74.0%

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

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

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

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

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

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

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

    \[\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/372.9%

      \[\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-pow71.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-eval71.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-rr71.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. Step-by-step derivation
    1. metadata-eval71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 99.2% accurate, 0.3× speedup?

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

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

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

      \[\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-inv51.1%

      \[\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-cbrt51.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-cbrt51.6%

      \[\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-unprod51.6%

      \[\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. pow251.6%

      \[\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-out51.6%

      \[\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. +-commutative51.6%

      \[\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-rr51.6%

    \[\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/51.6%

      \[\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-identity51.6%

      \[\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. +-commutative51.6%

      \[\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+74.0%

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

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

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

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

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

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

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

    \[\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. expm1-log1p-u73.1%

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, e^{\mathsf{log1p}\left(\sqrt[3]{\color{blue}{\left(1 + x\right) \cdot \left(1 + x\right)}}\right)} - 1\right)} \]
    4. +-commutative73.1%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, e^{\mathsf{log1p}\left(\sqrt[3]{\color{blue}{\left(x + 1\right)} \cdot \left(1 + x\right)}\right)} - 1\right)} \]
    5. add-cube-cbrt73.1%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, e^{\mathsf{log1p}\left(\sqrt[3]{\color{blue}{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}\right)} \cdot \left(1 + x\right)}\right)} - 1\right)} \]
    6. +-commutative73.1%

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, e^{\mathsf{log1p}\left(\sqrt[3]{\color{blue}{\left(\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right)\right) \cdot \left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right)}}\right)} - 1\right)} \]
    9. add-cbrt-cube96.9%

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

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

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

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

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

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

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

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

Alternative 7: 97.9% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 4.7%

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

        \[\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-unprod5.6%

        \[\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. pow25.6%

        \[\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-out5.6%

        \[\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. +-commutative5.6%

        \[\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-rr5.6%

      \[\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/5.6%

        \[\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-identity5.6%

        \[\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. +-commutative5.6%

        \[\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+49.4%

        \[\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. +-inverses49.4%

        \[\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-eval49.4%

        \[\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. +-commutative49.4%

        \[\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-def49.4%

        \[\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. +-commutative49.4%

        \[\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. +-commutative49.4%

        \[\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. Simplified49.4%

      \[\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/347.2%

        \[\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-pow44.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-eval44.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-rr44.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)} \]
    8. Taylor expanded in x around inf 46.9%

      \[\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. unpow1/349.1%

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{\sqrt[3]{x \cdot x}}\right)} \]
    11. Step-by-step derivation
      1. expm1-log1p-u49.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{x \cdot x}\right)}\right)\right)} \]
      2. expm1-udef5.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \sqrt[3]{x \cdot x}\right)}\right)} - 1} \]
      3. fma-udef5.6%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{1}{\color{blue}{\sqrt[3]{x} \cdot \left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) + \sqrt[3]{x \cdot x}}}\right)} - 1 \]
      4. cbrt-prod5.6%

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{1}{\sqrt[3]{x} \cdot \left(\left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) + \sqrt[3]{x}\right)}\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def98.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\sqrt[3]{x} \cdot \left(\left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) + \sqrt[3]{x}\right)}\right)\right)} \]
      2. expm1-log1p98.4%

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

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

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

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

    if 9.9999999999999995e-8 < (-.f64 (cbrt.f64 (+.f64 x 1)) (cbrt.f64 x))

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x\right) \cdot 0.3333333333333333}} - \sqrt[3]{x} \]
  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 10^{-7}:\\ \;\;\;\;\frac{1}{\sqrt[3]{x} \cdot \left(\sqrt[3]{1 + x} + \sqrt[3]{x} \cdot 2\right)}\\ \mathbf{else}:\\ \;\;\;\;e^{\mathsf{log1p}\left(x\right) \cdot 0.3333333333333333} - \sqrt[3]{x}\\ \end{array} \]

Alternative 8: 60.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{1 + x} - \sqrt[3]{x}\\ \mathbf{if}\;t_0 \leq 0:\\ \;\;\;\;\frac{1}{{\left(\sqrt[3]{x}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (let* ((t_0 (- (cbrt (+ 1.0 x)) (cbrt x))))
   (if (<= t_0 0.0) (/ 1.0 (pow (cbrt x) 2.0)) t_0)))
double code(double x) {
	double t_0 = cbrt((1.0 + x)) - cbrt(x);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = 1.0 / pow(cbrt(x), 2.0);
	} else {
		tmp = t_0;
	}
	return tmp;
}
public static double code(double x) {
	double t_0 = Math.cbrt((1.0 + x)) - Math.cbrt(x);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = 1.0 / Math.pow(Math.cbrt(x), 2.0);
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(x)
	t_0 = Float64(cbrt(Float64(1.0 + x)) - cbrt(x))
	tmp = 0.0
	if (t_0 <= 0.0)
		tmp = Float64(1.0 / (cbrt(x) ^ 2.0));
	else
		tmp = t_0;
	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[t$95$0, 0.0], N[(1.0 / N[Power[N[Power[x, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;t_0\\


\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+48.6%

        \[\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. +-inverses48.6%

        \[\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-eval48.6%

        \[\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. +-commutative48.6%

        \[\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-def48.6%

        \[\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. +-commutative48.6%

        \[\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. +-commutative48.6%

        \[\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. Simplified48.6%

      \[\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/346.4%

        \[\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-pow44.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-eval44.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-rr44.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 10.8%

      \[\leadsto \color{blue}{{\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}} \]
    9. Step-by-step derivation
      1. unpow1/310.8%

        \[\leadsto \color{blue}{\sqrt[3]{\frac{1}{{x}^{2}}}} \]
      2. unpow210.8%

        \[\leadsto \sqrt[3]{\frac{1}{\color{blue}{x \cdot x}}} \]
    10. Simplified10.8%

      \[\leadsto \color{blue}{\sqrt[3]{\frac{1}{x \cdot x}}} \]
    11. Step-by-step derivation
      1. cbrt-div10.8%

        \[\leadsto \color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{x \cdot x}}} \]
      2. metadata-eval10.8%

        \[\leadsto \frac{\color{blue}{1}}{\sqrt[3]{x \cdot x}} \]
      3. cbrt-prod17.7%

        \[\leadsto \frac{1}{\color{blue}{\sqrt[3]{x} \cdot \sqrt[3]{x}}} \]
      4. pow217.7%

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

      \[\leadsto \color{blue}{\frac{1}{{\left(\sqrt[3]{x}\right)}^{2}}} \]

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

    1. Initial program 98.8%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.0%

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

Alternative 9: 55.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.38 \lor \neg \left(x \leq 1.4\right):\\ \;\;\;\;\frac{1}{{\left(\sqrt[3]{x}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;1 + x \cdot -0.6666666666666666\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (or (<= x -0.38) (not (<= x 1.4)))
   (/ 1.0 (pow (cbrt x) 2.0))
   (+ 1.0 (* x -0.6666666666666666))))
double code(double x) {
	double tmp;
	if ((x <= -0.38) || !(x <= 1.4)) {
		tmp = 1.0 / pow(cbrt(x), 2.0);
	} else {
		tmp = 1.0 + (x * -0.6666666666666666);
	}
	return tmp;
}
public static double code(double x) {
	double tmp;
	if ((x <= -0.38) || !(x <= 1.4)) {
		tmp = 1.0 / Math.pow(Math.cbrt(x), 2.0);
	} else {
		tmp = 1.0 + (x * -0.6666666666666666);
	}
	return tmp;
}
function code(x)
	tmp = 0.0
	if ((x <= -0.38) || !(x <= 1.4))
		tmp = Float64(1.0 / (cbrt(x) ^ 2.0));
	else
		tmp = Float64(1.0 + Float64(x * -0.6666666666666666));
	end
	return tmp
end
code[x_] := If[Or[LessEqual[x, -0.38], N[Not[LessEqual[x, 1.4]], $MachinePrecision]], N[(1.0 / N[Power[N[Power[x, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * -0.6666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.38 \lor \neg \left(x \leq 1.4\right):\\
\;\;\;\;\frac{1}{{\left(\sqrt[3]{x}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;1 + x \cdot -0.6666666666666666\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -0.38 or 1.3999999999999999 < x

    1. Initial program 6.0%

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

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

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

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

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

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

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

      \[\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/7.0%

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

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

        \[\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+50.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. +-inverses50.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-eval50.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. +-commutative50.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-def50.1%

        \[\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. +-commutative50.1%

        \[\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. +-commutative50.1%

        \[\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. Simplified50.1%

      \[\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/347.9%

        \[\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-pow45.6%

        \[\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-eval45.6%

        \[\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-rr45.6%

      \[\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 11.0%

      \[\leadsto \color{blue}{{\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}} \]
    9. Step-by-step derivation
      1. unpow1/311.0%

        \[\leadsto \color{blue}{\sqrt[3]{\frac{1}{{x}^{2}}}} \]
      2. unpow211.0%

        \[\leadsto \sqrt[3]{\frac{1}{\color{blue}{x \cdot x}}} \]
    10. Simplified11.0%

      \[\leadsto \color{blue}{\sqrt[3]{\frac{1}{x \cdot x}}} \]
    11. Step-by-step derivation
      1. cbrt-div11.0%

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

        \[\leadsto \frac{\color{blue}{1}}{\sqrt[3]{x \cdot x}} \]
      3. cbrt-prod17.7%

        \[\leadsto \frac{1}{\color{blue}{\sqrt[3]{x} \cdot \sqrt[3]{x}}} \]
      4. pow217.7%

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

      \[\leadsto \color{blue}{\frac{1}{{\left(\sqrt[3]{x}\right)}^{2}}} \]

    if -0.38 < x < 1.3999999999999999

    1. Initial program 100.0%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. flip3--99.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-inv99.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-cbrt99.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-cbrt99.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-unprod99.9%

        \[\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. pow299.9%

        \[\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-out99.9%

        \[\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. +-commutative99.9%

        \[\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-rr99.9%

      \[\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/99.9%

        \[\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-identity99.9%

        \[\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. +-commutative99.9%

        \[\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.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. +-inverses99.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-eval99.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. +-commutative99.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-def99.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. +-commutative99.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. +-commutative99.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. Simplified99.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 92.1%

      \[\leadsto \color{blue}{1 + -0.6666666666666666 \cdot x} \]
    7. Step-by-step derivation
      1. *-commutative92.1%

        \[\leadsto 1 + \color{blue}{x \cdot -0.6666666666666666} \]
    8. Simplified92.1%

      \[\leadsto \color{blue}{1 + x \cdot -0.6666666666666666} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.38 \lor \neg \left(x \leq 1.4\right):\\ \;\;\;\;\frac{1}{{\left(\sqrt[3]{x}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;1 + x \cdot -0.6666666666666666\\ \end{array} \]

Alternative 10: 3.6% 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 51.1%

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

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

    \[\leadsto 0 \]

Alternative 11: 50.2% 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 51.1%

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

    \[\leadsto \color{blue}{1} \]
  3. Final simplification47.5%

    \[\leadsto 1 \]

Reproduce

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