2cbrt (problem 3.3.4)

Percentage Accurate: 54.1% → 99.2%
Time: 14.8s
Alternatives: 8
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 8 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: 54.1% accurate, 1.0× speedup?

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

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

Alternative 1: 99.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{1 + x}\\ \frac{1 + \left(x - x\right)}{\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 (- x x)) (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 + (x - x)) / fma(cbrt(x), (cbrt(x) + t_0), pow(t_0, 2.0));
}
function code(x)
	t_0 = cbrt(Float64(1.0 + x))
	return Float64(Float64(1.0 + Float64(x - x)) / 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[(N[(1.0 + N[(x - x), $MachinePrecision]), $MachinePrecision] / 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 + \left(x - x\right)}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t_0, {t_0}^{2}\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 52.5%

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

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

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

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

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

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

      \[\leadsto \left({\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{\color{blue}{\sqrt{x} \cdot \sqrt{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)} \]
    5. cbrt-unprod25.1%

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

      \[\leadsto \left(\color{blue}{\left(x + 1\right)} - {\left(\sqrt[3]{\sqrt{x}} \cdot \sqrt[3]{\sqrt{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)} \]
    7. cbrt-unprod25.0%

      \[\leadsto \left(\left(x + 1\right) - {\color{blue}{\left(\sqrt[3]{\sqrt{x} \cdot \sqrt{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)} \]
    8. add-sqr-sqrt52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.2% accurate, 0.2× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(x - x\right)}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t_0, \sqrt[3]{{\left(1 + x\right)}^{2}}\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. add-cube-cbrt3.6%

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

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

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

      \[\leadsto \color{blue}{\left(0.1111111111111111 \cdot \left({\left({1}^{4}\right)}^{0.1111111111111111} \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}\right) + \left(0.2222222222222222 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333} + {x}^{0.3333333333333333}\right)\right)} - \sqrt[3]{x} \]
    5. Step-by-step derivation
      1. unpow1/34.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt[3]{x} \cdot \sqrt[3]{x}} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right) \cdot \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      2. difference-of-squares4.2%

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

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

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

        \[\leadsto \frac{\left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \color{blue}{0}\right) \cdot \left(\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      6. --rgt-identity98.5%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}}} \cdot \left(\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      7. associate--r-98.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} \cdot \left(\sqrt[3]{x} + \left(\sqrt[3]{x} - \frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}}\right)\right)}{\sqrt[3]{x} + \left(\sqrt[3]{x} - \frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}}\right)}} \]
    11. Step-by-step derivation
      1. expm1-log1p-u98.5%

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

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

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

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

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

        \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}} \]
    14. Simplified98.5%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}} \]

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

    1. Initial program 99.3%

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

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

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

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

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

        \[\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)}} \]
      4. add-sqr-sqrt47.6%

        \[\leadsto \left({\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{\color{blue}{\sqrt{x} \cdot \sqrt{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)} \]
      5. cbrt-unprod47.6%

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

        \[\leadsto \left(\color{blue}{\left(x + 1\right)} - {\left(\sqrt[3]{\sqrt{x}} \cdot \sqrt[3]{\sqrt{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)} \]
      7. cbrt-unprod47.6%

        \[\leadsto \left(\left(x + 1\right) - {\color{blue}{\left(\sqrt[3]{\sqrt{x} \cdot \sqrt{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)} \]
      8. add-sqr-sqrt99.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(\left(x + 1\right) - x\right) \cdot 1}{{\left(\sqrt[3]{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}}{{\left(\sqrt[3]{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}{{\left(\sqrt[3]{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)}}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)} \]
      5. +-commutative99.8%

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

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

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

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

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

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

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

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

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

Alternative 3: 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:\\ \;\;\;\;0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 + x\right) - x}{{t_0}^{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)
     (* 0.3333333333333333 (pow (cbrt x) -2.0))
     (/ (- (+ 1.0 x) x) (+ (pow t_0 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 = 0.3333333333333333 * pow(cbrt(x), -2.0);
	} else {
		tmp = ((1.0 + x) - x) / (pow(t_0, 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 = 0.3333333333333333 * Math.pow(Math.cbrt(x), -2.0);
	} else {
		tmp = ((1.0 + x) - x) / (Math.pow(t_0, 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(0.3333333333333333 * (cbrt(x) ^ -2.0));
	else
		tmp = Float64(Float64(Float64(1.0 + x) - x) / Float64((t_0 ^ 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[(0.3333333333333333 * N[Power[N[Power[x, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + x), $MachinePrecision] - x), $MachinePrecision] / N[(N[Power[t$95$0, 2.0], $MachinePrecision] + N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + x\right) - x}{{t_0}^{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. add-cube-cbrt3.6%

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

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

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

      \[\leadsto \color{blue}{\left(0.1111111111111111 \cdot \left({\left({1}^{4}\right)}^{0.1111111111111111} \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}\right) + \left(0.2222222222222222 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333} + {x}^{0.3333333333333333}\right)\right)} - \sqrt[3]{x} \]
    5. Step-by-step derivation
      1. unpow1/34.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt[3]{x} \cdot \sqrt[3]{x}} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right) \cdot \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      2. difference-of-squares4.2%

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

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

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

        \[\leadsto \frac{\left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \color{blue}{0}\right) \cdot \left(\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      6. --rgt-identity98.5%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}}} \cdot \left(\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      7. associate--r-98.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} \cdot \left(\sqrt[3]{x} + \left(\sqrt[3]{x} - \frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}}\right)\right)}{\sqrt[3]{x} + \left(\sqrt[3]{x} - \frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}}\right)}} \]
    11. Step-by-step derivation
      1. expm1-log1p-u98.5%

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

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

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

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

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

        \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}} \]
    14. Simplified98.5%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}} \]

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

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.8% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;e^{\log t_0}\\


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

    1. Initial program 4.7%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. add-cube-cbrt4.0%

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

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

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

      \[\leadsto \color{blue}{\left(0.1111111111111111 \cdot \left({\left({1}^{4}\right)}^{0.1111111111111111} \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}\right) + \left(0.2222222222222222 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333} + {x}^{0.3333333333333333}\right)\right)} - \sqrt[3]{x} \]
    5. Step-by-step derivation
      1. unpow1/34.7%

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

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

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

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

        \[\leadsto \left(\sqrt[3]{x} + \left(0.1111111111111111 \cdot \left(\color{blue}{1} \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}\right) + 0.2222222222222222 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}\right)\right) - \sqrt[3]{x} \]
      6. *-lft-identity4.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt[3]{x} \cdot \sqrt[3]{x}} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right) \cdot \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      2. difference-of-squares4.7%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}}} \cdot \left(\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      7. associate--r-98.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}} \]
    14. Simplified98.2%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}} \]

    if 1.99999999999999991e-6 < (-.f64 (cbrt.f64 (+.f64 x 1)) (cbrt.f64 x))

    1. Initial program 99.7%

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

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

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

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

