2cbrt (problem 3.3.4)

Percentage Accurate: 7.3% → 99.1%
Time: 16.9s
Alternatives: 8
Speedup: 2.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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: 7.3% 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} \mathbf{if}\;x \leq 4 \cdot 10^{+15}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + \sqrt[3]{1 + x}, \sqrt[3]{{\left(1 + x\right)}^{2}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot 0.3333333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= x 4e+15)
   (/
    1.0
    (fma (cbrt x) (+ (cbrt x) (cbrt (+ 1.0 x))) (cbrt (pow (+ 1.0 x) 2.0))))
   (/ (* (cbrt x) 0.3333333333333333) x)))
double code(double x) {
	double tmp;
	if (x <= 4e+15) {
		tmp = 1.0 / fma(cbrt(x), (cbrt(x) + cbrt((1.0 + x))), cbrt(pow((1.0 + x), 2.0)));
	} else {
		tmp = (cbrt(x) * 0.3333333333333333) / x;
	}
	return tmp;
}
function code(x)
	tmp = 0.0
	if (x <= 4e+15)
		tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) + cbrt(Float64(1.0 + x))), cbrt((Float64(1.0 + x) ^ 2.0))));
	else
		tmp = Float64(Float64(cbrt(x) * 0.3333333333333333) / x);
	end
	return tmp
end
code[x_] := If[LessEqual[x, 4e+15], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[Power[N[Power[N[(1.0 + x), $MachinePrecision], 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x, 1/3], $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + \sqrt[3]{1 + x}, \sqrt[3]{{\left(1 + x\right)}^{2}}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot 0.3333333333333333}{x}\\


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

    1. Initial program 56.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. flip3--61.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-inv61.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-cbrt60.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-cbrt98.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(x + 1\right) - x\right) \cdot \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x + 1} + \sqrt[3]{x}, e^{0.6666666666666666 \cdot \mathsf{log1p}\left(x\right)}\right)}} \]
    5. Step-by-step derivation
      1. associate-*r/98.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{0.6666666666666666}\right)}^{\left(\mathsf{log1p}\left(x\right)\right)}\right)}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt97.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \left(\sqrt{e^{0.6666666666666666}}\right) \cdot \frac{\color{blue}{\mathsf{log1p}\left(x\right) \cdot 2}}{2}}\right)}^{2}\right)} \]
      5. associate-/l*98.3%

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \left(\sqrt{e^{0.6666666666666666}}\right) \cdot \color{blue}{\left(1 \cdot \mathsf{log1p}\left(x\right)\right)}}\right)}^{2}\right)} \]
      8. *-un-lft-identity98.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \left(\sqrt{e^{0.6666666666666666}}\right) \cdot \color{blue}{\mathsf{log1p}\left(x\right)}}\right)}^{2}\right)} \]
      9. pow1/298.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \color{blue}{\left(\sqrt[3]{x + 1}\right)}}\right)}^{2}\right)} \]
      17. add-exp-log98.6%

        \[\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)} \]
      18. pow298.6%

        \[\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)} \]
    12. Applied egg-rr98.8%

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

    if 4e15 < x

    1. Initial program 4.1%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \sqrt[3]{{x}^{4}} + -0.1111111111111111 \cdot \sqrt[3]{x}}}{{x}^{2}} \]
      2. fma-define26.4%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}}{{x}^{2}} \]
    5. Simplified26.4%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{{x}^{2}}} \]
    6. Step-by-step derivation
      1. frac-2neg26.4%

        \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{-{x}^{2}}} \]
      2. div-inv26.4%

        \[\leadsto \color{blue}{\left(-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)\right) \cdot \frac{1}{-{x}^{2}}} \]
      3. *-commutative26.4%

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

      \[\leadsto \color{blue}{\left(-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)\right) \cdot \frac{1}{-{x}^{2}}} \]
    8. Step-by-step derivation
      1. un-div-inv26.4%

        \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{-{x}^{2}}} \]
      2. add-sqr-sqrt0.0%

        \[\leadsto \frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{\color{blue}{\sqrt{-{x}^{2}} \cdot \sqrt{-{x}^{2}}}} \]
      3. associate-/r*0.0%

        \[\leadsto \color{blue}{\frac{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{\sqrt{-{x}^{2}}}}{\sqrt{-{x}^{2}}}} \]
    9. Applied egg-rr77.6%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(0.3333333333333333, {\left(\sqrt[3]{x}\right)}^{4}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{x}}{x}} \]
    10. Taylor expanded in x around inf 99.1%

      \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.0%

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

