2-ancestry mixing, zero discriminant

Percentage Accurate: 76.4% → 98.7%
Time: 5.8s
Alternatives: 12
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \sqrt[3]{\frac{g}{2 \cdot a}} \end{array} \]
(FPCore (g a) :precision binary64 (cbrt (/ g (* 2.0 a))))
double code(double g, double a) {
	return cbrt((g / (2.0 * a)));
}
public static double code(double g, double a) {
	return Math.cbrt((g / (2.0 * a)));
}
function code(g, a)
	return cbrt(Float64(g / Float64(2.0 * a)))
end
code[g_, a_] := N[Power[N[(g / N[(2.0 * a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]
\begin{array}{l}

\\
\sqrt[3]{\frac{g}{2 \cdot a}}
\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 12 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: 76.4% accurate, 1.0× speedup?

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

\\
\sqrt[3]{\frac{g}{2 \cdot a}}
\end{array}

Alternative 1: 98.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \frac{\sqrt[3]{\frac{0.5}{{g}^{-1}}}}{\sqrt[3]{a}} \end{array} \]
(FPCore (g a) :precision binary64 (/ (cbrt (/ 0.5 (pow g -1.0))) (cbrt a)))
double code(double g, double a) {
	return cbrt((0.5 / pow(g, -1.0))) / cbrt(a);
}
public static double code(double g, double a) {
	return Math.cbrt((0.5 / Math.pow(g, -1.0))) / Math.cbrt(a);
}
function code(g, a)
	return Float64(cbrt(Float64(0.5 / (g ^ -1.0))) / cbrt(a))
end
code[g_, a_] := N[(N[Power[N[(0.5 / N[Power[g, -1.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[a, 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sqrt[3]{\frac{0.5}{{g}^{-1}}}}{\sqrt[3]{a}}
\end{array}
Derivation
  1. Initial program 71.5%

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-cbrt.f64N/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{g}{2 \cdot a}}} \]
    2. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
    3. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{2 \cdot a}}} \]
    4. associate-/r*N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{g}{2}}{a}}} \]
    5. frac-2negN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(\frac{g}{2}\right)}{\mathsf{neg}\left(a\right)}}} \]
    6. cbrt-divN/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(\frac{g}{2}\right)}}{\sqrt[3]{\mathsf{neg}\left(a\right)}}} \]
    7. distribute-neg-fracN/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    8. cbrt-divN/A

      \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(g\right)}}{\sqrt[3]{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    9. pow1/3N/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    10. sqr-powN/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    11. pow-prod-downN/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\left(\mathsf{neg}\left(g\right)\right) \cdot \left(\mathsf{neg}\left(g\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    12. sqr-negN/A

      \[\leadsto \frac{\frac{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    13. remove-double-negN/A

      \[\leadsto \frac{\frac{{\left(\color{blue}{g} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    14. remove-double-negN/A

      \[\leadsto \frac{\frac{{\left(g \cdot \color{blue}{g}\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    15. pow-prod-downN/A

      \[\leadsto \frac{\frac{\color{blue}{{g}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {g}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    16. sqr-powN/A

      \[\leadsto \frac{\frac{\color{blue}{{g}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    17. pow1/3N/A

      \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    18. cbrt-divN/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{g}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    19. pow1/3N/A

      \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
    20. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{g}{2}}}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
  4. Applied rewrites98.8%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{-0.5 \cdot g}}{\sqrt[3]{-a}}} \]
  5. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{-a}}} \]
    2. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\color{blue}{\sqrt[3]{-a}}} \]
    3. /-rgt-identityN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\color{blue}{\frac{-a}{1}}}} \]
    4. lift-neg.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\frac{\color{blue}{\mathsf{neg}\left(a\right)}}{1}}} \]
    5. metadata-evalN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\frac{\mathsf{neg}\left(a\right)}{\color{blue}{\mathsf{neg}\left(-1\right)}}}} \]
    6. frac-2negN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\color{blue}{\frac{a}{-1}}}} \]
    7. cbrt-undivN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\color{blue}{\frac{\sqrt[3]{a}}{\sqrt[3]{-1}}}} \]
    8. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\frac{\color{blue}{\sqrt[3]{a}}}{\sqrt[3]{-1}}} \]
    9. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\frac{\sqrt[3]{a}}{\color{blue}{\sqrt[3]{-1}}}} \]
    10. un-div-invN/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{-1}{2} \cdot g} \cdot \frac{1}{\frac{\sqrt[3]{a}}{\sqrt[3]{-1}}}} \]
    11. clear-numN/A

      \[\leadsto \sqrt[3]{\frac{-1}{2} \cdot g} \cdot \color{blue}{\frac{\sqrt[3]{-1}}{\sqrt[3]{a}}} \]
    12. associate-*r/N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot g} \cdot \sqrt[3]{-1}}{\sqrt[3]{a}}} \]
    13. *-commutativeN/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{-1} \cdot \sqrt[3]{\frac{-1}{2} \cdot g}}}{\sqrt[3]{a}} \]
    14. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{-1} \cdot \sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{a}}} \]
  6. Applied rewrites98.8%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{0.5 \cdot g}}{\sqrt[3]{a}}} \]
  7. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{1}{2} \cdot g}}}{\sqrt[3]{a}} \]
    2. *-rgt-identityN/A

      \[\leadsto \frac{\sqrt[3]{\frac{1}{2} \cdot \color{blue}{\left(g \cdot 1\right)}}}{\sqrt[3]{a}} \]
    3. *-inversesN/A

      \[\leadsto \frac{\sqrt[3]{\frac{1}{2} \cdot \left(g \cdot \color{blue}{\frac{g}{g}}\right)}}{\sqrt[3]{a}} \]
    4. associate-/l*N/A

      \[\leadsto \frac{\sqrt[3]{\frac{1}{2} \cdot \color{blue}{\frac{g \cdot g}{g}}}}{\sqrt[3]{a}} \]
    5. lift-*.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{1}{2} \cdot \frac{\color{blue}{g \cdot g}}{g}}}{\sqrt[3]{a}} \]
    6. clear-numN/A

      \[\leadsto \frac{\sqrt[3]{\frac{1}{2} \cdot \color{blue}{\frac{1}{\frac{g}{g \cdot g}}}}}{\sqrt[3]{a}} \]
    7. un-div-invN/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\frac{1}{2}}{\frac{g}{g \cdot g}}}}}{\sqrt[3]{a}} \]
    8. lower-/.f64N/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\frac{1}{2}}{\frac{g}{g \cdot g}}}}}{\sqrt[3]{a}} \]
    9. lift-*.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{\frac{g}{\color{blue}{g \cdot g}}}}}{\sqrt[3]{a}} \]
    10. associate-/r*N/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{\color{blue}{\frac{\frac{g}{g}}{g}}}}}{\sqrt[3]{a}} \]
    11. *-inversesN/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{\frac{\color{blue}{1}}{g}}}}{\sqrt[3]{a}} \]
    12. inv-powN/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{\color{blue}{{g}^{-1}}}}}{\sqrt[3]{a}} \]
    13. lower-pow.f6498.8

      \[\leadsto \frac{\sqrt[3]{\frac{0.5}{\color{blue}{{g}^{-1}}}}}{\sqrt[3]{a}} \]
  8. Applied rewrites98.8%

    \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{0.5}{{g}^{-1}}}}}{\sqrt[3]{a}} \]
  9. Add Preprocessing

Alternative 2: 91.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot a \leq -2 \cdot 10^{-303}:\\ \;\;\;\;\sqrt[3]{-0.5 \cdot g} \cdot {\left(-a\right)}^{-0.3333333333333333}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot a\right)}^{-0.3333333333333333} \cdot \sqrt[3]{g}\\ \end{array} \end{array} \]
(FPCore (g a)
 :precision binary64
 (if (<= (* 2.0 a) -2e-303)
   (* (cbrt (* -0.5 g)) (pow (- a) -0.3333333333333333))
   (* (pow (* 2.0 a) -0.3333333333333333) (cbrt g))))
double code(double g, double a) {
	double tmp;
	if ((2.0 * a) <= -2e-303) {
		tmp = cbrt((-0.5 * g)) * pow(-a, -0.3333333333333333);
	} else {
		tmp = pow((2.0 * a), -0.3333333333333333) * cbrt(g);
	}
	return tmp;
}
public static double code(double g, double a) {
	double tmp;
	if ((2.0 * a) <= -2e-303) {
		tmp = Math.cbrt((-0.5 * g)) * Math.pow(-a, -0.3333333333333333);
	} else {
		tmp = Math.pow((2.0 * a), -0.3333333333333333) * Math.cbrt(g);
	}
	return tmp;
}
function code(g, a)
	tmp = 0.0
	if (Float64(2.0 * a) <= -2e-303)
		tmp = Float64(cbrt(Float64(-0.5 * g)) * (Float64(-a) ^ -0.3333333333333333));
	else
		tmp = Float64((Float64(2.0 * a) ^ -0.3333333333333333) * cbrt(g));
	end
	return tmp