Alternative 5: 98.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{1 + x} - \sqrt[3]{x}\\ \mathbf{if}\;t_0 \leq 2 \cdot 10^{-6}:\\ \;\;\;\;0.3333333333333333 \cdot {\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 2e-6) (* 0.3333333333333333 (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 <= 2e-6) {
		tmp = 0.3333333333333333 * 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 <= 2e-6) {
		tmp = 0.3333333333333333 * 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 <= 2e-6)
		tmp = Float64(0.3333333333333333 * (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, 2e-6], N[(0.3333333333333333 * 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 2 \cdot 10^{-6}:\\
\;\;\;\;0.3333333333333333 \cdot {\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)) < 1.99999999999999991e-6

    1. Initial program 4.7%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. add-cube-cbrt4.0%

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

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

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

      \[\leadsto \color{blue}{\left(0.1111111111111111 \cdot \left({\left({1}^{4}\right)}^{0.1111111111111111} \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}\right) + \left(0.2222222222222222 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333} + {x}^{0.3333333333333333}\right)\right)} - \sqrt[3]{x} \]
    5. Step-by-step derivation
      1. unpow1/34.7%

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

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

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

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

        \[\leadsto \left(\sqrt[3]{x} + \left(0.1111111111111111 \cdot \left(\color{blue}{1} \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}\right) + 0.2222222222222222 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}\right)\right) - \sqrt[3]{x} \]
      6. *-lft-identity4.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt[3]{x} \cdot \sqrt[3]{x}} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right) \cdot \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      2. difference-of-squares4.7%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}}} \cdot \left(\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      7. associate--r-98.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}} \]
    14. Simplified98.2%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}} \]

    if 1.99999999999999991e-6 < (-.f64 (cbrt.f64 (+.f64 x 1)) (cbrt.f64 x))

    1. Initial program 99.7%

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

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

Alternative 6: 95.2% accurate, 1.0× speedup?

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

    1. Initial program 5.9%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Step-by-step derivation
      1. add-cube-cbrt5.2%

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

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

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

      \[\leadsto \color{blue}{\left(0.1111111111111111 \cdot \left({\left({1}^{4}\right)}^{0.1111111111111111} \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333}\right) + \left(0.2222222222222222 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{0.3333333333333333} + {x}^{0.3333333333333333}\right)\right)} - \sqrt[3]{x} \]
    5. Step-by-step derivation
      1. unpow1/35.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt[3]{x} \cdot \sqrt[3]{x}} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right) \cdot \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      2. difference-of-squares5.2%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}}} \cdot \left(\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)\right)}{\sqrt[3]{x} - \left(\frac{0.3333333333333333}{{\left(\sqrt[3]{x}\right)}^{2}} - \sqrt[3]{x}\right)} \]
      7. associate--r-97.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}} \]
    14. Simplified97.3%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}} \]

    if -1.05000000000000004 < x < 0.25

    1. Initial program 100.0%

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

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

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

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

        \[\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)}} \]
      3. div-inv99.9%

        \[\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)}} \]
      4. add-sqr-sqrt48.7%

        \[\leadsto \left({\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{\color{blue}{\sqrt{x} \cdot \sqrt{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)} \]
      5. cbrt-unprod48.7%

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

        \[\leadsto \left(\color{blue}{\left(x + 1\right)} - {\left(\sqrt[3]{\sqrt{x}} \cdot \sqrt[3]{\sqrt{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)} \]
      7. cbrt-unprod48.7%

        \[\leadsto \left(\left(x + 1\right) - {\color{blue}{\left(\sqrt[3]{\sqrt{x} \cdot \sqrt{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)} \]
      8. add-sqr-sqrt99.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(\left(x + 1\right) - x\right) \cdot 1}{{\left(\sqrt[3]{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}}{{\left(\sqrt[3]{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}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)} \]
      4. associate--l+99.9%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 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 52.5%

    \[\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 8: 50.6% 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 52.5%

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

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

    \[\leadsto 1 \]

Reproduce

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