Alternative 2: 98.5% 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 6.8%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(x + 1\right) - x\right) \cdot \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x + 1} + \sqrt[3]{x}, e^{0.6666666666666666 \cdot \mathsf{log1p}\left(x\right)}\right)}} \]
  5. Step-by-step derivation
    1. associate-*r/9.3%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{0.6666666666666666}\right)}^{\left(\mathsf{log1p}\left(x\right)\right)}\right)}} \]
  7. Step-by-step derivation
    1. add-sqr-sqrt92.6%

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

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

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

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

    \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, \color{blue}{{\left(\sqrt{e^{0.6666666666666666}}\right)}^{\left(2 \cdot \mathsf{log1p}\left(x\right)\right)}}\right)} \]
  11. Step-by-step derivation
    1. sqr-pow94.3%

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

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \left(\sqrt{e^{0.6666666666666666}}\right) \cdot \frac{\color{blue}{\mathsf{log1p}\left(x\right) \cdot 2}}{2}}\right)}^{2}\right)} \]
    5. associate-/l*93.7%

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \left(\sqrt{e^{0.6666666666666666}}\right) \cdot \color{blue}{\left(1 \cdot \mathsf{log1p}\left(x\right)\right)}}\right)}^{2}\right)} \]
    8. *-un-lft-identity93.7%

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \left(\sqrt{e^{0.6666666666666666}}\right) \cdot \color{blue}{\mathsf{log1p}\left(x\right)}}\right)}^{2}\right)} \]
    9. pow1/293.7%

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\color{blue}{\left(0.5 \cdot \log \left(e^{0.6666666666666666}\right)\right)} \cdot \mathsf{log1p}\left(x\right)}\right)}^{2}\right)} \]
    11. rem-log-exp93.7%

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

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

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

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

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

      \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \color{blue}{\left(\sqrt[3]{x + 1}\right)}}\right)}^{2}\right)} \]
    17. add-exp-log98.5%

      \[\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)} \]
    18. pow298.5%

      \[\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)} \]
  12. Applied egg-rr98.5%

    \[\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)} \]
  13. Step-by-step derivation
    1. pow298.5%

      \[\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)} \]
  14. Applied egg-rr98.5%

    \[\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)} \]
  15. Final simplification98.5%

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