end
code[g_, a_] := If[LessEqual[N[(2.0 * a), $MachinePrecision], -2e-303], N[(N[Power[N[(-0.5 * g), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[(-a), -0.3333333333333333], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(2.0 * a), $MachinePrecision], -0.3333333333333333], $MachinePrecision] * N[Power[g, 1/3], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;2 \cdot a \leq -2 \cdot 10^{-303}:\\
\;\;\;\;\sqrt[3]{-0.5 \cdot g} \cdot {\left(-a\right)}^{-0.3333333333333333}\\

\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot a\right)}^{-0.3333333333333333} \cdot \sqrt[3]{g}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 #s(literal 2 binary64) a) < -1.99999999999999986e-303

    1. Initial program 69.4%

      \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
    2. Add Preprocessing
    3. Applied rewrites98.7%

      \[\leadsto \color{blue}{\sqrt[3]{\frac{-1}{a}} \cdot \sqrt[3]{-0.5 \cdot g}} \]
    4. Step-by-step derivation
      1. lift-cbrt.f64N/A

        \[\leadsto \color{blue}{\sqrt[3]{\frac{-1}{a}}} \cdot \sqrt[3]{\frac{-1}{2} \cdot g} \]
      2. lift-/.f64N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{-1}{a}}} \cdot \sqrt[3]{\frac{-1}{2} \cdot g} \]
      3. frac-2negN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(a\right)}}} \cdot \sqrt[3]{\frac{-1}{2} \cdot g} \]
      4. lift-neg.f64N/A

        \[\leadsto \sqrt[3]{\frac{\mathsf{neg}\left(-1\right)}{\color{blue}{-a}}} \cdot \sqrt[3]{\frac{-1}{2} \cdot g} \]
      5. cbrt-divN/A

        \[\leadsto \color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(-1\right)}}{\sqrt[3]{-a}}} \cdot \sqrt[3]{\frac{-1}{2} \cdot g} \]
      6. metadata-evalN/A

        \[\leadsto \frac{\sqrt[3]{\color{blue}{1}}}{\sqrt[3]{-a}} \cdot \sqrt[3]{\frac{-1}{2} \cdot g} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{1}}{\sqrt[3]{-a}} \cdot \sqrt[3]{\frac{-1}{2} \cdot g} \]
      8. pow1/3N/A

        \[\leadsto \frac{1}{\color{blue}{{\left(-a\right)}^{\frac{1}{3}}}} \cdot \sqrt[3]{\frac{-1}{2} \cdot g} \]
      9. pow-flipN/A

        \[\leadsto \color{blue}{{\left(-a\right)}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}} \cdot \sqrt[3]{\frac{-1}{2} \cdot g} \]
      10. lower-pow.f64N/A

        \[\leadsto \color{blue}{{\left(-a\right)}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}} \cdot \sqrt[3]{\frac{-1}{2} \cdot g} \]
      11. metadata-eval92.1

        \[\leadsto {\left(-a\right)}^{\color{blue}{-0.3333333333333333}} \cdot \sqrt[3]{-0.5 \cdot g} \]
    5. Applied rewrites92.1%

      \[\leadsto \color{blue}{{\left(-a\right)}^{-0.3333333333333333}} \cdot \sqrt[3]{-0.5 \cdot g} \]

    if -1.99999999999999986e-303 < (*.f64 #s(literal 2 binary64) a)

    1. Initial program 73.3%

      \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-cbrt.f64N/A

        \[\leadsto \color{blue}{\sqrt[3]{\frac{g}{2 \cdot a}}} \]
      2. lift-/.f64N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{2 \cdot a}}} \]
      4. associate-/r*N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{g}{2}}{a}}} \]
      5. frac-2negN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(\frac{g}{2}\right)}{\mathsf{neg}\left(a\right)}}} \]
      6. cbrt-divN/A

        \[\leadsto \color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(\frac{g}{2}\right)}}{\sqrt[3]{\mathsf{neg}\left(a\right)}}} \]
      7. distribute-neg-fracN/A

        \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      8. cbrt-divN/A

        \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(g\right)}}{\sqrt[3]{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      9. pow1/3N/A

        \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      10. sqr-powN/A

        \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      11. pow-prod-downN/A

        \[\leadsto \frac{\frac{\color{blue}{{\left(\left(\mathsf{neg}\left(g\right)\right) \cdot \left(\mathsf{neg}\left(g\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      12. sqr-negN/A

        \[\leadsto \frac{\frac{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      13. remove-double-negN/A

        \[\leadsto \frac{\frac{{\left(\color{blue}{g} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      14. remove-double-negN/A

        \[\leadsto \frac{\frac{{\left(g \cdot \color{blue}{g}\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      15. pow-prod-downN/A

        \[\leadsto \frac{\frac{\color{blue}{{g}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {g}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      16. sqr-powN/A

        \[\leadsto \frac{\frac{\color{blue}{{g}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      17. pow1/3N/A

        \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      18. cbrt-divN/A

        \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{g}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      19. pow1/3N/A

        \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
      20. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{g}{2}}}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
    4. Applied rewrites98.8%

      \[\leadsto \color{blue}{\frac{\sqrt[3]{-0.5 \cdot g}}{\sqrt[3]{-a}}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{-a}}} \]
      2. lift-cbrt.f64N/A

        \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{-1}{2} \cdot g}}}{\sqrt[3]{-a}} \]
      3. lift-cbrt.f64N/A

        \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\color{blue}{\sqrt[3]{-a}}} \]
      4. cbrt-undivN/A

        \[\leadsto \color{blue}{\sqrt[3]{\frac{\frac{-1}{2} \cdot g}{-a}}} \]
      5. div-invN/A

        \[\leadsto \sqrt[3]{\color{blue}{\left(\frac{-1}{2} \cdot g\right) \cdot \frac{1}{-a}}} \]
      6. metadata-evalN/A

        \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{-a}} \]
      7. lift-neg.f64N/A

        \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(a\right)}}} \]
      8. frac-2negN/A

        \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \color{blue}{\frac{-1}{a}}} \]
      9. lift-/.f64N/A

        \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \color{blue}{\frac{-1}{a}}} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{-1}{a} \cdot \left(\frac{-1}{2} \cdot g\right)}} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt[3]{\frac{-1}{a} \cdot \color{blue}{\left(\frac{-1}{2} \cdot g\right)}} \]
      12. associate-*r*N/A

        \[\leadsto \sqrt[3]{\color{blue}{\left(\frac{-1}{a} \cdot \frac{-1}{2}\right) \cdot g}} \]
      13. cbrt-prodN/A

        \[\leadsto \color{blue}{\sqrt[3]{\frac{-1}{a} \cdot \frac{-1}{2}} \cdot \sqrt[3]{g}} \]
      14. cbrt-unprodN/A

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{-1}{a}} \cdot \sqrt[3]{\frac{-1}{2}}\right)} \cdot \sqrt[3]{g} \]
      15. lift-cbrt.f64N/A

        \[\leadsto \left(\color{blue}{\sqrt[3]{\frac{-1}{a}}} \cdot \sqrt[3]{\frac{-1}{2}}\right) \cdot \sqrt[3]{g} \]
      16. pow1/3N/A

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

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{-1}{a}} \cdot {\frac{-1}{2}}^{\frac{1}{3}}\right) \cdot \sqrt[3]{g}} \]
    6. Applied rewrites98.7%

      \[\leadsto \color{blue}{\sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{g}} \]
    7. Step-by-step derivation
      1. lift-cbrt.f64N/A

        \[\leadsto \color{blue}{\sqrt[3]{\frac{\frac{1}{2}}{a}}} \cdot \sqrt[3]{g} \]
      2. lift-/.f64N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{1}{2}}{a}}} \cdot \sqrt[3]{g} \]
      3. clear-numN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\frac{a}{\frac{1}{2}}}}} \cdot \sqrt[3]{g} \]
      4. cbrt-divN/A

        \[\leadsto \color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{\frac{a}{\frac{1}{2}}}}} \cdot \sqrt[3]{g} \]
      5. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{1}}{\sqrt[3]{\frac{a}{\frac{1}{2}}}} \cdot \sqrt[3]{g} \]
      6. div-invN/A

        \[\leadsto \frac{1}{\sqrt[3]{\color{blue}{a \cdot \frac{1}{\frac{1}{2}}}}} \cdot \sqrt[3]{g} \]
      7. metadata-evalN/A

        \[\leadsto \frac{1}{\sqrt[3]{a \cdot \color{blue}{2}}} \cdot \sqrt[3]{g} \]
      8. *-commutativeN/A

        \[\leadsto \frac{1}{\sqrt[3]{\color{blue}{2 \cdot a}}} \cdot \sqrt[3]{g} \]
      9. metadata-evalN/A

        \[\leadsto \frac{1}{\sqrt[3]{\color{blue}{\frac{-1}{\frac{-1}{2}}} \cdot a}} \cdot \sqrt[3]{g} \]
      10. associate-/r/N/A

        \[\leadsto \frac{1}{\sqrt[3]{\color{blue}{\frac{-1}{\frac{\frac{-1}{2}}{a}}}}} \cdot \sqrt[3]{g} \]
      11. lift-/.f64N/A

        \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\color{blue}{\frac{\frac{-1}{2}}{a}}}}} \cdot \sqrt[3]{g} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{1}{\sqrt[3]{\color{blue}{\frac{-1}{\frac{\frac{-1}{2}}{a}}}}} \cdot \sqrt[3]{g} \]
      13. pow1/3N/A

        \[\leadsto \frac{1}{\color{blue}{{\left(\frac{-1}{\frac{\frac{-1}{2}}{a}}\right)}^{\frac{1}{3}}}} \cdot \sqrt[3]{g} \]
      14. pow-flipN/A

        \[\leadsto \color{blue}{{\left(\frac{-1}{\frac{\frac{-1}{2}}{a}}\right)}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}} \cdot \sqrt[3]{g} \]
      15. lower-pow.f64N/A

        \[\leadsto \color{blue}{{\left(\frac{-1}{\frac{\frac{-1}{2}}{a}}\right)}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}} \cdot \sqrt[3]{g} \]
      16. lift-/.f64N/A

        \[\leadsto {\color{blue}{\left(\frac{-1}{\frac{\frac{-1}{2}}{a}}\right)}}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \cdot \sqrt[3]{g} \]
      17. lift-/.f64N/A

        \[\leadsto {\left(\frac{-1}{\color{blue}{\frac{\frac{-1}{2}}{a}}}\right)}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \cdot \sqrt[3]{g} \]
      18. associate-/r/N/A

        \[\leadsto {\color{blue}{\left(\frac{-1}{\frac{-1}{2}} \cdot a\right)}}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \cdot \sqrt[3]{g} \]
      19. metadata-evalN/A

        \[\leadsto {\left(\color{blue}{2} \cdot a\right)}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \cdot \sqrt[3]{g} \]
      20. lower-*.f64N/A

        \[\leadsto {\color{blue}{\left(2 \cdot a\right)}}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \cdot \sqrt[3]{g} \]
      21. metadata-eval92.1

        \[\leadsto {\left(2 \cdot a\right)}^{\color{blue}{-0.3333333333333333}} \cdot \sqrt[3]{g} \]
    8. Applied rewrites92.1%

      \[\leadsto \color{blue}{{\left(2 \cdot a\right)}^{-0.3333333333333333}} \cdot \sqrt[3]{g} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;2 \cdot a \leq -2 \cdot 10^{-303}:\\ \;\;\;\;\sqrt[3]{-0.5 \cdot g} \cdot {\left(-a\right)}^{-0.3333333333333333}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot a\right)}^{-0.3333333333333333} \cdot \sqrt[3]{g}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 84.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot a \leq -2 \cdot 10^{-303}:\\ \;\;\;\;\sqrt[3]{\frac{\frac{1}{\frac{\frac{-1}{g}}{-0.5}}}{a}}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot a\right)}^{-0.3333333333333333} \cdot \sqrt[3]{g}\\ \end{array} \end{array} \]
