2cbrt (problem 3.3.4)

Percentage Accurate: 7.0% → 98.0%
Time: 3.2s
Alternatives: 5
Speedup: N/A×

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 5 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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 98.0% accurate, N/A× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot t\_0\right) \cdot 0.3333333333333333\\


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

    1. Initial program 52.6%

      \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\sqrt[3]{x + 1} - \sqrt[3]{x}} \]
      2. lift-+.f64N/A

        \[\leadsto \sqrt[3]{\color{blue}{x + 1}} - \sqrt[3]{x} \]
      3. lift-cbrt.f64N/A

        \[\leadsto \color{blue}{\sqrt[3]{x + 1}} - \sqrt[3]{x} \]
      4. lift-cbrt.f64N/A

        \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\sqrt[3]{x}} \]
      5. flip3--N/A

        \[\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)}} \]
      6. lower-/.f64N/A

        \[\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)}} \]
      7. rem-cube-cbrtN/A

        \[\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)} \]
      8. rem-cube-cbrtN/A

        \[\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)} \]
      9. lower--.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x + 1\right) - 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)} \]
      10. metadata-evalN/A

        \[\leadsto \frac{\left(x + \color{blue}{1 \cdot 1}\right) - 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)} \]
      11. fp-cancel-sign-sub-invN/A

        \[\leadsto \frac{\color{blue}{\left(x - \left(\mathsf{neg}\left(1\right)\right) \cdot 1\right)} - 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)} \]
      12. metadata-evalN/A

        \[\leadsto \frac{\left(x - \color{blue}{-1} \cdot 1\right) - 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)} \]
      13. metadata-evalN/A

        \[\leadsto \frac{\left(x - \color{blue}{-1}\right) - 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)} \]
      14. lower--.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x - -1\right)} - 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)} \]
      15. lower-fma.f64N/A

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

      \[\leadsto \color{blue}{\frac{\left(x - -1\right) - x}{\mathsf{fma}\left({\left(x - -1\right)}^{0.3333333333333333}, {\left(x - -1\right)}^{0.3333333333333333}, {x}^{0.3333333333333333} \cdot \mathsf{fma}\left({x}^{0.3333333333333333}, 1, {\left(x - -1\right)}^{0.3333333333333333}\right)\right)}} \]

    if 2e14 < x

    1. Initial program 4.2%

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

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \sqrt[3]{\frac{1}{{x}^{2}}}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
      3. pow1/3N/A

        \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      4. lower-pow.f64N/A

        \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      5. inv-powN/A

        \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      6. lower-pow.f64N/A

        \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      7. unpow2N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      8. lower-*.f6445.5

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333 \]
    5. Applied rewrites45.5%

      \[\leadsto \color{blue}{{\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333} \]
    6. Step-by-step derivation
      1. lift-pow.f64N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      2. lift-*.f64N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      3. lift-pow.f64N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      4. unpow1/3N/A

        \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
      5. lower-cbrt.f64N/A

        \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
      6. pow2N/A

        \[\leadsto \sqrt[3]{{\left({x}^{2}\right)}^{-1}} \cdot \frac{1}{3} \]
      7. inv-powN/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \frac{1}{3} \]
      8. pow-flipN/A

        \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
      9. lower-pow.f64N/A

        \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
      10. metadata-eval51.6

        \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
    7. Applied rewrites51.6%

      \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
    8. Step-by-step derivation
      1. lift-cbrt.f64N/A

        \[\leadsto \sqrt[3]{{x}^{-2}} \cdot \frac{1}{3} \]
      2. lift-pow.f64N/A

        \[\leadsto \sqrt[3]{{x}^{-2}} \cdot \frac{1}{3} \]
      3. metadata-evalN/A

        \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
      4. pow-flipN/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \frac{1}{3} \]
      5. inv-powN/A

        \[\leadsto \sqrt[3]{{\left({x}^{2}\right)}^{-1}} \cdot \frac{1}{3} \]
      6. pow-to-expN/A

        \[\leadsto \sqrt[3]{{\left(e^{\log x \cdot 2}\right)}^{-1}} \cdot \frac{1}{3} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt[3]{{\left(e^{2 \cdot \log x}\right)}^{-1}} \cdot \frac{1}{3} \]
      8. count-2-revN/A

        \[\leadsto \sqrt[3]{{\left(e^{\log x + \log x}\right)}^{-1}} \cdot \frac{1}{3} \]
      9. log-prodN/A

        \[\leadsto \sqrt[3]{{\left(e^{\log \left(x \cdot x\right)}\right)}^{-1}} \cdot \frac{1}{3} \]
      10. exp-prodN/A

        \[\leadsto \sqrt[3]{e^{\log \left(x \cdot x\right) \cdot -1}} \cdot \frac{1}{3} \]
      11. unpow1/3N/A

        \[\leadsto {\left(e^{\log \left(x \cdot x\right) \cdot -1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      12. pow-expN/A

        \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      13. lower-exp.f64N/A

        \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      14. lower-*.f64N/A

        \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      15. lower-*.f64N/A

        \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      16. log-prodN/A

        \[\leadsto e^{\left(\left(\log x + \log x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      17. count-2-revN/A

        \[\leadsto e^{\left(\left(2 \cdot \log x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      18. *-commutativeN/A

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      19. lower-*.f64N/A

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      20. lift-log.f6490.7

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot 0.3333333333333333} \cdot 0.3333333333333333 \]
    9. Applied rewrites90.7%

      \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot 0.3333333333333333} \cdot 0.3333333333333333 \]
    10. Step-by-step derivation
      1. lift-exp.f64N/A

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      2. lift-*.f64N/A

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      3. lift-*.f64N/A

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      4. lift-*.f64N/A

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      5. lift-log.f64N/A

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      6. exp-prodN/A

        \[\leadsto {\left(e^{\left(\log x \cdot 2\right) \cdot -1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      7. *-commutativeN/A

        \[\leadsto {\left(e^{\left(2 \cdot \log x\right) \cdot -1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      8. count-2-revN/A

        \[\leadsto {\left(e^{\left(\log x + \log x\right) \cdot -1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      9. exp-prodN/A

        \[\leadsto {\left({\left(e^{\log x + \log x}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      10. count-2-revN/A

        \[\leadsto {\left({\left(e^{2 \cdot \log x}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      11. *-commutativeN/A

        \[\leadsto {\left({\left(e^{\log x \cdot 2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      12. pow-to-expN/A

        \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      13. pow2N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      14. pow1/3N/A

        \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
      15. unpow-prod-downN/A

        \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{-1}} \cdot \frac{1}{3} \]
      16. lift-pow.f64N/A

        \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{-1}} \cdot \frac{1}{3} \]
      17. lift-pow.f64N/A

        \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{-1}} \cdot \frac{1}{3} \]
      18. cbrt-prodN/A

        \[\leadsto \left(\sqrt[3]{{x}^{-1}} \cdot \sqrt[3]{{x}^{-1}}\right) \cdot \frac{1}{3} \]
      19. lower-*.f64N/A

        \[\leadsto \left(\sqrt[3]{{x}^{-1}} \cdot \sqrt[3]{{x}^{-1}}\right) \cdot \frac{1}{3} \]
      20. lower-cbrt.f64N/A

        \[\leadsto \left(\sqrt[3]{{x}^{-1}} \cdot \sqrt[3]{{x}^{-1}}\right) \cdot \frac{1}{3} \]
      21. lower-cbrt.f6498.1

        \[\leadsto \left(\sqrt[3]{{x}^{-1}} \cdot \sqrt[3]{{x}^{-1}}\right) \cdot 0.3333333333333333 \]
    11. Applied rewrites98.1%

      \[\leadsto \left(\sqrt[3]{{x}^{-1}} \cdot \sqrt[3]{{x}^{-1}}\right) \cdot 0.3333333333333333 \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 96.2% accurate, N/A× speedup?

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

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

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

    \[\leadsto \color{blue}{\frac{1}{3} \cdot \sqrt[3]{\frac{1}{{x}^{2}}}} \]
  4. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
    2. lower-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
    3. pow1/3N/A

      \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    4. lower-pow.f64N/A

      \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    5. inv-powN/A

      \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    6. lower-pow.f64N/A

      \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    7. unpow2N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    8. lower-*.f6446.7

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333 \]
  5. Applied rewrites46.7%

    \[\leadsto \color{blue}{{\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333} \]
  6. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    2. lift-*.f64N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    3. lift-pow.f64N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    4. unpow1/3N/A

      \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
    5. lower-cbrt.f64N/A

      \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
    6. pow2N/A

      \[\leadsto \sqrt[3]{{\left({x}^{2}\right)}^{-1}} \cdot \frac{1}{3} \]
    7. inv-powN/A

      \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \frac{1}{3} \]
    8. pow-flipN/A

      \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
    9. lower-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
    10. metadata-eval52.5

      \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
  7. Applied rewrites52.5%

    \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
  8. Step-by-step derivation
    1. lift-cbrt.f64N/A

      \[\leadsto \sqrt[3]{{x}^{-2}} \cdot \frac{1}{3} \]
    2. lift-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{-2}} \cdot \frac{1}{3} \]
    3. metadata-evalN/A

      \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
    4. pow-flipN/A

      \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \frac{1}{3} \]
    5. inv-powN/A

      \[\leadsto \sqrt[3]{{\left({x}^{2}\right)}^{-1}} \cdot \frac{1}{3} \]
    6. pow-to-expN/A

      \[\leadsto \sqrt[3]{{\left(e^{\log x \cdot 2}\right)}^{-1}} \cdot \frac{1}{3} \]
    7. *-commutativeN/A

      \[\leadsto \sqrt[3]{{\left(e^{2 \cdot \log x}\right)}^{-1}} \cdot \frac{1}{3} \]
    8. count-2-revN/A

      \[\leadsto \sqrt[3]{{\left(e^{\log x + \log x}\right)}^{-1}} \cdot \frac{1}{3} \]
    9. log-prodN/A

      \[\leadsto \sqrt[3]{{\left(e^{\log \left(x \cdot x\right)}\right)}^{-1}} \cdot \frac{1}{3} \]
    10. exp-prodN/A

      \[\leadsto \sqrt[3]{e^{\log \left(x \cdot x\right) \cdot -1}} \cdot \frac{1}{3} \]
    11. unpow1/3N/A

      \[\leadsto {\left(e^{\log \left(x \cdot x\right) \cdot -1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    12. pow-expN/A

      \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    13. lower-exp.f64N/A

      \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    14. lower-*.f64N/A

      \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    15. lower-*.f64N/A

      \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    16. log-prodN/A

      \[\leadsto e^{\left(\left(\log x + \log x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    17. count-2-revN/A

      \[\leadsto e^{\left(\left(2 \cdot \log x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    18. *-commutativeN/A

      \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    19. lower-*.f64N/A

      \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    20. lift-log.f6489.3

      \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot 0.3333333333333333} \cdot 0.3333333333333333 \]
  9. Applied rewrites89.3%

    \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot 0.3333333333333333} \cdot 0.3333333333333333 \]
  10. Step-by-step derivation
    1. lift-exp.f64N/A

      \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    2. lift-*.f64N/A

      \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    3. lift-*.f64N/A

      \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    4. lift-*.f64N/A

      \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    5. lift-log.f64N/A

      \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
    6. exp-prodN/A

      \[\leadsto {\left(e^{\left(\log x \cdot 2\right) \cdot -1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    7. *-commutativeN/A

      \[\leadsto {\left(e^{\left(2 \cdot \log x\right) \cdot -1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    8. count-2-revN/A

      \[\leadsto {\left(e^{\left(\log x + \log x\right) \cdot -1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    9. exp-prodN/A

      \[\leadsto {\left({\left(e^{\log x + \log x}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    10. count-2-revN/A

      \[\leadsto {\left({\left(e^{2 \cdot \log x}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    11. *-commutativeN/A

      \[\leadsto {\left({\left(e^{\log x \cdot 2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    12. pow-to-expN/A

      \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    13. pow2N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    14. pow1/3N/A

      \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
    15. unpow-prod-downN/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{-1}} \cdot \frac{1}{3} \]
    16. lift-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{-1}} \cdot \frac{1}{3} \]
    17. lift-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{-1}} \cdot \frac{1}{3} \]
    18. cbrt-prodN/A

      \[\leadsto \left(\sqrt[3]{{x}^{-1}} \cdot \sqrt[3]{{x}^{-1}}\right) \cdot \frac{1}{3} \]
    19. lower-*.f64N/A

      \[\leadsto \left(\sqrt[3]{{x}^{-1}} \cdot \sqrt[3]{{x}^{-1}}\right) \cdot \frac{1}{3} \]
    20. lower-cbrt.f64N/A

      \[\leadsto \left(\sqrt[3]{{x}^{-1}} \cdot \sqrt[3]{{x}^{-1}}\right) \cdot \frac{1}{3} \]
    21. lower-cbrt.f6496.2

      \[\leadsto \left(\sqrt[3]{{x}^{-1}} \cdot \sqrt[3]{{x}^{-1}}\right) \cdot 0.3333333333333333 \]
  11. Applied rewrites96.2%

    \[\leadsto \left(\sqrt[3]{{x}^{-1}} \cdot \sqrt[3]{{x}^{-1}}\right) \cdot 0.3333333333333333 \]
  12. Add Preprocessing

Alternative 3: 92.2% accurate, N/A× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.75 \cdot 10^{+155}:\\
\;\;\;\;\sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333\\

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


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

    1. Initial program 9.2%

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

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \sqrt[3]{\frac{1}{{x}^{2}}}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
      3. pow1/3N/A

        \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      4. lower-pow.f64N/A

        \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      5. inv-powN/A

        \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      6. lower-pow.f64N/A

        \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      7. unpow2N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      8. lower-*.f6487.4

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333 \]
    5. Applied rewrites87.4%

      \[\leadsto \color{blue}{{\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333} \]
    6. Step-by-step derivation
      1. lift-pow.f64N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      2. lift-*.f64N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      3. lift-pow.f64N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      4. unpow1/3N/A

        \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
      5. lower-cbrt.f64N/A

        \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
      6. pow2N/A

        \[\leadsto \sqrt[3]{{\left({x}^{2}\right)}^{-1}} \cdot \frac{1}{3} \]
      7. inv-powN/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \frac{1}{3} \]
      8. pow-flipN/A

        \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
      9. lower-pow.f64N/A

        \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
      10. metadata-eval95.0

        \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
    7. Applied rewrites95.0%

      \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]

    if 1.74999999999999992e155 < x

    1. Initial program 4.8%

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

      \[\leadsto \color{blue}{\frac{1}{3} \cdot \sqrt[3]{\frac{1}{{x}^{2}}}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
      3. pow1/3N/A

        \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      4. lower-pow.f64N/A

        \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      5. inv-powN/A

        \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      6. lower-pow.f64N/A

        \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      7. unpow2N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      8. lower-*.f644.8

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333 \]
    5. Applied rewrites4.8%

      \[\leadsto \color{blue}{{\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333} \]
    6. Step-by-step derivation
      1. lift-pow.f64N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      2. lift-*.f64N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      3. lift-pow.f64N/A

        \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      4. unpow1/3N/A

        \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
      5. lower-cbrt.f64N/A

        \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
      6. pow2N/A

        \[\leadsto \sqrt[3]{{\left({x}^{2}\right)}^{-1}} \cdot \frac{1}{3} \]
      7. inv-powN/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \frac{1}{3} \]
      8. pow-flipN/A

        \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
      9. lower-pow.f64N/A

        \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
      10. metadata-eval8.7

        \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
    7. Applied rewrites8.7%

      \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
    8. Step-by-step derivation
      1. lift-cbrt.f64N/A

        \[\leadsto \sqrt[3]{{x}^{-2}} \cdot \frac{1}{3} \]
      2. lift-pow.f64N/A

        \[\leadsto \sqrt[3]{{x}^{-2}} \cdot \frac{1}{3} \]
      3. metadata-evalN/A

        \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
      4. pow-flipN/A

        \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \frac{1}{3} \]
      5. inv-powN/A

        \[\leadsto \sqrt[3]{{\left({x}^{2}\right)}^{-1}} \cdot \frac{1}{3} \]
      6. pow-to-expN/A

        \[\leadsto \sqrt[3]{{\left(e^{\log x \cdot 2}\right)}^{-1}} \cdot \frac{1}{3} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt[3]{{\left(e^{2 \cdot \log x}\right)}^{-1}} \cdot \frac{1}{3} \]
      8. count-2-revN/A

        \[\leadsto \sqrt[3]{{\left(e^{\log x + \log x}\right)}^{-1}} \cdot \frac{1}{3} \]
      9. log-prodN/A

        \[\leadsto \sqrt[3]{{\left(e^{\log \left(x \cdot x\right)}\right)}^{-1}} \cdot \frac{1}{3} \]
      10. exp-prodN/A

        \[\leadsto \sqrt[3]{e^{\log \left(x \cdot x\right) \cdot -1}} \cdot \frac{1}{3} \]
      11. unpow1/3N/A

        \[\leadsto {\left(e^{\log \left(x \cdot x\right) \cdot -1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
      12. pow-expN/A

        \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      13. lower-exp.f64N/A

        \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      14. lower-*.f64N/A

        \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      15. lower-*.f64N/A

        \[\leadsto e^{\left(\log \left(x \cdot x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      16. log-prodN/A

        \[\leadsto e^{\left(\left(\log x + \log x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      17. count-2-revN/A

        \[\leadsto e^{\left(\left(2 \cdot \log x\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      18. *-commutativeN/A

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      19. lower-*.f64N/A

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot \frac{1}{3}} \cdot \frac{1}{3} \]
      20. lift-log.f6489.2

        \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot 0.3333333333333333} \cdot 0.3333333333333333 \]
    9. Applied rewrites89.2%

      \[\leadsto e^{\left(\left(\log x \cdot 2\right) \cdot -1\right) \cdot 0.3333333333333333} \cdot 0.3333333333333333 \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 51.1% accurate, N/A× speedup?

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

\\
\sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333
\end{array}
Derivation
  1. Initial program 7.0%

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

    \[\leadsto \color{blue}{\frac{1}{3} \cdot \sqrt[3]{\frac{1}{{x}^{2}}}} \]
  4. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
    2. lower-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
    3. pow1/3N/A

      \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    4. lower-pow.f64N/A

      \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    5. inv-powN/A

      \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    6. lower-pow.f64N/A

      \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    7. unpow2N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    8. lower-*.f6446.7

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333 \]
  5. Applied rewrites46.7%

    \[\leadsto \color{blue}{{\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333} \]
  6. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    2. lift-*.f64N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    3. lift-pow.f64N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    4. unpow1/3N/A

      \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
    5. lower-cbrt.f64N/A

      \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
    6. pow2N/A

      \[\leadsto \sqrt[3]{{\left({x}^{2}\right)}^{-1}} \cdot \frac{1}{3} \]
    7. inv-powN/A

      \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \frac{1}{3} \]
    8. pow-flipN/A

      \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
    9. lower-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
    10. metadata-eval52.5

      \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
  7. Applied rewrites52.5%

    \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
  8. Add Preprocessing

Alternative 5: 51.1% accurate, N/A× speedup?

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

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

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

    \[\leadsto \color{blue}{\frac{1}{3} \cdot \sqrt[3]{\frac{1}{{x}^{2}}}} \]
  4. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
    2. lower-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \color{blue}{\frac{1}{3}} \]
    3. pow1/3N/A

      \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    4. lower-pow.f64N/A

      \[\leadsto {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    5. inv-powN/A

      \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    6. lower-pow.f64N/A

      \[\leadsto {\left({\left({x}^{2}\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    7. unpow2N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    8. lower-*.f6446.7

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333 \]
  5. Applied rewrites46.7%

    \[\leadsto \color{blue}{{\left({\left(x \cdot x\right)}^{-1}\right)}^{0.3333333333333333} \cdot 0.3333333333333333} \]
  6. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    2. lift-*.f64N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    3. lift-pow.f64N/A

      \[\leadsto {\left({\left(x \cdot x\right)}^{-1}\right)}^{\frac{1}{3}} \cdot \frac{1}{3} \]
    4. unpow1/3N/A

      \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
    5. lower-cbrt.f64N/A

      \[\leadsto \sqrt[3]{{\left(x \cdot x\right)}^{-1}} \cdot \frac{1}{3} \]
    6. pow2N/A

      \[\leadsto \sqrt[3]{{\left({x}^{2}\right)}^{-1}} \cdot \frac{1}{3} \]
    7. inv-powN/A

      \[\leadsto \sqrt[3]{\frac{1}{{x}^{2}}} \cdot \frac{1}{3} \]
    8. pow-flipN/A

      \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
    9. lower-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{\left(\mathsf{neg}\left(2\right)\right)}} \cdot \frac{1}{3} \]
    10. metadata-eval52.5

      \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
  7. Applied rewrites52.5%

    \[\leadsto \sqrt[3]{{x}^{-2}} \cdot 0.3333333333333333 \]
  8. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{-2}} \cdot \frac{1}{3} \]
    2. sqr-powN/A

      \[\leadsto \sqrt[3]{{x}^{\left(\frac{-2}{2}\right)} \cdot {x}^{\left(\frac{-2}{2}\right)}} \cdot \frac{1}{3} \]
    3. metadata-evalN/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{\left(\frac{-2}{2}\right)}} \cdot \frac{1}{3} \]
    4. inv-powN/A

      \[\leadsto \sqrt[3]{\frac{1}{x} \cdot {x}^{\left(\frac{-2}{2}\right)}} \cdot \frac{1}{3} \]
    5. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{1}{x} \cdot {x}^{-1}} \cdot \frac{1}{3} \]
    6. inv-powN/A

      \[\leadsto \sqrt[3]{\frac{1}{x} \cdot \frac{1}{x}} \cdot \frac{1}{3} \]
    7. lower-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{1}{x} \cdot \frac{1}{x}} \cdot \frac{1}{3} \]
    8. inv-powN/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot \frac{1}{x}} \cdot \frac{1}{3} \]
    9. lower-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot \frac{1}{x}} \cdot \frac{1}{3} \]
    10. inv-powN/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{-1}} \cdot \frac{1}{3} \]
    11. lower-pow.f6452.5

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{-1}} \cdot 0.3333333333333333 \]
  9. Applied rewrites52.5%

    \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{-1}} \cdot 0.3333333333333333 \]
  10. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot {x}^{-1}} \cdot \frac{1}{3} \]
    2. sqr-powN/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot \left({x}^{\left(\frac{-1}{2}\right)} \cdot {x}^{\left(\frac{-1}{2}\right)}\right)} \cdot \frac{1}{3} \]
    3. lower-*.f64N/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot \left({x}^{\left(\frac{-1}{2}\right)} \cdot {x}^{\left(\frac{-1}{2}\right)}\right)} \cdot \frac{1}{3} \]
    4. lower-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot \left({x}^{\left(\frac{-1}{2}\right)} \cdot {x}^{\left(\frac{-1}{2}\right)}\right)} \cdot \frac{1}{3} \]
    5. metadata-evalN/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot \left({x}^{\frac{-1}{2}} \cdot {x}^{\left(\frac{-1}{2}\right)}\right)} \cdot \frac{1}{3} \]
    6. lower-pow.f64N/A

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot \left({x}^{\frac{-1}{2}} \cdot {x}^{\left(\frac{-1}{2}\right)}\right)} \cdot \frac{1}{3} \]
    7. metadata-eval52.5

      \[\leadsto \sqrt[3]{{x}^{-1} \cdot \left({x}^{-0.5} \cdot {x}^{-0.5}\right)} \cdot 0.3333333333333333 \]
  11. Applied rewrites52.5%

    \[\leadsto \sqrt[3]{{x}^{-1} \cdot \left({x}^{-0.5} \cdot {x}^{-0.5}\right)} \cdot 0.3333333333333333 \]
  12. Add Preprocessing

Reproduce

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

  :alt
  (! :herbie-platform c (/ 1 (+ (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (cbrt x) (cbrt (+ x 1))) (* (cbrt x) (cbrt x)))))

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