Alternative 3: 99.0% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot 0.3333333333333333}{x}\\


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

    1. Initial program 60.6%

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

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{0.3333333333333333}} \]
      2. pow-to-exp58.3%

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

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{e^{\log x \cdot 0.3333333333333333}} \]
    5. Step-by-step derivation
      1. exp-to-pow59.1%

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

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\sqrt[3]{x}} \]
      3. flip3--66.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)}} \]
      4. rem-cube-cbrt65.7%

        \[\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)} \]
      5. rem-cube-cbrt98.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)} \]
      6. pow298.8%

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

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

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

      \[\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)}} \]

    if 9.6e14 < x

    1. Initial program 4.1%

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

      \[\leadsto \color{blue}{\frac{-0.1111111111111111 \cdot \sqrt[3]{x} + 0.3333333333333333 \cdot \sqrt[3]{{x}^{4}}}{{x}^{2}}} \]
    4. Step-by-step derivation
      1. +-commutative26.7%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}}{{x}^{2}} \]
    5. Simplified26.7%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{{x}^{2}}} \]
    6. Step-by-step derivation
      1. frac-2neg26.7%

        \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{-{x}^{2}}} \]
      2. div-inv26.7%

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

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

      \[\leadsto \color{blue}{\left(-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)\right) \cdot \frac{1}{-{x}^{2}}} \]
    8. Step-by-step derivation
      1. un-div-inv26.7%

        \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{-{x}^{2}}} \]
      2. add-sqr-sqrt0.0%

        \[\leadsto \frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{\color{blue}{\sqrt{-{x}^{2}} \cdot \sqrt{-{x}^{2}}}} \]
      3. associate-/r*0.0%

        \[\leadsto \color{blue}{\frac{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{\sqrt{-{x}^{2}}}}{\sqrt{-{x}^{2}}}} \]
    9. Applied egg-rr77.7%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(0.3333333333333333, {\left(\sqrt[3]{x}\right)}^{4}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{x}}{x}} \]
    10. Taylor expanded in x around inf 99.0%

      \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 9.6 \cdot 10^{+14}:\\ \;\;\;\;\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)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot 0.3333333333333333}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 99.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.4 \cdot 10^{+15}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + \sqrt[3]{1 + x}, {\left(1 + x\right)}^{0.6666666666666666}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot 0.3333333333333333}{x}\\


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

    1. Initial program 56.2%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. flip3--61.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-inv61.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-cbrt60.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-cbrt98.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(x + 1\right) - x\right) \cdot \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x + 1} + \sqrt[3]{x}, e^{0.6666666666666666 \cdot \mathsf{log1p}\left(x\right)}\right)}} \]
    5. Step-by-step derivation
      1. associate-*r/98.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{0.6666666666666666}\right)}^{\left(\mathsf{log1p}\left(x\right)\right)}\right)}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt97.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \left(\sqrt{e^{0.6666666666666666}}\right) \cdot \frac{\color{blue}{\mathsf{log1p}\left(x\right) \cdot 2}}{2}}\right)}^{2}\right)} \]
      5. associate-/l*98.3%

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \left(\sqrt{e^{0.6666666666666666}}\right) \cdot \color{blue}{\left(1 \cdot \mathsf{log1p}\left(x\right)\right)}}\right)}^{2}\right)} \]
      8. *-un-lft-identity98.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \left(\sqrt{e^{0.6666666666666666}}\right) \cdot \color{blue}{\mathsf{log1p}\left(x\right)}}\right)}^{2}\right)} \]
      9. pow1/298.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(e^{\log \color{blue}{\left(\sqrt[3]{x + 1}\right)}}\right)}^{2}\right)} \]
      17. add-exp-log98.6%

        \[\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)} \]
      18. pow298.6%

        \[\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)} \]
    12. Applied egg-rr98.6%

      \[\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)} \]
    13. Step-by-step derivation
      1. pow298.6%

        \[\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)} \]
      2. pow1/398.5%

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

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

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

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

    if 2.4e15 < x

    1. Initial program 4.1%

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

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

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \sqrt[3]{{x}^{4}} + -0.1111111111111111 \cdot \sqrt[3]{x}}}{{x}^{2}} \]
      2. fma-define26.4%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}}{{x}^{2}} \]
    5. Simplified26.4%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{{x}^{2}}} \]
    6. Step-by-step derivation
      1. frac-2neg26.4%

        \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{-{x}^{2}}} \]
      2. div-inv26.4%

        \[\leadsto \color{blue}{\left(-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)\right) \cdot \frac{1}{-{x}^{2}}} \]
      3. *-commutative26.4%

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

      \[\leadsto \color{blue}{\left(-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)\right) \cdot \frac{1}{-{x}^{2}}} \]
    8. Step-by-step derivation
      1. un-div-inv26.4%

        \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{-{x}^{2}}} \]
      2. add-sqr-sqrt0.0%

        \[\leadsto \frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{\color{blue}{\sqrt{-{x}^{2}} \cdot \sqrt{-{x}^{2}}}} \]
      3. associate-/r*0.0%

        \[\leadsto \color{blue}{\frac{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{\sqrt{-{x}^{2}}}}{\sqrt{-{x}^{2}}}} \]
    9. Applied egg-rr77.6%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(0.3333333333333333, {\left(\sqrt[3]{x}\right)}^{4}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{x}}{x}} \]
    10. Taylor expanded in x around inf 99.1%

      \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.4 \cdot 10^{+15}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + \sqrt[3]{1 + x}, {\left(1 + x\right)}^{0.6666666666666666}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot 0.3333333333333333}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 97.2% accurate, 0.7× speedup?

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

\\
\frac{x \cdot \left(\frac{0.3333333333333333}{x} - \frac{0.1111111111111111}{{x}^{2}}\right)}{{\left(\sqrt[3]{x}\right)}^{2}}
\end{array}
Derivation
  1. Initial program 6.8%

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

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

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

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}}{{x}^{2}} \]
  5. Simplified29.1%

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{{x}^{2}}} \]
  6. Step-by-step derivation
    1. *-un-lft-identity29.1%

      \[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}}{{x}^{2}} \]
    2. add-cbrt-cube18.3%

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

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

      \[\leadsto \frac{1 \cdot \mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{\sqrt[3]{{x}^{\color{blue}{4}} \cdot {x}^{2}}} \]
    5. cbrt-prod28.3%

      \[\leadsto \frac{1 \cdot \mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{\color{blue}{\sqrt[3]{{x}^{4}} \cdot \sqrt[3]{{x}^{2}}}} \]
    6. unpow228.3%

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

      \[\leadsto \frac{1 \cdot \mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{\sqrt[3]{{x}^{4}} \cdot \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)}} \]
    8. times-frac28.1%

      \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{{x}^{4}}} \cdot \frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{\sqrt[3]{x} \cdot \sqrt[3]{x}}} \]
    9. *-commutative28.1%

      \[\leadsto \frac{1}{\sqrt[3]{{x}^{4}}} \cdot \frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \color{blue}{\sqrt[3]{x} \cdot -0.1111111111111111}\right)}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \]
    10. pow228.1%

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

    \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{{x}^{4}}} \cdot \frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{{\left(\sqrt[3]{x}\right)}^{2}}} \]
  8. Step-by-step derivation
    1. associate-*r/28.2%

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

    \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(-0.1111111111111111, \sqrt[3]{x}, 0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{4}\right)}{{\left(\sqrt[3]{x}\right)}^{4}}}{{\left(\sqrt[3]{x}\right)}^{2}}} \]
  10. Taylor expanded in x around inf 97.3%

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

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

      \[\leadsto \frac{x \cdot \left(\frac{\color{blue}{0.3333333333333333}}{x} - 0.1111111111111111 \cdot \frac{1}{{x}^{2}}\right)}{{\left(\sqrt[3]{x}\right)}^{2}} \]
    3. associate-*r/97.4%

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

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

    \[\leadsto \frac{\color{blue}{x \cdot \left(\frac{0.3333333333333333}{x} - \frac{0.1111111111111111}{{x}^{2}}\right)}}{{\left(\sqrt[3]{x}\right)}^{2}} \]
  13. Final simplification97.4%

    \[\leadsto \frac{x \cdot \left(\frac{0.3333333333333333}{x} - \frac{0.1111111111111111}{{x}^{2}}\right)}{{\left(\sqrt[3]{x}\right)}^{2}} \]
  14. Add Preprocessing