(FPCore (g a)
 :precision binary64
 (if (<= (* 2.0 a) -2e-303)
   (cbrt (/ (/ 1.0 (/ (/ -1.0 g) -0.5)) a))
   (* (pow (* 2.0 a) -0.3333333333333333) (cbrt g))))
double code(double g, double a) {
	double tmp;
	if ((2.0 * a) <= -2e-303) {
		tmp = cbrt(((1.0 / ((-1.0 / g) / -0.5)) / a));
	} else {
		tmp = pow((2.0 * a), -0.3333333333333333) * cbrt(g);
	}
	return tmp;
}
public static double code(double g, double a) {
	double tmp;
	if ((2.0 * a) <= -2e-303) {
		tmp = Math.cbrt(((1.0 / ((-1.0 / g) / -0.5)) / a));
	} else {
		tmp = Math.pow((2.0 * a), -0.3333333333333333) * Math.cbrt(g);
	}
	return tmp;
}
function code(g, a)
	tmp = 0.0
	if (Float64(2.0 * a) <= -2e-303)
		tmp = cbrt(Float64(Float64(1.0 / Float64(Float64(-1.0 / g) / -0.5)) / a));
	else
		tmp = Float64((Float64(2.0 * a) ^ -0.3333333333333333) * cbrt(g));
	end
	return tmp
