2-ancestry mixing, zero discriminant

Percentage Accurate: 76.5% → 98.6%
Time: 7.3s
Alternatives: 10
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 10 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.5% 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.6% accurate, 0.5× speedup?

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt[3]{g}}{\color{blue}{\sqrt[3]{2 \cdot a}}} \]
  4. Applied egg-rr98.7%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}} \]
  5. Applied egg-rr98.8%

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

Alternative 2: 92.1% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;{a}^{-0.3333333333333333} \cdot \sqrt[3]{g \cdot 0.5}\\


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

    1. Initial program 72.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{2 \cdot a}} \]
      5. lower-cbrt.f6498.8

        \[\leadsto \frac{\sqrt[3]{g}}{\color{blue}{\sqrt[3]{2 \cdot a}}} \]
    4. Applied egg-rr98.8%

      \[\leadsto \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}} \]
    5. Applied egg-rr98.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt[3]{\frac{\frac{-1}{2}}{a}} \cdot \sqrt[3]{\mathsf{neg}\left(g\right)}} \]
      6. lower-*.f6498.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999982e-307 < (*.f64 #s(literal 2 binary64) a)

    1. Initial program 77.0%

      \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {a}^{\frac{-1}{3}} \cdot \sqrt[3]{\color{blue}{g \cdot \frac{1}{2}}} \]
      14. metadata-eval92.2

        \[\leadsto {a}^{-0.3333333333333333} \cdot \sqrt[3]{g \cdot \color{blue}{0.5}} \]
    4. Applied egg-rr92.2%

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

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

Alternative 3: 92.1% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;{a}^{-0.3333333333333333} \cdot \sqrt[3]{g \cdot 0.5}\\


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

    1. Initial program 72.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt[3]{g}}}{\sqrt[3]{2 \cdot a}} \]
      5. lower-cbrt.f6498.8

        \[\leadsto \frac{\sqrt[3]{g}}{\color{blue}{\sqrt[3]{2 \cdot a}}} \]
    4. Applied egg-rr98.8%

      \[\leadsto \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}} \]
    5. Applied egg-rr98.9%

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

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

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

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

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

        \[\leadsto \sqrt[3]{\frac{g \cdot 2}{\color{blue}{a \cdot 4}}} \]
      6. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \frac{1}{\mathsf{neg}\left(g \cdot \frac{1}{2}\right)}\right)}}^{\frac{-1}{3}} \]
    7. Applied egg-rr92.3%

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

    if -1.99999999999999982e-307 < (*.f64 #s(literal 2 binary64) a)

    1. Initial program 77.0%

      \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {a}^{\frac{-1}{3}} \cdot \sqrt[3]{\color{blue}{g \cdot \frac{1}{2}}} \]
      14. metadata-eval92.2

        \[\leadsto {a}^{-0.3333333333333333} \cdot \sqrt[3]{g \cdot \color{blue}{0.5}} \]
    4. Applied egg-rr92.2%

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

Alternative 4: 84.0% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;{a}^{-0.3333333333333333} \cdot \sqrt[3]{g \cdot 0.5}\\


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

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\sqrt[3]{\frac{a}{g \cdot \color{blue}{0.5}}}} \]
    4. Applied egg-rr74.7%

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

    if 3.00000000000000015e-292 < (*.f64 #s(literal 2 binary64) a)

    1. Initial program 76.3%

      \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {a}^{\frac{-1}{3}} \cdot \sqrt[3]{\color{blue}{g \cdot \frac{1}{2}}} \]
      14. metadata-eval92.3

        \[\leadsto {a}^{-0.3333333333333333} \cdot \sqrt[3]{g \cdot \color{blue}{0.5}} \]
    4. Applied egg-rr92.3%

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

Alternative 5: 98.7% accurate, 0.5× speedup?

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt[3]{g}}{\color{blue}{\sqrt[3]{2 \cdot a}}} \]
  4. Applied egg-rr98.7%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}} \]
  5. Applied egg-rr98.8%

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

Alternative 6: 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 75.0%

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

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

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

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

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

      \[\leadsto \frac{\sqrt[3]{g}}{\color{blue}{\sqrt[3]{2 \cdot a}}} \]
  4. Applied egg-rr98.7%

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

Alternative 7: 76.5% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\sqrt[3]{\frac{a}{g \cdot \color{blue}{0.5}}}} \]
  4. Applied egg-rr75.7%

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

Alternative 8: 75.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \sqrt[3]{\frac{0.5}{\frac{a}{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(0.5 / Float64(a / g)))
end
code[g_, a_] := N[Power[N[(0.5 / N[(a / g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

      \[\leadsto \sqrt[3]{\frac{\color{blue}{\frac{1}{2}}}{\frac{a}{g}}} \]
    7. lower-/.f6475.0

      \[\leadsto \sqrt[3]{\frac{0.5}{\color{blue}{\frac{a}{g}}}} \]
  4. Applied egg-rr75.0%

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

Alternative 9: 76.5% 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 75.0%

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

Alternative 10: 76.5% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\frac{1}{2}}{a}} \cdot g} \]
    8. metadata-eval75.0

      \[\leadsto \sqrt[3]{\frac{\color{blue}{0.5}}{a} \cdot g} \]
  4. Applied egg-rr75.0%

    \[\leadsto \sqrt[3]{\color{blue}{\frac{0.5}{a} \cdot g}} \]
  5. Final simplification75.0%

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

Reproduce

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