Alternative 6: 97.2% accurate, 0.7× speedup?

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}}{{x}^{2}} \]
  5. Simplified29.1%

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{{x}^{2}}} \]
  6. Step-by-step derivation
    1. *-un-lft-identity29.1%

      \[\leadsto \frac{\color{blue}{1 \cdot \mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}}{{x}^{2}} \]
    2. add-cbrt-cube18.3%

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

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

      \[\leadsto \frac{1 \cdot \mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{\sqrt[3]{{x}^{\color{blue}{4}} \cdot {x}^{2}}} \]
    5. cbrt-prod28.3%

      \[\leadsto \frac{1 \cdot \mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{\color{blue}{\sqrt[3]{{x}^{4}} \cdot \sqrt[3]{{x}^{2}}}} \]
    6. unpow228.3%

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

      \[\leadsto \frac{1 \cdot \mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{\sqrt[3]{{x}^{4}} \cdot \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)}} \]
    8. times-frac28.1%

      \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{{x}^{4}}} \cdot \frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{\sqrt[3]{x} \cdot \sqrt[3]{x}}} \]
    9. *-commutative28.1%

      \[\leadsto \frac{1}{\sqrt[3]{{x}^{4}}} \cdot \frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \color{blue}{\sqrt[3]{x} \cdot -0.1111111111111111}\right)}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \]
    10. pow228.1%

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

    \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{{x}^{4}}} \cdot \frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{{\left(\sqrt[3]{x}\right)}^{2}}} \]
  8. Step-by-step derivation
    1. associate-*r/28.2%

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

    \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(-0.1111111111111111, \sqrt[3]{x}, 0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{4}\right)}{{\left(\sqrt[3]{x}\right)}^{4}}}{{\left(\sqrt[3]{x}\right)}^{2}}} \]
  10. Taylor expanded in x around inf 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 96.8% accurate, 2.0× speedup?

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

\\
\frac{\sqrt[3]{x} \cdot 0.3333333333333333}{x}
\end{array}
Derivation
  1. Initial program 6.8%

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

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

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

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}}{{x}^{2}} \]
  5. Simplified29.1%

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{{x}^{2}}} \]
  6. Step-by-step derivation
    1. frac-2neg29.1%

      \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, -0.1111111111111111 \cdot \sqrt[3]{x}\right)}{-{x}^{2}}} \]
    2. div-inv29.0%

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

      \[\leadsto \left(-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \color{blue}{\sqrt[3]{x} \cdot -0.1111111111111111}\right)\right) \cdot \frac{1}{-{x}^{2}} \]
  7. Applied egg-rr29.0%

    \[\leadsto \color{blue}{\left(-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)\right) \cdot \frac{1}{-{x}^{2}}} \]
  8. Step-by-step derivation
    1. un-div-inv29.1%

      \[\leadsto \color{blue}{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{-{x}^{2}}} \]
    2. add-sqr-sqrt0.0%

      \[\leadsto \frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{\color{blue}{\sqrt{-{x}^{2}} \cdot \sqrt{-{x}^{2}}}} \]
    3. associate-/r*0.0%

      \[\leadsto \color{blue}{\frac{\frac{-\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{{x}^{4}}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{\sqrt{-{x}^{2}}}}{\sqrt{-{x}^{2}}}} \]
  9. Applied egg-rr77.6%

    \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(0.3333333333333333, {\left(\sqrt[3]{x}\right)}^{4}, \sqrt[3]{x} \cdot -0.1111111111111111\right)}{x}}{x}} \]
  10. Taylor expanded in x around inf 97.1%

    \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot \sqrt[3]{x}}}{x} \]
  11. Final simplification97.1%

    \[\leadsto \frac{\sqrt[3]{x} \cdot 0.3333333333333333}{x} \]
  12. Add Preprocessing

Alternative 8: 5.4% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 98.5% accurate, 0.3× speedup?

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

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

Reproduce

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

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

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