end
code[g_, a_] := If[LessEqual[N[(2.0 * a), $MachinePrecision], -2e-303], N[Power[N[(N[(1.0 / N[(N[(-1.0 / g), $MachinePrecision] / -0.5), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], 1/3], $MachinePrecision], N[(N[Power[N[(2.0 * a), $MachinePrecision], -0.3333333333333333], $MachinePrecision] * N[Power[g, 1/3], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;2 \cdot a \leq -2 \cdot 10^{-303}:\\
\;\;\;\;\sqrt[3]{\frac{\frac{1}{\frac{\frac{-1}{g}}{-0.5}}}{a}}\\

\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot a\right)}^{-0.3333333333333333} \cdot \sqrt[3]{g}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 #s(literal 2 binary64) a) < -1.99999999999999986e-303

    1. Initial program 69.4%

      \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
      2. frac-2negN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{\mathsf{neg}\left(2 \cdot a\right)}}} \]
      3. clear-numN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\frac{\mathsf{neg}\left(2 \cdot a\right)}{\mathsf{neg}\left(g\right)}}}} \]
      4. associate-/r/N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\mathsf{neg}\left(2 \cdot a\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)}} \]
      5. inv-powN/A

        \[\leadsto \sqrt[3]{\color{blue}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{-1}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      6. metadata-evalN/A

        \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\color{blue}{\left(\frac{-1}{2} + \frac{-1}{2}\right)}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      7. metadata-evalN/A

        \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \frac{-1}{2}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      8. metadata-evalN/A

        \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right) + \frac{-1}{2}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      9. metadata-evalN/A

        \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      10. metadata-evalN/A

        \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      11. pow-prod-upN/A

        \[\leadsto \sqrt[3]{\color{blue}{\left({\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      12. pow-prod-downN/A

        \[\leadsto \sqrt[3]{\color{blue}{{\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right) \cdot \left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      13. sqr-negN/A

        \[\leadsto \sqrt[3]{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right)\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      14. remove-double-negN/A

        \[\leadsto \sqrt[3]{{\left(\color{blue}{\left(2 \cdot a\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      15. remove-double-negN/A

        \[\leadsto \sqrt[3]{{\left(\left(2 \cdot a\right) \cdot \color{blue}{\left(2 \cdot a\right)}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      16. pow2N/A

        \[\leadsto \sqrt[3]{{\color{blue}{\left({\left(2 \cdot a\right)}^{2}\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      17. pow-powN/A

        \[\leadsto \sqrt[3]{\color{blue}{{\left(2 \cdot a\right)}^{\left(2 \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      18. metadata-evalN/A

        \[\leadsto \sqrt[3]{{\left(2 \cdot a\right)}^{\left(2 \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      19. metadata-evalN/A

        \[\leadsto \sqrt[3]{{\left(2 \cdot a\right)}^{\left(2 \cdot \color{blue}{\frac{-1}{2}}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      20. metadata-evalN/A

        \[\leadsto \sqrt[3]{{\left(2 \cdot a\right)}^{\color{blue}{-1}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
      21. inv-powN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{2 \cdot a}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    4. Applied rewrites69.3%

      \[\leadsto \sqrt[3]{\color{blue}{\frac{-0.5}{a} \cdot \left(-g\right)}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{-1}{2}}{a} \cdot \left(-g\right)}} \]
      2. *-rgt-identityN/A

        \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \color{blue}{\left(\left(-g\right) \cdot 1\right)}} \]
      3. metadata-evalN/A

        \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \left(\left(-g\right) \cdot \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt[3]{\color{blue}{\left(\frac{\frac{-1}{2}}{a} \cdot \left(-g\right)\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)}} \]
      5. lift-/.f64N/A

        \[\leadsto \sqrt[3]{\left(\color{blue}{\frac{\frac{-1}{2}}{a}} \cdot \left(-g\right)\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)} \]
      6. associate-*l/N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{-1}{2} \cdot \left(-g\right)}{a}} \cdot \left(\mathsf{neg}\left(-1\right)\right)} \]
      7. metadata-evalN/A

        \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \left(-g\right)}{a} \cdot \color{blue}{1}} \]
      8. *-inversesN/A

        \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \left(-g\right)}{a} \cdot \color{blue}{\frac{g}{g}}} \]
      9. times-fracN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\left(\frac{-1}{2} \cdot \left(-g\right)\right) \cdot g}{a \cdot g}}} \]
      10. associate-*r*N/A

        \[\leadsto \sqrt[3]{\frac{\color{blue}{\frac{-1}{2} \cdot \left(\left(-g\right) \cdot g\right)}}{a \cdot g}} \]
      11. lift-neg.f64N/A

        \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(g\right)\right)} \cdot g\right)}{a \cdot g}} \]
      12. distribute-lft-neg-inN/A

        \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \color{blue}{\left(\mathsf{neg}\left(g \cdot g\right)\right)}}{a \cdot g}} \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \left(\mathsf{neg}\left(\color{blue}{g \cdot g}\right)\right)}{a \cdot g}} \]
      14. lift-neg.f64N/A

        \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \color{blue}{\left(-g \cdot g\right)}}{a \cdot g}} \]
      15. clear-numN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\frac{a \cdot g}{\frac{-1}{2} \cdot \left(-g \cdot g\right)}}}} \]
      16. metadata-evalN/A

        \[\leadsto \sqrt[3]{\frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\frac{a \cdot g}{\frac{-1}{2} \cdot \left(-g \cdot g\right)}}} \]
      17. *-commutativeN/A

        \[\leadsto \sqrt[3]{\frac{\mathsf{neg}\left(-1\right)}{\frac{\color{blue}{g \cdot a}}{\frac{-1}{2} \cdot \left(-g \cdot g\right)}}} \]
      18. associate-*l/N/A

        \[\leadsto \sqrt[3]{\frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\frac{g}{\frac{-1}{2} \cdot \left(-g \cdot g\right)} \cdot a}}} \]
      19. associate-/r*N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{\mathsf{neg}\left(-1\right)}{\frac{g}{\frac{-1}{2} \cdot \left(-g \cdot g\right)}}}{a}}} \]
      20. lower-/.f64N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{\mathsf{neg}\left(-1\right)}{\frac{g}{\frac{-1}{2} \cdot \left(-g \cdot g\right)}}}{a}}} \]
    6. Applied rewrites69.4%

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{1}{\frac{\frac{-1}{g}}{-0.5}}}{a}}} \]

    if -1.99999999999999986e-303 < (*.f64 #s(literal 2 binary64) a)

    1. Initial program 73.3%

      \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-cbrt.f64N/A

        \[\leadsto \color{blue}{\sqrt[3]{\frac{g}{2 \cdot a}}} \]
      2. lift-/.f64N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{2 \cdot a}}} \]
      4. associate-/r*N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{g}{2}}{a}}} \]
      5. frac-2negN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(\frac{g}{2}\right)}{\mathsf{neg}\left(a\right)}}} \]
      6. cbrt-divN/A

        \[\leadsto \color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(\frac{g}{2}\right)}}{\sqrt[3]{\mathsf{neg}\left(a\right)}}} \]
      7. distribute-neg-fracN/A

        \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      8. cbrt-divN/A

        \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(g\right)}}{\sqrt[3]{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      9. pow1/3N/A

        \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      10. sqr-powN/A

        \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      11. pow-prod-downN/A

        \[\leadsto \frac{\frac{\color{blue}{{\left(\left(\mathsf{neg}\left(g\right)\right) \cdot \left(\mathsf{neg}\left(g\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      12. sqr-negN/A

        \[\leadsto \frac{\frac{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      13. remove-double-negN/A

        \[\leadsto \frac{\frac{{\left(\color{blue}{g} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      14. remove-double-negN/A

        \[\leadsto \frac{\frac{{\left(g \cdot \color{blue}{g}\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      15. pow-prod-downN/A

        \[\leadsto \frac{\frac{\color{blue}{{g}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {g}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      16. sqr-powN/A

        \[\leadsto \frac{\frac{\color{blue}{{g}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      17. pow1/3N/A

        \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      18. cbrt-divN/A

        \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{g}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
      19. pow1/3N/A

        \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
      20. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{g}{2}}}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
    4. Applied rewrites98.8%

      \[\leadsto \color{blue}{\frac{\sqrt[3]{-0.5 \cdot g}}{\sqrt[3]{-a}}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{-a}}} \]
      2. lift-cbrt.f64N/A

        \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{-1}{2} \cdot g}}}{\sqrt[3]{-a}} \]
      3. lift-cbrt.f64N/A

        \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\color{blue}{\sqrt[3]{-a}}} \]
      4. cbrt-undivN/A

        \[\leadsto \color{blue}{\sqrt[3]{\frac{\frac{-1}{2} \cdot g}{-a}}} \]
      5. div-invN/A

        \[\leadsto \sqrt[3]{\color{blue}{\left(\frac{-1}{2} \cdot g\right) \cdot \frac{1}{-a}}} \]
      6. metadata-evalN/A

        \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{-a}} \]
      7. lift-neg.f64N/A

        \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(a\right)}}} \]
      8. frac-2negN/A

        \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \color{blue}{\frac{-1}{a}}} \]
      9. lift-/.f64N/A

        \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \color{blue}{\frac{-1}{a}}} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{-1}{a} \cdot \left(\frac{-1}{2} \cdot g\right)}} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt[3]{\frac{-1}{a} \cdot \color{blue}{\left(\frac{-1}{2} \cdot g\right)}} \]
      12. associate-*r*N/A

        \[\leadsto \sqrt[3]{\color{blue}{\left(\frac{-1}{a} \cdot \frac{-1}{2}\right) \cdot g}} \]
      13. cbrt-prodN/A

        \[\leadsto \color{blue}{\sqrt[3]{\frac{-1}{a} \cdot \frac{-1}{2}} \cdot \sqrt[3]{g}} \]
      14. cbrt-unprodN/A

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{-1}{a}} \cdot \sqrt[3]{\frac{-1}{2}}\right)} \cdot \sqrt[3]{g} \]
      15. lift-cbrt.f64N/A

        \[\leadsto \left(\color{blue}{\sqrt[3]{\frac{-1}{a}}} \cdot \sqrt[3]{\frac{-1}{2}}\right) \cdot \sqrt[3]{g} \]
      16. pow1/3N/A

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

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{-1}{a}} \cdot {\frac{-1}{2}}^{\frac{1}{3}}\right) \cdot \sqrt[3]{g}} \]
    6. Applied rewrites98.7%

      \[\leadsto \color{blue}{\sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{g}} \]
    7. Step-by-step derivation
      1. lift-cbrt.f64N/A

        \[\leadsto \color{blue}{\sqrt[3]{\frac{\frac{1}{2}}{a}}} \cdot \sqrt[3]{g} \]
      2. lift-/.f64N/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{1}{2}}{a}}} \cdot \sqrt[3]{g} \]
      3. clear-numN/A

        \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\frac{a}{\frac{1}{2}}}}} \cdot \sqrt[3]{g} \]
      4. cbrt-divN/A

        \[\leadsto \color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{\frac{a}{\frac{1}{2}}}}} \cdot \sqrt[3]{g} \]
      5. metadata-evalN/A

        \[\leadsto \frac{\color{blue}{1}}{\sqrt[3]{\frac{a}{\frac{1}{2}}}} \cdot \sqrt[3]{g} \]
      6. div-invN/A

        \[\leadsto \frac{1}{\sqrt[3]{\color{blue}{a \cdot \frac{1}{\frac{1}{2}}}}} \cdot \sqrt[3]{g} \]
      7. metadata-evalN/A

        \[\leadsto \frac{1}{\sqrt[3]{a \cdot \color{blue}{2}}} \cdot \sqrt[3]{g} \]
      8. *-commutativeN/A

        \[\leadsto \frac{1}{\sqrt[3]{\color{blue}{2 \cdot a}}} \cdot \sqrt[3]{g} \]
      9. metadata-evalN/A

        \[\leadsto \frac{1}{\sqrt[3]{\color{blue}{\frac{-1}{\frac{-1}{2}}} \cdot a}} \cdot \sqrt[3]{g} \]
      10. associate-/r/N/A

        \[\leadsto \frac{1}{\sqrt[3]{\color{blue}{\frac{-1}{\frac{\frac{-1}{2}}{a}}}}} \cdot \sqrt[3]{g} \]
      11. lift-/.f64N/A

        \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\color{blue}{\frac{\frac{-1}{2}}{a}}}}} \cdot \sqrt[3]{g} \]
      12. lift-/.f64N/A

        \[\leadsto \frac{1}{\sqrt[3]{\color{blue}{\frac{-1}{\frac{\frac{-1}{2}}{a}}}}} \cdot \sqrt[3]{g} \]
      13. pow1/3N/A

        \[\leadsto \frac{1}{\color{blue}{{\left(\frac{-1}{\frac{\frac{-1}{2}}{a}}\right)}^{\frac{1}{3}}}} \cdot \sqrt[3]{g} \]
      14. pow-flipN/A

        \[\leadsto \color{blue}{{\left(\frac{-1}{\frac{\frac{-1}{2}}{a}}\right)}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}} \cdot \sqrt[3]{g} \]
      15. lower-pow.f64N/A

        \[\leadsto \color{blue}{{\left(\frac{-1}{\frac{\frac{-1}{2}}{a}}\right)}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)}} \cdot \sqrt[3]{g} \]
      16. lift-/.f64N/A

        \[\leadsto {\color{blue}{\left(\frac{-1}{\frac{\frac{-1}{2}}{a}}\right)}}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \cdot \sqrt[3]{g} \]
      17. lift-/.f64N/A

        \[\leadsto {\left(\frac{-1}{\color{blue}{\frac{\frac{-1}{2}}{a}}}\right)}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \cdot \sqrt[3]{g} \]
      18. associate-/r/N/A

        \[\leadsto {\color{blue}{\left(\frac{-1}{\frac{-1}{2}} \cdot a\right)}}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \cdot \sqrt[3]{g} \]
      19. metadata-evalN/A

        \[\leadsto {\left(\color{blue}{2} \cdot a\right)}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \cdot \sqrt[3]{g} \]
      20. lower-*.f64N/A

        \[\leadsto {\color{blue}{\left(2 \cdot a\right)}}^{\left(\mathsf{neg}\left(\frac{1}{3}\right)\right)} \cdot \sqrt[3]{g} \]
      21. metadata-eval92.1

        \[\leadsto {\left(2 \cdot a\right)}^{\color{blue}{-0.3333333333333333}} \cdot \sqrt[3]{g} \]
    8. Applied rewrites92.1%

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

Alternative 4: 98.7% accurate, 0.5× speedup?

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

\\
\frac{\sqrt[3]{g \cdot 0.5}}{\sqrt[3]{a}}
\end{array}
Derivation
  1. Initial program 71.5%

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-cbrt.f64N/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{g}{2 \cdot a}}} \]
    2. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
    3. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{2 \cdot a}}} \]
    4. associate-/r*N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{g}{2}}{a}}} \]
    5. frac-2negN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(\frac{g}{2}\right)}{\mathsf{neg}\left(a\right)}}} \]
    6. cbrt-divN/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(\frac{g}{2}\right)}}{\sqrt[3]{\mathsf{neg}\left(a\right)}}} \]
    7. distribute-neg-fracN/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    8. cbrt-divN/A

      \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(g\right)}}{\sqrt[3]{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    9. pow1/3N/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    10. sqr-powN/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    11. pow-prod-downN/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\left(\mathsf{neg}\left(g\right)\right) \cdot \left(\mathsf{neg}\left(g\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    12. sqr-negN/A

      \[\leadsto \frac{\frac{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    13. remove-double-negN/A

      \[\leadsto \frac{\frac{{\left(\color{blue}{g} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    14. remove-double-negN/A

      \[\leadsto \frac{\frac{{\left(g \cdot \color{blue}{g}\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    15. pow-prod-downN/A

      \[\leadsto \frac{\frac{\color{blue}{{g}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {g}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    16. sqr-powN/A

      \[\leadsto \frac{\frac{\color{blue}{{g}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    17. pow1/3N/A

      \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    18. cbrt-divN/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{g}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    19. pow1/3N/A

      \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
    20. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{g}{2}}}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
  4. Applied rewrites98.8%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{-0.5 \cdot g}}{\sqrt[3]{-a}}} \]
  5. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{-a}}} \]
    2. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\color{blue}{\sqrt[3]{-a}}} \]
    3. /-rgt-identityN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\color{blue}{\frac{-a}{1}}}} \]
    4. lift-neg.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\frac{\color{blue}{\mathsf{neg}\left(a\right)}}{1}}} \]
    5. metadata-evalN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\frac{\mathsf{neg}\left(a\right)}{\color{blue}{\mathsf{neg}\left(-1\right)}}}} \]
    6. frac-2negN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\color{blue}{\frac{a}{-1}}}} \]
    7. cbrt-undivN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\color{blue}{\frac{\sqrt[3]{a}}{\sqrt[3]{-1}}}} \]
    8. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\frac{\color{blue}{\sqrt[3]{a}}}{\sqrt[3]{-1}}} \]
    9. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\frac{\sqrt[3]{a}}{\color{blue}{\sqrt[3]{-1}}}} \]
    10. un-div-invN/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{-1}{2} \cdot g} \cdot \frac{1}{\frac{\sqrt[3]{a}}{\sqrt[3]{-1}}}} \]
    11. clear-numN/A

      \[\leadsto \sqrt[3]{\frac{-1}{2} \cdot g} \cdot \color{blue}{\frac{\sqrt[3]{-1}}{\sqrt[3]{a}}} \]
    12. associate-*r/N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot g} \cdot \sqrt[3]{-1}}{\sqrt[3]{a}}} \]
    13. *-commutativeN/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{-1} \cdot \sqrt[3]{\frac{-1}{2} \cdot g}}}{\sqrt[3]{a}} \]
    14. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{-1} \cdot \sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{a}}} \]
  6. Applied rewrites98.8%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{0.5 \cdot g}}{\sqrt[3]{a}}} \]
  7. Final simplification98.8%

    \[\leadsto \frac{\sqrt[3]{g \cdot 0.5}}{\sqrt[3]{a}} \]
  8. Add Preprocessing

Alternative 5: 98.7% accurate, 0.5× speedup?

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

\\
\frac{\sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}
\end{array}
Derivation
  1. Initial program 71.5%

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-cbrt.f64N/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{g}{2 \cdot a}}} \]
    2. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
    3. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{2 \cdot a}}} \]
    4. associate-/r*N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{g}{2}}{a}}} \]
    5. frac-2negN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(\frac{g}{2}\right)}{\mathsf{neg}\left(a\right)}}} \]
    6. cbrt-divN/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(\frac{g}{2}\right)}}{\sqrt[3]{\mathsf{neg}\left(a\right)}}} \]
    7. distribute-neg-fracN/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    8. cbrt-divN/A

      \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(g\right)}}{\sqrt[3]{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    9. pow1/3N/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    10. sqr-powN/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    11. pow-prod-downN/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\left(\mathsf{neg}\left(g\right)\right) \cdot \left(\mathsf{neg}\left(g\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    12. sqr-negN/A

      \[\leadsto \frac{\frac{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    13. remove-double-negN/A

      \[\leadsto \frac{\frac{{\left(\color{blue}{g} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    14. remove-double-negN/A

      \[\leadsto \frac{\frac{{\left(g \cdot \color{blue}{g}\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    15. pow-prod-downN/A

      \[\leadsto \frac{\frac{\color{blue}{{g}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {g}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    16. sqr-powN/A

      \[\leadsto \frac{\frac{\color{blue}{{g}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    17. pow1/3N/A

      \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    18. cbrt-divN/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{g}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    19. pow1/3N/A

      \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
    20. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{g}{2}}}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
  4. Applied rewrites98.8%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{-0.5 \cdot g}}{\sqrt[3]{-a}}} \]
  5. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{-a}}} \]
    2. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\color{blue}{\sqrt[3]{-a}}} \]
    3. /-rgt-identityN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\color{blue}{\frac{-a}{1}}}} \]
    4. lift-neg.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\frac{\color{blue}{\mathsf{neg}\left(a\right)}}{1}}} \]
    5. metadata-evalN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\frac{\mathsf{neg}\left(a\right)}{\color{blue}{\mathsf{neg}\left(-1\right)}}}} \]
    6. frac-2negN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{\color{blue}{\frac{a}{-1}}}} \]
    7. cbrt-undivN/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\color{blue}{\frac{\sqrt[3]{a}}{\sqrt[3]{-1}}}} \]
    8. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\frac{\color{blue}{\sqrt[3]{a}}}{\sqrt[3]{-1}}} \]
    9. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\frac{\sqrt[3]{a}}{\color{blue}{\sqrt[3]{-1}}}} \]
    10. un-div-invN/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{-1}{2} \cdot g} \cdot \frac{1}{\frac{\sqrt[3]{a}}{\sqrt[3]{-1}}}} \]
    11. clear-numN/A

      \[\leadsto \sqrt[3]{\frac{-1}{2} \cdot g} \cdot \color{blue}{\frac{\sqrt[3]{-1}}{\sqrt[3]{a}}} \]
    12. associate-*r/N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot g} \cdot \sqrt[3]{-1}}{\sqrt[3]{a}}} \]
    13. *-commutativeN/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{-1} \cdot \sqrt[3]{\frac{-1}{2} \cdot g}}}{\sqrt[3]{a}} \]
    14. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{-1} \cdot \sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{a}}} \]
  6. Applied rewrites98.8%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{0.5 \cdot g}}{\sqrt[3]{a}}} \]
  7. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{1}{2} \cdot g}}}{\sqrt[3]{a}} \]
    2. *-rgt-identityN/A

      \[\leadsto \frac{\sqrt[3]{\frac{1}{2} \cdot \color{blue}{\left(g \cdot 1\right)}}}{\sqrt[3]{a}} \]
    3. *-inversesN/A

      \[\leadsto \frac{\sqrt[3]{\frac{1}{2} \cdot \left(g \cdot \color{blue}{\frac{g}{g}}\right)}}{\sqrt[3]{a}} \]
    4. associate-/l*N/A

      \[\leadsto \frac{\sqrt[3]{\frac{1}{2} \cdot \color{blue}{\frac{g \cdot g}{g}}}}{\sqrt[3]{a}} \]
    5. lift-*.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{1}{2} \cdot \frac{\color{blue}{g \cdot g}}{g}}}{\sqrt[3]{a}} \]
    6. clear-numN/A

      \[\leadsto \frac{\sqrt[3]{\frac{1}{2} \cdot \color{blue}{\frac{1}{\frac{g}{g \cdot g}}}}}{\sqrt[3]{a}} \]
    7. un-div-invN/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\frac{1}{2}}{\frac{g}{g \cdot g}}}}}{\sqrt[3]{a}} \]
    8. lower-/.f64N/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\frac{1}{2}}{\frac{g}{g \cdot g}}}}}{\sqrt[3]{a}} \]
    9. lift-*.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{\frac{g}{\color{blue}{g \cdot g}}}}}{\sqrt[3]{a}} \]
    10. associate-/r*N/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{\color{blue}{\frac{\frac{g}{g}}{g}}}}}{\sqrt[3]{a}} \]
    11. *-inversesN/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{\frac{\color{blue}{1}}{g}}}}{\sqrt[3]{a}} \]
    12. inv-powN/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{\color{blue}{{g}^{-1}}}}}{\sqrt[3]{a}} \]
    13. lower-pow.f6498.8

      \[\leadsto \frac{\sqrt[3]{\frac{0.5}{\color{blue}{{g}^{-1}}}}}{\sqrt[3]{a}} \]
  8. Applied rewrites98.8%

    \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{0.5}{{g}^{-1}}}}}{\sqrt[3]{a}} \]
  9. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{\frac{1}{2}}{{g}^{-1}}}}{\sqrt[3]{a}}} \]
    2. lift-cbrt.f64N/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{\frac{1}{2}}{{g}^{-1}}}}}{\sqrt[3]{a}} \]
    3. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{{g}^{-1}}}}{\color{blue}{\sqrt[3]{a}}} \]
    4. remove-double-negN/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{{g}^{-1}}}}{\sqrt[3]{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}}} \]
    5. neg-mul-1N/A

      \[\leadsto \frac{\sqrt[3]{\frac{\frac{1}{2}}{{g}^{-1}}}}{\sqrt[3]{\color{blue}{-1 \cdot \left(\mathsf{neg}\left(a\right)\right)}}} \]
    6. cbrt-divN/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{\frac{\frac{1}{2}}{{g}^{-1}}}{-1 \cdot \left(\mathsf{neg}\left(a\right)\right)}}} \]
    7. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{\frac{\frac{1}{2}}{{g}^{-1}}}}{-1 \cdot \left(\mathsf{neg}\left(a\right)\right)}} \]
    8. clear-numN/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{\frac{1}{\frac{{g}^{-1}}{\frac{1}{2}}}}}{-1 \cdot \left(\mathsf{neg}\left(a\right)\right)}} \]
    9. associate-/r/N/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{\frac{1}{{g}^{-1}} \cdot \frac{1}{2}}}{-1 \cdot \left(\mathsf{neg}\left(a\right)\right)}} \]
    10. lift-pow.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{1}{\color{blue}{{g}^{-1}}} \cdot \frac{1}{2}}{-1 \cdot \left(\mathsf{neg}\left(a\right)\right)}} \]
    11. unpow-1N/A

      \[\leadsto \sqrt[3]{\frac{\frac{1}{\color{blue}{\frac{1}{g}}} \cdot \frac{1}{2}}{-1 \cdot \left(\mathsf{neg}\left(a\right)\right)}} \]
    12. remove-double-divN/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{g} \cdot \frac{1}{2}}{-1 \cdot \left(\mathsf{neg}\left(a\right)\right)}} \]
    13. frac-timesN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{-1} \cdot \frac{\frac{1}{2}}{\mathsf{neg}\left(a\right)}}} \]
    14. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{g}{-1} \cdot \frac{\color{blue}{\mathsf{neg}\left(\frac{-1}{2}\right)}}{\mathsf{neg}\left(a\right)}} \]
    15. frac-2negN/A

      \[\leadsto \sqrt[3]{\frac{g}{-1} \cdot \color{blue}{\frac{\frac{-1}{2}}{a}}} \]
    16. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\frac{g}{-1} \cdot \color{blue}{\frac{\frac{-1}{2}}{a}}} \]
    17. associate-/r/N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{\frac{-1}{\frac{\frac{-1}{2}}{a}}}}} \]
    18. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{\frac{-1}{\frac{\frac{-1}{2}}{a}}}}} \]
    19. cbrt-divN/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{\frac{-1}{\frac{\frac{-1}{2}}{a}}}}} \]
    20. lift-cbrt.f64N/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{\frac{-1}{\frac{\frac{-1}{2}}{a}}}} \]
    21. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{\frac{-1}{\frac{\frac{-1}{2}}{a}}}}} \]
    22. lower-cbrt.f6498.7

      \[\leadsto \frac{\sqrt[3]{g}}{\color{blue}{\sqrt[3]{\frac{-1}{\frac{-0.5}{a}}}}} \]
  10. Applied rewrites98.7%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}} \]
  11. Add Preprocessing

Alternative 6: 98.7% accurate, 0.5× speedup?

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

\\
\sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{g}
\end{array}
Derivation
  1. Initial program 71.5%

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-cbrt.f64N/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{g}{2 \cdot a}}} \]
    2. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
    3. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{2 \cdot a}}} \]
    4. associate-/r*N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{g}{2}}{a}}} \]
    5. frac-2negN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(\frac{g}{2}\right)}{\mathsf{neg}\left(a\right)}}} \]
    6. cbrt-divN/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(\frac{g}{2}\right)}}{\sqrt[3]{\mathsf{neg}\left(a\right)}}} \]
    7. distribute-neg-fracN/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    8. cbrt-divN/A

      \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(g\right)}}{\sqrt[3]{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    9. pow1/3N/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    10. sqr-powN/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    11. pow-prod-downN/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\left(\mathsf{neg}\left(g\right)\right) \cdot \left(\mathsf{neg}\left(g\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    12. sqr-negN/A

      \[\leadsto \frac{\frac{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    13. remove-double-negN/A

      \[\leadsto \frac{\frac{{\left(\color{blue}{g} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    14. remove-double-negN/A

      \[\leadsto \frac{\frac{{\left(g \cdot \color{blue}{g}\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    15. pow-prod-downN/A

      \[\leadsto \frac{\frac{\color{blue}{{g}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {g}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    16. sqr-powN/A

      \[\leadsto \frac{\frac{\color{blue}{{g}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    17. pow1/3N/A

      \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    18. cbrt-divN/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{g}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    19. pow1/3N/A

      \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
    20. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{g}{2}}}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
  4. Applied rewrites98.8%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{-0.5 \cdot g}}{\sqrt[3]{-a}}} \]
  5. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{-a}}} \]
    2. lift-cbrt.f64N/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{-1}{2} \cdot g}}}{\sqrt[3]{-a}} \]
    3. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\color{blue}{\sqrt[3]{-a}}} \]
    4. cbrt-undivN/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{\frac{-1}{2} \cdot g}{-a}}} \]
    5. div-invN/A

      \[\leadsto \sqrt[3]{\color{blue}{\left(\frac{-1}{2} \cdot g\right) \cdot \frac{1}{-a}}} \]
    6. metadata-evalN/A

      \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{-a}} \]
    7. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(a\right)}}} \]
    8. frac-2negN/A

      \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \color{blue}{\frac{-1}{a}}} \]
    9. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\left(\frac{-1}{2} \cdot g\right) \cdot \color{blue}{\frac{-1}{a}}} \]
    10. *-commutativeN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{-1}{a} \cdot \left(\frac{-1}{2} \cdot g\right)}} \]
    11. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{-1}{a} \cdot \color{blue}{\left(\frac{-1}{2} \cdot g\right)}} \]
    12. associate-*r*N/A

      \[\leadsto \sqrt[3]{\color{blue}{\left(\frac{-1}{a} \cdot \frac{-1}{2}\right) \cdot g}} \]
    13. cbrt-prodN/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{-1}{a} \cdot \frac{-1}{2}} \cdot \sqrt[3]{g}} \]
    14. cbrt-unprodN/A

      \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{-1}{a}} \cdot \sqrt[3]{\frac{-1}{2}}\right)} \cdot \sqrt[3]{g} \]
    15. lift-cbrt.f64N/A

      \[\leadsto \left(\color{blue}{\sqrt[3]{\frac{-1}{a}}} \cdot \sqrt[3]{\frac{-1}{2}}\right) \cdot \sqrt[3]{g} \]
    16. pow1/3N/A

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

      \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{-1}{a}} \cdot {\frac{-1}{2}}^{\frac{1}{3}}\right) \cdot \sqrt[3]{g}} \]
  6. Applied rewrites98.7%

    \[\leadsto \color{blue}{\sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{g}} \]
  7. Add Preprocessing

Alternative 7: 76.4% accurate, 0.8× speedup?

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

\\
\sqrt[3]{\frac{\frac{1}{\frac{\frac{-1}{g}}{-0.5}}}{a}}
\end{array}
Derivation
  1. Initial program 71.5%

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
    2. frac-2negN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{\mathsf{neg}\left(2 \cdot a\right)}}} \]
    3. clear-numN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\frac{\mathsf{neg}\left(2 \cdot a\right)}{\mathsf{neg}\left(g\right)}}}} \]
    4. associate-/r/N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\mathsf{neg}\left(2 \cdot a\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)}} \]
    5. inv-powN/A

      \[\leadsto \sqrt[3]{\color{blue}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{-1}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    6. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\color{blue}{\left(\frac{-1}{2} + \frac{-1}{2}\right)}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    7. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \frac{-1}{2}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    8. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right) + \frac{-1}{2}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    9. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    10. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    11. pow-prod-upN/A

      \[\leadsto \sqrt[3]{\color{blue}{\left({\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    12. pow-prod-downN/A

      \[\leadsto \sqrt[3]{\color{blue}{{\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right) \cdot \left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    13. sqr-negN/A

      \[\leadsto \sqrt[3]{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right)\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    14. remove-double-negN/A

      \[\leadsto \sqrt[3]{{\left(\color{blue}{\left(2 \cdot a\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    15. remove-double-negN/A

      \[\leadsto \sqrt[3]{{\left(\left(2 \cdot a\right) \cdot \color{blue}{\left(2 \cdot a\right)}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    16. pow2N/A

      \[\leadsto \sqrt[3]{{\color{blue}{\left({\left(2 \cdot a\right)}^{2}\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    17. pow-powN/A

      \[\leadsto \sqrt[3]{\color{blue}{{\left(2 \cdot a\right)}^{\left(2 \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    18. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(2 \cdot a\right)}^{\left(2 \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    19. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(2 \cdot a\right)}^{\left(2 \cdot \color{blue}{\frac{-1}{2}}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    20. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(2 \cdot a\right)}^{\color{blue}{-1}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    21. inv-powN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{2 \cdot a}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
  4. Applied rewrites71.4%

    \[\leadsto \sqrt[3]{\color{blue}{\frac{-0.5}{a} \cdot \left(-g\right)}} \]
  5. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{-1}{2}}{a} \cdot \left(-g\right)}} \]
    2. *-rgt-identityN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \color{blue}{\left(\left(-g\right) \cdot 1\right)}} \]
    3. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \left(\left(-g\right) \cdot \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}\right)} \]
    4. associate-*r*N/A

      \[\leadsto \sqrt[3]{\color{blue}{\left(\frac{\frac{-1}{2}}{a} \cdot \left(-g\right)\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)}} \]
    5. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\left(\color{blue}{\frac{\frac{-1}{2}}{a}} \cdot \left(-g\right)\right) \cdot \left(\mathsf{neg}\left(-1\right)\right)} \]
    6. associate-*l/N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{-1}{2} \cdot \left(-g\right)}{a}} \cdot \left(\mathsf{neg}\left(-1\right)\right)} \]
    7. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \left(-g\right)}{a} \cdot \color{blue}{1}} \]
    8. *-inversesN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \left(-g\right)}{a} \cdot \color{blue}{\frac{g}{g}}} \]
    9. times-fracN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\left(\frac{-1}{2} \cdot \left(-g\right)\right) \cdot g}{a \cdot g}}} \]
    10. associate-*r*N/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{\frac{-1}{2} \cdot \left(\left(-g\right) \cdot g\right)}}{a \cdot g}} \]
    11. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(g\right)\right)} \cdot g\right)}{a \cdot g}} \]
    12. distribute-lft-neg-inN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \color{blue}{\left(\mathsf{neg}\left(g \cdot g\right)\right)}}{a \cdot g}} \]
    13. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \left(\mathsf{neg}\left(\color{blue}{g \cdot g}\right)\right)}{a \cdot g}} \]
    14. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot \color{blue}{\left(-g \cdot g\right)}}{a \cdot g}} \]
    15. clear-numN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\frac{a \cdot g}{\frac{-1}{2} \cdot \left(-g \cdot g\right)}}}} \]
    16. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\frac{a \cdot g}{\frac{-1}{2} \cdot \left(-g \cdot g\right)}}} \]
    17. *-commutativeN/A

      \[\leadsto \sqrt[3]{\frac{\mathsf{neg}\left(-1\right)}{\frac{\color{blue}{g \cdot a}}{\frac{-1}{2} \cdot \left(-g \cdot g\right)}}} \]
    18. associate-*l/N/A

      \[\leadsto \sqrt[3]{\frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\frac{g}{\frac{-1}{2} \cdot \left(-g \cdot g\right)} \cdot a}}} \]
    19. associate-/r*N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{\mathsf{neg}\left(-1\right)}{\frac{g}{\frac{-1}{2} \cdot \left(-g \cdot g\right)}}}{a}}} \]
    20. lower-/.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{\mathsf{neg}\left(-1\right)}{\frac{g}{\frac{-1}{2} \cdot \left(-g \cdot g\right)}}}{a}}} \]
  6. Applied rewrites71.5%

    \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{1}{\frac{\frac{-1}{g}}{-0.5}}}{a}}} \]
  7. Add Preprocessing

Alternative 8: 76.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \sqrt[3]{\frac{1}{\frac{-1}{g}} \cdot \frac{-0.5}{a}} \end{array} \]
(FPCore (g a) :precision binary64 (cbrt (* (/ 1.0 (/ -1.0 g)) (/ -0.5 a))))
double code(double g, double a) {
	return cbrt(((1.0 / (-1.0 / g)) * (-0.5 / a)));
}
public static double code(double g, double a) {
	return Math.cbrt(((1.0 / (-1.0 / g)) * (-0.5 / a)));
}
function code(g, a)
	return cbrt(Float64(Float64(1.0 / Float64(-1.0 / g)) * Float64(-0.5 / a)))
end
code[g_, a_] := N[Power[N[(N[(1.0 / N[(-1.0 / g), $MachinePrecision]), $MachinePrecision] * N[(-0.5 / a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]
\begin{array}{l}

\\
\sqrt[3]{\frac{1}{\frac{-1}{g}} \cdot \frac{-0.5}{a}}
\end{array}
Derivation
  1. Initial program 71.5%

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
    2. frac-2negN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{\mathsf{neg}\left(2 \cdot a\right)}}} \]
    3. clear-numN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\frac{\mathsf{neg}\left(2 \cdot a\right)}{\mathsf{neg}\left(g\right)}}}} \]
    4. associate-/r/N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\mathsf{neg}\left(2 \cdot a\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)}} \]
    5. inv-powN/A

      \[\leadsto \sqrt[3]{\color{blue}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{-1}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    6. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\color{blue}{\left(\frac{-1}{2} + \frac{-1}{2}\right)}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    7. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \frac{-1}{2}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    8. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right) + \frac{-1}{2}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    9. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    10. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    11. pow-prod-upN/A

      \[\leadsto \sqrt[3]{\color{blue}{\left({\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    12. pow-prod-downN/A

      \[\leadsto \sqrt[3]{\color{blue}{{\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right) \cdot \left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    13. sqr-negN/A

      \[\leadsto \sqrt[3]{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right)\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    14. remove-double-negN/A

      \[\leadsto \sqrt[3]{{\left(\color{blue}{\left(2 \cdot a\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    15. remove-double-negN/A

      \[\leadsto \sqrt[3]{{\left(\left(2 \cdot a\right) \cdot \color{blue}{\left(2 \cdot a\right)}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    16. pow2N/A

      \[\leadsto \sqrt[3]{{\color{blue}{\left({\left(2 \cdot a\right)}^{2}\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    17. pow-powN/A

      \[\leadsto \sqrt[3]{\color{blue}{{\left(2 \cdot a\right)}^{\left(2 \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    18. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(2 \cdot a\right)}^{\left(2 \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    19. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(2 \cdot a\right)}^{\left(2 \cdot \color{blue}{\frac{-1}{2}}\right)} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    20. metadata-evalN/A

      \[\leadsto \sqrt[3]{{\left(2 \cdot a\right)}^{\color{blue}{-1}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
    21. inv-powN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{2 \cdot a}} \cdot \left(\mathsf{neg}\left(g\right)\right)} \]
  4. Applied rewrites71.4%

    \[\leadsto \sqrt[3]{\color{blue}{\frac{-0.5}{a} \cdot \left(-g\right)}} \]
  5. Step-by-step derivation
    1. *-rgt-identityN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \color{blue}{\left(\left(-g\right) \cdot 1\right)}} \]
    2. *-inversesN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \left(\left(-g\right) \cdot \color{blue}{\frac{g}{g}}\right)} \]
    3. associate-/l*N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \color{blue}{\frac{\left(-g\right) \cdot g}{g}}} \]
    4. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{\color{blue}{\left(\mathsf{neg}\left(g\right)\right)} \cdot g}{g}} \]
    5. distribute-lft-neg-inN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{\color{blue}{\mathsf{neg}\left(g \cdot g\right)}}{g}} \]
    6. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{\mathsf{neg}\left(\color{blue}{g \cdot g}\right)}{g}} \]
    7. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{\color{blue}{-g \cdot g}}{g}} \]
    8. clear-numN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \color{blue}{\frac{1}{\frac{g}{-g \cdot g}}}} \]
    9. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\frac{g}{-g \cdot g}}} \]
    10. lower-/.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\frac{g}{-g \cdot g}}}} \]
    11. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{\color{blue}{1}}{\frac{g}{-g \cdot g}}} \]
    12. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\frac{g}{\color{blue}{\mathsf{neg}\left(g \cdot g\right)}}}} \]
    13. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\frac{g}{\mathsf{neg}\left(\color{blue}{g \cdot g}\right)}}} \]
    14. distribute-rgt-neg-inN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\frac{g}{\color{blue}{g \cdot \left(\mathsf{neg}\left(g\right)\right)}}}} \]
    15. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\frac{g}{g \cdot \color{blue}{\left(-g\right)}}}} \]
    16. associate-/r*N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\color{blue}{\frac{\frac{g}{g}}{-g}}}} \]
    17. *-inversesN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\frac{\color{blue}{1}}{-g}}} \]
    18. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{-g}}} \]
    19. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(g\right)}}}} \]
    20. neg-mul-1N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\frac{\mathsf{neg}\left(-1\right)}{\color{blue}{-1 \cdot g}}}} \]
    21. associate-/r*N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\color{blue}{\frac{\frac{\mathsf{neg}\left(-1\right)}{-1}}{g}}}} \]
    22. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\frac{\frac{\color{blue}{1}}{-1}}{g}}} \]
    23. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \frac{1}{\frac{\color{blue}{-1}}{g}}} \]
    24. lower-/.f6471.5

      \[\leadsto \sqrt[3]{\frac{-0.5}{a} \cdot \frac{1}{\color{blue}{\frac{-1}{g}}}} \]
  6. Applied rewrites71.5%

    \[\leadsto \sqrt[3]{\frac{-0.5}{a} \cdot \color{blue}{\frac{1}{\frac{-1}{g}}}} \]
  7. Final simplification71.5%

    \[\leadsto \sqrt[3]{\frac{1}{\frac{-1}{g}} \cdot \frac{-0.5}{a}} \]
  8. Add Preprocessing

Alternative 9: 76.4% accurate, 0.9× speedup?

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

\\
\sqrt[3]{\frac{\frac{-0.5}{a}}{\frac{-1}{g}}}
\end{array}
Derivation
  1. Initial program 71.5%

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
    2. frac-2negN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{\mathsf{neg}\left(2 \cdot a\right)}}} \]
    3. clear-numN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{1}{\frac{\mathsf{neg}\left(2 \cdot a\right)}{\mathsf{neg}\left(g\right)}}}} \]
    4. div-invN/A

      \[\leadsto \sqrt[3]{\frac{1}{\color{blue}{\left(\mathsf{neg}\left(2 \cdot a\right)\right) \cdot \frac{1}{\mathsf{neg}\left(g\right)}}}} \]
    5. associate-/r*N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{1}{\mathsf{neg}\left(2 \cdot a\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}}} \]
    6. inv-powN/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{-1}}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    7. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\color{blue}{\left(\frac{-1}{2} + \frac{-1}{2}\right)}}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    8. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \frac{-1}{2}\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    9. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right) + \frac{-1}{2}\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    10. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    11. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    12. pow-prod-upN/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    13. pow-prod-downN/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{{\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right) \cdot \left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    14. sqr-negN/A

      \[\leadsto \sqrt[3]{\frac{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right)\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    15. remove-double-negN/A

      \[\leadsto \sqrt[3]{\frac{{\left(\color{blue}{\left(2 \cdot a\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    16. remove-double-negN/A

      \[\leadsto \sqrt[3]{\frac{{\left(\left(2 \cdot a\right) \cdot \color{blue}{\left(2 \cdot a\right)}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    17. pow2N/A

      \[\leadsto \sqrt[3]{\frac{{\color{blue}{\left({\left(2 \cdot a\right)}^{2}\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    18. pow-powN/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{{\left(2 \cdot a\right)}^{\left(2 \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)}}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    19. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{{\left(2 \cdot a\right)}^{\left(2 \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    20. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{{\left(2 \cdot a\right)}^{\left(2 \cdot \color{blue}{\frac{-1}{2}}\right)}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    21. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{{\left(2 \cdot a\right)}^{\color{blue}{-1}}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
    22. inv-powN/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{\frac{1}{2 \cdot a}}}{\frac{1}{\mathsf{neg}\left(g\right)}}} \]
  4. Applied rewrites71.5%

    \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{-0.5}{a}}{\frac{-1}{g}}}} \]
  5. Add Preprocessing

Alternative 10: 76.4% accurate, 0.9× speedup?

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

\\
\sqrt[3]{\frac{g}{\frac{-1}{\frac{-0.5}{a}}}}
\end{array}
Derivation
  1. Initial program 71.5%

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. remove-double-divN/A

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{\frac{1}{\frac{1}{2 \cdot a}}}}} \]
    2. frac-2negN/A

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\frac{1}{2 \cdot a}\right)}}}} \]
    3. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{\color{blue}{-1}}{\mathsf{neg}\left(\frac{1}{2 \cdot a}\right)}}} \]
    4. distribute-frac-neg2N/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{\color{blue}{\frac{1}{\mathsf{neg}\left(2 \cdot a\right)}}}}} \]
    5. inv-powN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{\color{blue}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{-1}}}}} \]
    6. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\color{blue}{\left(\frac{-1}{2} + \frac{-1}{2}\right)}}}}} \]
    7. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \frac{-1}{2}\right)}}}} \]
    8. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right) + \frac{-1}{2}\right)}}}} \]
    9. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)}}}} \]
    10. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)}}}} \]
    11. pow-prod-upN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{\color{blue}{{\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(2 \cdot a\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}}} \]
    12. pow-prod-downN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{\color{blue}{{\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right) \cdot \left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}}} \]
    13. sqr-negN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right)\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}} \]
    14. remove-double-negN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\left(\color{blue}{\left(2 \cdot a\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2 \cdot a\right)\right)\right)\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}} \]
    15. remove-double-negN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\left(\left(2 \cdot a\right) \cdot \color{blue}{\left(2 \cdot a\right)}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}} \]
    16. pow2N/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\color{blue}{\left({\left(2 \cdot a\right)}^{2}\right)}}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}} \]
    17. pow-powN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{\color{blue}{{\left(2 \cdot a\right)}^{\left(2 \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)}}}}} \]
    18. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\left(2 \cdot a\right)}^{\left(2 \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)}}}} \]
    19. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\left(2 \cdot a\right)}^{\left(2 \cdot \color{blue}{\frac{-1}{2}}\right)}}}} \]
    20. metadata-evalN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{{\left(2 \cdot a\right)}^{\color{blue}{-1}}}}} \]
    21. inv-powN/A

      \[\leadsto \sqrt[3]{\frac{g}{\frac{-1}{\color{blue}{\frac{1}{2 \cdot a}}}}} \]
    22. lower-/.f64N/A

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{\frac{-1}{\frac{1}{2 \cdot a}}}}} \]
  4. Applied rewrites71.5%

    \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{\frac{-1}{\frac{-0.5}{a}}}}} \]
  5. Add Preprocessing

Alternative 11: 76.4% accurate, 1.0× speedup?

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

\\
\sqrt[3]{\frac{g}{2 \cdot a}}
\end{array}
Derivation
  1. Initial program 71.5%

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 12: 76.4% accurate, 1.0× speedup?

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

\\
\sqrt[3]{\frac{0.5}{a} \cdot g}
\end{array}
Derivation
  1. Initial program 71.5%

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-cbrt.f64N/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{g}{2 \cdot a}}} \]
    2. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{2 \cdot a}}} \]
    3. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{2 \cdot a}}} \]
    4. associate-/r*N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{g}{2}}{a}}} \]
    5. frac-2negN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(\frac{g}{2}\right)}{\mathsf{neg}\left(a\right)}}} \]
    6. cbrt-divN/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(\frac{g}{2}\right)}}{\sqrt[3]{\mathsf{neg}\left(a\right)}}} \]
    7. distribute-neg-fracN/A

      \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    8. cbrt-divN/A

      \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{\mathsf{neg}\left(g\right)}}{\sqrt[3]{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    9. pow1/3N/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    10. sqr-powN/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {\left(\mathsf{neg}\left(g\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    11. pow-prod-downN/A

      \[\leadsto \frac{\frac{\color{blue}{{\left(\left(\mathsf{neg}\left(g\right)\right) \cdot \left(\mathsf{neg}\left(g\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    12. sqr-negN/A

      \[\leadsto \frac{\frac{{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right) \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    13. remove-double-negN/A

      \[\leadsto \frac{\frac{{\left(\color{blue}{g} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(g\right)\right)\right)\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    14. remove-double-negN/A

      \[\leadsto \frac{\frac{{\left(g \cdot \color{blue}{g}\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    15. pow-prod-downN/A

      \[\leadsto \frac{\frac{\color{blue}{{g}^{\left(\frac{\frac{1}{3}}{2}\right)} \cdot {g}^{\left(\frac{\frac{1}{3}}{2}\right)}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    16. sqr-powN/A

      \[\leadsto \frac{\frac{\color{blue}{{g}^{\frac{1}{3}}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    17. pow1/3N/A

      \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{2}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    18. cbrt-divN/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{g}{2}}}}{\sqrt[3]{\mathsf{neg}\left(a\right)}} \]
    19. pow1/3N/A

      \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
    20. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{g}{2}}}{{\left(\mathsf{neg}\left(a\right)\right)}^{\frac{1}{3}}}} \]
  4. Applied rewrites98.8%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{-0.5 \cdot g}}{\sqrt[3]{-a}}} \]
  5. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\sqrt[3]{-a}}} \]
    2. lift-cbrt.f64N/A

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\frac{-1}{2} \cdot g}}}{\sqrt[3]{-a}} \]
    3. lift-cbrt.f64N/A

      \[\leadsto \frac{\sqrt[3]{\frac{-1}{2} \cdot g}}{\color{blue}{\sqrt[3]{-a}}} \]
    4. cbrt-undivN/A

      \[\leadsto \color{blue}{\sqrt[3]{\frac{\frac{-1}{2} \cdot g}{-a}}} \]
    5. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2} \cdot g}{\color{blue}{\mathsf{neg}\left(a\right)}}} \]
    6. distribute-frac-neg2N/A

      \[\leadsto \sqrt[3]{\color{blue}{\mathsf{neg}\left(\frac{\frac{-1}{2} \cdot g}{a}\right)}} \]
    7. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\mathsf{neg}\left(\frac{\color{blue}{\frac{-1}{2} \cdot g}}{a}\right)} \]
    8. associate-*l/N/A

      \[\leadsto \sqrt[3]{\mathsf{neg}\left(\color{blue}{\frac{\frac{-1}{2}}{a} \cdot g}\right)} \]
    9. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\mathsf{neg}\left(\color{blue}{\frac{\frac{-1}{2}}{a}} \cdot g\right)} \]
    10. *-commutativeN/A

      \[\leadsto \sqrt[3]{\mathsf{neg}\left(\color{blue}{g \cdot \frac{\frac{-1}{2}}{a}}\right)} \]
    11. distribute-lft-neg-outN/A

      \[\leadsto \sqrt[3]{\color{blue}{\left(\mathsf{neg}\left(g\right)\right) \cdot \frac{\frac{-1}{2}}{a}}} \]
    12. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\left(-g\right)} \cdot \frac{\frac{-1}{2}}{a}} \]
    13. *-commutativeN/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{-1}{2}}{a} \cdot \left(-g\right)}} \]
    14. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{-1}{2}}{a} \cdot \left(-g\right)}} \]
    15. lift-cbrt.f6471.4

      \[\leadsto \color{blue}{\sqrt[3]{\frac{-0.5}{a} \cdot \left(-g\right)}} \]
    16. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{-1}{2}}{a} \cdot \left(-g\right)}} \]
    17. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(g\right)\right)}} \]
    18. distribute-rgt-neg-outN/A

      \[\leadsto \sqrt[3]{\color{blue}{\mathsf{neg}\left(\frac{\frac{-1}{2}}{a} \cdot g\right)}} \]
    19. lift-/.f64N/A

      \[\leadsto \sqrt[3]{\mathsf{neg}\left(\color{blue}{\frac{\frac{-1}{2}}{a}} \cdot g\right)} \]
    20. associate-*l/N/A

      \[\leadsto \sqrt[3]{\mathsf{neg}\left(\color{blue}{\frac{\frac{-1}{2} \cdot g}{a}}\right)} \]
    21. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\mathsf{neg}\left(\frac{\color{blue}{\frac{-1}{2} \cdot g}}{a}\right)} \]
    22. distribute-frac-neg2N/A

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{-1}{2} \cdot g}{\mathsf{neg}\left(a\right)}}} \]
    23. lift-*.f64N/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{\frac{-1}{2} \cdot g}}{\mathsf{neg}\left(a\right)}} \]
    24. *-commutativeN/A

      \[\leadsto \sqrt[3]{\frac{\color{blue}{g \cdot \frac{-1}{2}}}{\mathsf{neg}\left(a\right)}} \]
    25. lift-neg.f64N/A

      \[\leadsto \sqrt[3]{\frac{g \cdot \frac{-1}{2}}{\color{blue}{-a}}} \]
  6. Applied rewrites71.4%

    \[\leadsto \color{blue}{\sqrt[3]{\frac{0.5}{a} \cdot g}} \]
  7. Add Preprocessing

Reproduce

?
herbie shell --seed 2024268 
(FPCore (g a)
  :name "2-ancestry mixing, zero discriminant"
  :precision binary64
  (cbrt (/ g (* 2.0 a))))