2-ancestry mixing, positive discriminant

Percentage Accurate: 43.4% → 95.8%
Time: 12.0s
Alternatives: 10
Speedup: 1.2×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{2 \cdot a}\\ t_1 := \sqrt{g \cdot g - h \cdot h}\\ \sqrt[3]{t\_0 \cdot \left(\left(-g\right) + t\_1\right)} + \sqrt[3]{t\_0 \cdot \left(\left(-g\right) - t\_1\right)} \end{array} \end{array} \]
(FPCore (g h a)
 :precision binary64
 (let* ((t_0 (/ 1.0 (* 2.0 a))) (t_1 (sqrt (- (* g g) (* h h)))))
   (+ (cbrt (* t_0 (+ (- g) t_1))) (cbrt (* t_0 (- (- g) t_1))))))
double code(double g, double h, double a) {
	double t_0 = 1.0 / (2.0 * a);
	double t_1 = sqrt(((g * g) - (h * h)));
	return cbrt((t_0 * (-g + t_1))) + cbrt((t_0 * (-g - t_1)));
}
public static double code(double g, double h, double a) {
	double t_0 = 1.0 / (2.0 * a);
	double t_1 = Math.sqrt(((g * g) - (h * h)));
	return Math.cbrt((t_0 * (-g + t_1))) + Math.cbrt((t_0 * (-g - t_1)));
}
function code(g, h, a)
	t_0 = Float64(1.0 / Float64(2.0 * a))
	t_1 = sqrt(Float64(Float64(g * g) - Float64(h * h)))
	return Float64(cbrt(Float64(t_0 * Float64(Float64(-g) + t_1))) + cbrt(Float64(t_0 * Float64(Float64(-g) - t_1))))
end
code[g_, h_, a_] := Block[{t$95$0 = N[(1.0 / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(g * g), $MachinePrecision] - N[(h * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(N[Power[N[(t$95$0 * N[((-g) + t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(t$95$0 * N[((-g) - t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{2 \cdot a}\\
t_1 := \sqrt{g \cdot g - h \cdot h}\\
\sqrt[3]{t\_0 \cdot \left(\left(-g\right) + t\_1\right)} + \sqrt[3]{t\_0 \cdot \left(\left(-g\right) - t\_1\right)}
\end{array}
\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: 43.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{2 \cdot a}\\ t_1 := \sqrt{g \cdot g - h \cdot h}\\ \sqrt[3]{t\_0 \cdot \left(\left(-g\right) + t\_1\right)} + \sqrt[3]{t\_0 \cdot \left(\left(-g\right) - t\_1\right)} \end{array} \end{array} \]
(FPCore (g h a)
 :precision binary64
 (let* ((t_0 (/ 1.0 (* 2.0 a))) (t_1 (sqrt (- (* g g) (* h h)))))
   (+ (cbrt (* t_0 (+ (- g) t_1))) (cbrt (* t_0 (- (- g) t_1))))))
double code(double g, double h, double a) {
	double t_0 = 1.0 / (2.0 * a);
	double t_1 = sqrt(((g * g) - (h * h)));
	return cbrt((t_0 * (-g + t_1))) + cbrt((t_0 * (-g - t_1)));
}
public static double code(double g, double h, double a) {
	double t_0 = 1.0 / (2.0 * a);
	double t_1 = Math.sqrt(((g * g) - (h * h)));
	return Math.cbrt((t_0 * (-g + t_1))) + Math.cbrt((t_0 * (-g - t_1)));
}
function code(g, h, a)
	t_0 = Float64(1.0 / Float64(2.0 * a))
	t_1 = sqrt(Float64(Float64(g * g) - Float64(h * h)))
	return Float64(cbrt(Float64(t_0 * Float64(Float64(-g) + t_1))) + cbrt(Float64(t_0 * Float64(Float64(-g) - t_1))))
end
code[g_, h_, a_] := Block[{t$95$0 = N[(1.0 / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(g * g), $MachinePrecision] - N[(h * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(N[Power[N[(t$95$0 * N[((-g) + t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(t$95$0 * N[((-g) - t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{1}{2 \cdot a}\\
t_1 := \sqrt{g \cdot g - h \cdot h}\\
\sqrt[3]{t\_0 \cdot \left(\left(-g\right) + t\_1\right)} + \sqrt[3]{t\_0 \cdot \left(\left(-g\right) - t\_1\right)}
\end{array}
\end{array}

Alternative 1: 95.8% accurate, 0.6× speedup?

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

\\
{\left(\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}\right)}^{-1} + \sqrt[3]{-g} \cdot {\left(\sqrt[3]{a}\right)}^{-1}
\end{array}
Derivation
  1. Initial program 40.4%

    \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
  2. Add Preprocessing
  3. Applied rewrites40.5%

    \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
  4. Taylor expanded in g around -inf

    \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \color{blue}{-1 \cdot \left(g \cdot {\left(\sqrt{-1}\right)}^{2}\right)}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
  5. Step-by-step derivation
    1. associate-*r*N/A

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

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

      \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(\mathsf{neg}\left(g\right)\right) \cdot \color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
    4. rem-square-sqrtN/A

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

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

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

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

    \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \color{blue}{\sqrt[3]{\left(-\mathsf{fma}\left(\sqrt{g - h}, \sqrt{h + g}, g\right)\right) \cdot 0.5} \cdot {\left(\sqrt[3]{a}\right)}^{-1}} \]
  8. Taylor expanded in g around inf

    \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \sqrt[3]{\color{blue}{-1 \cdot g}} \cdot {\left(\sqrt[3]{a}\right)}^{-1} \]
  9. Step-by-step derivation
    1. mul-1-negN/A

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

      \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \sqrt[3]{\color{blue}{-g}} \cdot {\left(\sqrt[3]{a}\right)}^{-1} \]
  10. Applied rewrites95.9%

    \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \sqrt[3]{\color{blue}{-g}} \cdot {\left(\sqrt[3]{a}\right)}^{-1} \]
  11. Final simplification95.9%

    \[\leadsto {\left(\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}\right)}^{-1} + \sqrt[3]{-g} \cdot {\left(\sqrt[3]{a}\right)}^{-1} \]
  12. Add Preprocessing

Alternative 2: 87.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{\frac{-g}{a}}\\ \mathbf{if}\;g \leq -3.65 \cdot 10^{+152}:\\ \;\;\;\;t\_0 + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}\\ \mathbf{elif}\;g \leq -4.8 \cdot 10^{-138}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}\right)}^{-1} + \sqrt[3]{\frac{\left(-g\right) - \left(-g\right)}{a \cdot 2}}\\ \mathbf{elif}\;g \leq 1.2 \cdot 10^{-264}:\\ \;\;\;\;\frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + t\_0\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}\right)}^{-1} + \frac{\sqrt[3]{-0.5 \cdot \mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}}{\sqrt[3]{a}}\\ \end{array} \end{array} \]
(FPCore (g h a)
 :precision binary64
 (let* ((t_0 (cbrt (/ (- g) a))))
   (if (<= g -3.65e+152)
     (+ t_0 (cbrt (* -0.25 (* (/ h g) (/ h a)))))
     (if (<= g -4.8e-138)
       (+
        (pow
         (* (cbrt (/ -1.0 (- (sqrt (* (+ h g) (- g h))) g))) (cbrt (* -2.0 a)))
         -1.0)
        (cbrt (/ (- (- g) (- g)) (* a 2.0))))
       (if (<= g 1.2e-264)
         (+ (/ (cbrt (* (* -0.25 (/ h g)) h)) (cbrt a)) t_0)
         (+
          (pow (cbrt (/ (* -2.0 a) (- g (* (- g) -1.0)))) -1.0)
          (/
           (cbrt (* -0.5 (fma (sqrt (+ h g)) (sqrt (- g h)) g)))
           (cbrt a))))))))
double code(double g, double h, double a) {
	double t_0 = cbrt((-g / a));
	double tmp;
	if (g <= -3.65e+152) {
		tmp = t_0 + cbrt((-0.25 * ((h / g) * (h / a))));
	} else if (g <= -4.8e-138) {
		tmp = pow((cbrt((-1.0 / (sqrt(((h + g) * (g - h))) - g))) * cbrt((-2.0 * a))), -1.0) + cbrt(((-g - -g) / (a * 2.0)));
	} else if (g <= 1.2e-264) {
		tmp = (cbrt(((-0.25 * (h / g)) * h)) / cbrt(a)) + t_0;
	} else {
		tmp = pow(cbrt(((-2.0 * a) / (g - (-g * -1.0)))), -1.0) + (cbrt((-0.5 * fma(sqrt((h + g)), sqrt((g - h)), g))) / cbrt(a));
	}
	return tmp;
}
function code(g, h, a)
	t_0 = cbrt(Float64(Float64(-g) / a))
	tmp = 0.0
	if (g <= -3.65e+152)
		tmp = Float64(t_0 + cbrt(Float64(-0.25 * Float64(Float64(h / g) * Float64(h / a)))));
	elseif (g <= -4.8e-138)
		tmp = Float64((Float64(cbrt(Float64(-1.0 / Float64(sqrt(Float64(Float64(h + g) * Float64(g - h))) - g))) * cbrt(Float64(-2.0 * a))) ^ -1.0) + cbrt(Float64(Float64(Float64(-g) - Float64(-g)) / Float64(a * 2.0))));
	elseif (g <= 1.2e-264)
		tmp = Float64(Float64(cbrt(Float64(Float64(-0.25 * Float64(h / g)) * h)) / cbrt(a)) + t_0);
	else
		tmp = Float64((cbrt(Float64(Float64(-2.0 * a) / Float64(g - Float64(Float64(-g) * -1.0)))) ^ -1.0) + Float64(cbrt(Float64(-0.5 * fma(sqrt(Float64(h + g)), sqrt(Float64(g - h)), g))) / cbrt(a)));
	end
	return tmp
end
code[g_, h_, a_] := Block[{t$95$0 = N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[g, -3.65e+152], N[(t$95$0 + N[Power[N[(-0.25 * N[(N[(h / g), $MachinePrecision] * N[(h / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[g, -4.8e-138], N[(N[Power[N[(N[Power[N[(-1.0 / N[(N[Sqrt[N[(N[(h + g), $MachinePrecision] * N[(g - h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(-2.0 * a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision] + N[Power[N[(N[((-g) - (-g)), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[g, 1.2e-264], N[(N[(N[Power[N[(N[(-0.25 * N[(h / g), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[a, 1/3], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[Power[N[Power[N[(N[(-2.0 * a), $MachinePrecision] / N[(g - N[((-g) * -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], -1.0], $MachinePrecision] + N[(N[Power[N[(-0.5 * N[(N[Sqrt[N[(h + g), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(g - h), $MachinePrecision]], $MachinePrecision] + g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[a, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt[3]{\frac{-g}{a}}\\
\mathbf{if}\;g \leq -3.65 \cdot 10^{+152}:\\
\;\;\;\;t\_0 + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}\\

\mathbf{elif}\;g \leq -4.8 \cdot 10^{-138}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}\right)}^{-1} + \sqrt[3]{\frac{\left(-g\right) - \left(-g\right)}{a \cdot 2}}\\

\mathbf{elif}\;g \leq 1.2 \cdot 10^{-264}:\\
\;\;\;\;\frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + t\_0\\

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}\right)}^{-1} + \frac{\sqrt[3]{-0.5 \cdot \mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}}{\sqrt[3]{a}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if g < -3.6500000000000002e152

    1. Initial program 1.5%

      \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in g around inf

      \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

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

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

        \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
      4. lower-neg.f643.6

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

      \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
    6. Taylor expanded in g around inf

      \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
      10. lower-cbrt.f6464.0

        \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
    8. Applied rewrites64.0%

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

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

        \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} \]
      3. lower-+.f6464.0

        \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} \]
    10. Applied rewrites64.0%

      \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}} \]

    if -3.6500000000000002e152 < g < -4.7999999999999998e-138

    1. Initial program 77.0%

      \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
    2. Add Preprocessing
    3. Applied rewrites77.7%

      \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
    4. Applied rewrites97.7%

      \[\leadsto \frac{1}{\color{blue}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
    5. Taylor expanded in g around -inf

      \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \color{blue}{-1 \cdot g}\right)} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\left(\left(-g\right) - \left(-g\right)\right) \cdot \color{blue}{\frac{1}{\frac{a}{\frac{1}{2}}}}} \]
      8. un-div-invN/A

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

        \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\color{blue}{\frac{\left(-g\right) - \left(-g\right)}{\frac{a}{\frac{1}{2}}}}} \]
    9. Applied rewrites97.7%

      \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\color{blue}{\frac{\left(-g\right) - \left(-g\right)}{a \cdot 2}}} \]

    if -4.7999999999999998e-138 < g < 1.1999999999999999e-264

    1. Initial program 42.0%

      \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in g around inf

      \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

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

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

        \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
      4. lower-neg.f6415.8

        \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{\color{blue}{-g}}{a}} \]
    5. Applied rewrites15.8%

      \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
    6. Taylor expanded in g around inf

      \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
      10. lower-cbrt.f6474.3

        \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
    8. Applied rewrites74.3%

      \[\leadsto \color{blue}{\sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} + \sqrt[3]{\frac{-g}{a}} \]
    9. Step-by-step derivation
      1. Applied rewrites74.4%

        \[\leadsto \sqrt[3]{\frac{h}{a}} \cdot \color{blue}{\sqrt[3]{\frac{h}{g} \cdot -0.25}} + \sqrt[3]{\frac{-g}{a}} \]
      2. Step-by-step derivation
        1. Applied rewrites75.4%

          \[\leadsto \frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\color{blue}{\sqrt[3]{a}}} + \sqrt[3]{\frac{-g}{a}} \]

        if 1.1999999999999999e-264 < g

        1. Initial program 44.7%

          \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
        2. Add Preprocessing
        3. Applied rewrites44.7%

          \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
        4. Taylor expanded in g around -inf

          \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \color{blue}{-1 \cdot \left(g \cdot {\left(\sqrt{-1}\right)}^{2}\right)}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
        5. Step-by-step derivation
          1. associate-*r*N/A

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

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

            \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(\mathsf{neg}\left(g\right)\right) \cdot \color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
          4. rem-square-sqrtN/A

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

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

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

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

          \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \color{blue}{\sqrt[3]{\left(-\mathsf{fma}\left(\sqrt{g - h}, \sqrt{h + g}, g\right)\right) \cdot 0.5} \cdot {\left(\sqrt[3]{a}\right)}^{-1}} \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

            \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \color{blue}{\frac{\sqrt[3]{\left(-\mathsf{fma}\left(\sqrt{g - h}, \sqrt{h + g}, g\right)\right) \cdot \frac{1}{2}}}{\sqrt[3]{a}}} \]
          5. lower-/.f6496.2

            \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \color{blue}{\frac{\sqrt[3]{\left(-\mathsf{fma}\left(\sqrt{g - h}, \sqrt{h + g}, g\right)\right) \cdot 0.5}}{\sqrt[3]{a}}} \]
        9. Applied rewrites96.2%

          \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \color{blue}{\frac{\sqrt[3]{-0.5 \cdot \mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}}{\sqrt[3]{a}}} \]
      3. Recombined 4 regimes into one program.
      4. Final simplification86.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;g \leq -3.65 \cdot 10^{+152}:\\ \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}\\ \mathbf{elif}\;g \leq -4.8 \cdot 10^{-138}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}\right)}^{-1} + \sqrt[3]{\frac{\left(-g\right) - \left(-g\right)}{a \cdot 2}}\\ \mathbf{elif}\;g \leq 1.2 \cdot 10^{-264}:\\ \;\;\;\;\frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + \sqrt[3]{\frac{-g}{a}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}\right)}^{-1} + \frac{\sqrt[3]{-0.5 \cdot \mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}}{\sqrt[3]{a}}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 3: 87.1% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{\frac{-g}{a}}\\ \mathbf{if}\;g \leq -3.65 \cdot 10^{+152}:\\ \;\;\;\;t\_0 + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}\\ \mathbf{elif}\;g \leq -4.8 \cdot 10^{-138}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}\right)}^{-1} + \sqrt[3]{\frac{\left(-g\right) - \left(-g\right)}{a \cdot 2}}\\ \mathbf{elif}\;g \leq 1.2 \cdot 10^{-264}:\\ \;\;\;\;\frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + t\_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{0.5}{a}}, \sqrt[3]{-\mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}, \sqrt[3]{\frac{\frac{g - g}{-2}}{a}}\right)\\ \end{array} \end{array} \]
      (FPCore (g h a)
       :precision binary64
       (let* ((t_0 (cbrt (/ (- g) a))))
         (if (<= g -3.65e+152)
           (+ t_0 (cbrt (* -0.25 (* (/ h g) (/ h a)))))
           (if (<= g -4.8e-138)
             (+
              (pow
               (* (cbrt (/ -1.0 (- (sqrt (* (+ h g) (- g h))) g))) (cbrt (* -2.0 a)))
               -1.0)
              (cbrt (/ (- (- g) (- g)) (* a 2.0))))
             (if (<= g 1.2e-264)
               (+ (/ (cbrt (* (* -0.25 (/ h g)) h)) (cbrt a)) t_0)
               (fma
                (cbrt (/ 0.5 a))
                (cbrt (- (fma (sqrt (+ h g)) (sqrt (- g h)) g)))
                (cbrt (/ (/ (- g g) -2.0) a))))))))
      double code(double g, double h, double a) {
      	double t_0 = cbrt((-g / a));
      	double tmp;
      	if (g <= -3.65e+152) {
      		tmp = t_0 + cbrt((-0.25 * ((h / g) * (h / a))));
      	} else if (g <= -4.8e-138) {
      		tmp = pow((cbrt((-1.0 / (sqrt(((h + g) * (g - h))) - g))) * cbrt((-2.0 * a))), -1.0) + cbrt(((-g - -g) / (a * 2.0)));
      	} else if (g <= 1.2e-264) {
      		tmp = (cbrt(((-0.25 * (h / g)) * h)) / cbrt(a)) + t_0;
      	} else {
      		tmp = fma(cbrt((0.5 / a)), cbrt(-fma(sqrt((h + g)), sqrt((g - h)), g)), cbrt((((g - g) / -2.0) / a)));
      	}
      	return tmp;
      }
      
      function code(g, h, a)
      	t_0 = cbrt(Float64(Float64(-g) / a))
      	tmp = 0.0
      	if (g <= -3.65e+152)
      		tmp = Float64(t_0 + cbrt(Float64(-0.25 * Float64(Float64(h / g) * Float64(h / a)))));
      	elseif (g <= -4.8e-138)
      		tmp = Float64((Float64(cbrt(Float64(-1.0 / Float64(sqrt(Float64(Float64(h + g) * Float64(g - h))) - g))) * cbrt(Float64(-2.0 * a))) ^ -1.0) + cbrt(Float64(Float64(Float64(-g) - Float64(-g)) / Float64(a * 2.0))));
      	elseif (g <= 1.2e-264)
      		tmp = Float64(Float64(cbrt(Float64(Float64(-0.25 * Float64(h / g)) * h)) / cbrt(a)) + t_0);
      	else
      		tmp = fma(cbrt(Float64(0.5 / a)), cbrt(Float64(-fma(sqrt(Float64(h + g)), sqrt(Float64(g - h)), g))), cbrt(Float64(Float64(Float64(g - g) / -2.0) / a)));
      	end
      	return tmp
      end
      
      code[g_, h_, a_] := Block[{t$95$0 = N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[g, -3.65e+152], N[(t$95$0 + N[Power[N[(-0.25 * N[(N[(h / g), $MachinePrecision] * N[(h / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[g, -4.8e-138], N[(N[Power[N[(N[Power[N[(-1.0 / N[(N[Sqrt[N[(N[(h + g), $MachinePrecision] * N[(g - h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(-2.0 * a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision] + N[Power[N[(N[((-g) - (-g)), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[g, 1.2e-264], N[(N[(N[Power[N[(N[(-0.25 * N[(h / g), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[a, 1/3], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[Power[N[(0.5 / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[(-N[(N[Sqrt[N[(h + g), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(g - h), $MachinePrecision]], $MachinePrecision] + g), $MachinePrecision]), 1/3], $MachinePrecision] + N[Power[N[(N[(N[(g - g), $MachinePrecision] / -2.0), $MachinePrecision] / a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \sqrt[3]{\frac{-g}{a}}\\
      \mathbf{if}\;g \leq -3.65 \cdot 10^{+152}:\\
      \;\;\;\;t\_0 + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}\\
      
      \mathbf{elif}\;g \leq -4.8 \cdot 10^{-138}:\\
      \;\;\;\;{\left(\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}\right)}^{-1} + \sqrt[3]{\frac{\left(-g\right) - \left(-g\right)}{a \cdot 2}}\\
      
      \mathbf{elif}\;g \leq 1.2 \cdot 10^{-264}:\\
      \;\;\;\;\frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + t\_0\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{0.5}{a}}, \sqrt[3]{-\mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}, \sqrt[3]{\frac{\frac{g - g}{-2}}{a}}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if g < -3.6500000000000002e152

        1. Initial program 1.5%

          \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in g around inf

          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
        4. Step-by-step derivation
          1. associate-*r/N/A

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

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

            \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
          4. lower-neg.f643.6

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

          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
        6. Taylor expanded in g around inf

          \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

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

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

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

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

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

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

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

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

            \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
          10. lower-cbrt.f6464.0

            \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
        8. Applied rewrites64.0%

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

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

            \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} \]
          3. lower-+.f6464.0

            \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} \]
        10. Applied rewrites64.0%

          \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}} \]

        if -3.6500000000000002e152 < g < -4.7999999999999998e-138

        1. Initial program 77.0%

          \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
        2. Add Preprocessing
        3. Applied rewrites77.7%

          \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
        4. Applied rewrites97.7%

          \[\leadsto \frac{1}{\color{blue}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
        5. Taylor expanded in g around -inf

          \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \color{blue}{-1 \cdot g}\right)} \]
        6. Step-by-step derivation
          1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\left(\left(-g\right) - \left(-g\right)\right) \cdot \color{blue}{\frac{1}{\frac{a}{\frac{1}{2}}}}} \]
          8. un-div-invN/A

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

            \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\color{blue}{\frac{\left(-g\right) - \left(-g\right)}{\frac{a}{\frac{1}{2}}}}} \]
        9. Applied rewrites97.7%

          \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\color{blue}{\frac{\left(-g\right) - \left(-g\right)}{a \cdot 2}}} \]

        if -4.7999999999999998e-138 < g < 1.1999999999999999e-264

        1. Initial program 42.0%

          \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in g around inf

          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
        4. Step-by-step derivation
          1. associate-*r/N/A

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

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

            \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
          4. lower-neg.f6415.8

            \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{\color{blue}{-g}}{a}} \]
        5. Applied rewrites15.8%

          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
        6. Taylor expanded in g around inf

          \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

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

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

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

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

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

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

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

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

            \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
          10. lower-cbrt.f6474.3

            \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
        8. Applied rewrites74.3%

          \[\leadsto \color{blue}{\sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} + \sqrt[3]{\frac{-g}{a}} \]
        9. Step-by-step derivation
          1. Applied rewrites74.4%

            \[\leadsto \sqrt[3]{\frac{h}{a}} \cdot \color{blue}{\sqrt[3]{\frac{h}{g} \cdot -0.25}} + \sqrt[3]{\frac{-g}{a}} \]
          2. Step-by-step derivation
            1. Applied rewrites75.4%

              \[\leadsto \frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\color{blue}{\sqrt[3]{a}}} + \sqrt[3]{\frac{-g}{a}} \]

            if 1.1999999999999999e-264 < g

            1. Initial program 44.7%

              \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
            2. Add Preprocessing
            3. Applied rewrites44.7%

              \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
            4. Taylor expanded in g around -inf

              \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \color{blue}{-1 \cdot \left(g \cdot {\left(\sqrt{-1}\right)}^{2}\right)}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
            5. Step-by-step derivation
              1. associate-*r*N/A

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

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

                \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(\mathsf{neg}\left(g\right)\right) \cdot \color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
              4. rem-square-sqrtN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \sqrt[3]{\frac{1}{\frac{a \cdot \color{blue}{2}}{\left(-g\right) - \sqrt{g \cdot g - h \cdot h}}}} \]
              18. lower-*.f6446.3

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

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

                \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \sqrt[3]{\frac{1}{\frac{a \cdot 2}{\left(-g\right) - \sqrt{\color{blue}{g \cdot g - h \cdot h}}}}} \]
            8. Applied rewrites68.8%

              \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \sqrt[3]{\color{blue}{\frac{1}{\frac{a \cdot 2}{-\mathsf{fma}\left(\sqrt{g - h}, \sqrt{h + g}, g\right)}}}} \]
            9. Applied rewrites96.1%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{\frac{0.5}{a}}, \sqrt[3]{-\mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}, \sqrt[3]{\frac{\frac{g - g}{-2}}{a}}\right)} \]
          3. Recombined 4 regimes into one program.
          4. Final simplification86.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;g \leq -3.65 \cdot 10^{+152}:\\ \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}\\ \mathbf{elif}\;g \leq -4.8 \cdot 10^{-138}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}\right)}^{-1} + \sqrt[3]{\frac{\left(-g\right) - \left(-g\right)}{a \cdot 2}}\\ \mathbf{elif}\;g \leq 1.2 \cdot 10^{-264}:\\ \;\;\;\;\frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + \sqrt[3]{\frac{-g}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{0.5}{a}}, \sqrt[3]{-\mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}, \sqrt[3]{\frac{\frac{g - g}{-2}}{a}}\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 4: 87.1% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{\frac{0.5}{a}}\\ t_1 := \sqrt[3]{\frac{-g}{a}}\\ \mathbf{if}\;g \leq -2.15 \cdot 10^{+151}:\\ \;\;\;\;t\_1 + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}\\ \mathbf{elif}\;g \leq -4.8 \cdot 10^{-138}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, \sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}, \sqrt[3]{\left(\left(-g\right) - \left(-g\right)\right) \cdot \frac{0.5}{a}}\right)\\ \mathbf{elif}\;g \leq 1.2 \cdot 10^{-264}:\\ \;\;\;\;\frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, \sqrt[3]{-\mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}, \sqrt[3]{\frac{\frac{g - g}{-2}}{a}}\right)\\ \end{array} \end{array} \]
          (FPCore (g h a)
           :precision binary64
           (let* ((t_0 (cbrt (/ 0.5 a))) (t_1 (cbrt (/ (- g) a))))
             (if (<= g -2.15e+151)
               (+ t_1 (cbrt (* -0.25 (* (/ h g) (/ h a)))))
               (if (<= g -4.8e-138)
                 (fma
                  t_0
                  (cbrt (- (sqrt (* (+ h g) (- g h))) g))
                  (cbrt (* (- (- g) (- g)) (/ 0.5 a))))
                 (if (<= g 1.2e-264)
                   (+ (/ (cbrt (* (* -0.25 (/ h g)) h)) (cbrt a)) t_1)
                   (fma
                    t_0
                    (cbrt (- (fma (sqrt (+ h g)) (sqrt (- g h)) g)))
                    (cbrt (/ (/ (- g g) -2.0) a))))))))
          double code(double g, double h, double a) {
          	double t_0 = cbrt((0.5 / a));
          	double t_1 = cbrt((-g / a));
          	double tmp;
          	if (g <= -2.15e+151) {
          		tmp = t_1 + cbrt((-0.25 * ((h / g) * (h / a))));
          	} else if (g <= -4.8e-138) {
          		tmp = fma(t_0, cbrt((sqrt(((h + g) * (g - h))) - g)), cbrt(((-g - -g) * (0.5 / a))));
          	} else if (g <= 1.2e-264) {
          		tmp = (cbrt(((-0.25 * (h / g)) * h)) / cbrt(a)) + t_1;
          	} else {
          		tmp = fma(t_0, cbrt(-fma(sqrt((h + g)), sqrt((g - h)), g)), cbrt((((g - g) / -2.0) / a)));
          	}
          	return tmp;
          }
          
          function code(g, h, a)
          	t_0 = cbrt(Float64(0.5 / a))
          	t_1 = cbrt(Float64(Float64(-g) / a))
          	tmp = 0.0
          	if (g <= -2.15e+151)
          		tmp = Float64(t_1 + cbrt(Float64(-0.25 * Float64(Float64(h / g) * Float64(h / a)))));
          	elseif (g <= -4.8e-138)
          		tmp = fma(t_0, cbrt(Float64(sqrt(Float64(Float64(h + g) * Float64(g - h))) - g)), cbrt(Float64(Float64(Float64(-g) - Float64(-g)) * Float64(0.5 / a))));
          	elseif (g <= 1.2e-264)
          		tmp = Float64(Float64(cbrt(Float64(Float64(-0.25 * Float64(h / g)) * h)) / cbrt(a)) + t_1);
          	else
          		tmp = fma(t_0, cbrt(Float64(-fma(sqrt(Float64(h + g)), sqrt(Float64(g - h)), g))), cbrt(Float64(Float64(Float64(g - g) / -2.0) / a)));
          	end
          	return tmp
          end
          
          code[g_, h_, a_] := Block[{t$95$0 = N[Power[N[(0.5 / a), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[g, -2.15e+151], N[(t$95$1 + N[Power[N[(-0.25 * N[(N[(h / g), $MachinePrecision] * N[(h / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[g, -4.8e-138], N[(t$95$0 * N[Power[N[(N[Sqrt[N[(N[(h + g), $MachinePrecision] * N[(g - h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - g), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(N[((-g) - (-g)), $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[g, 1.2e-264], N[(N[(N[Power[N[(N[(-0.25 * N[(h / g), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[a, 1/3], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$0 * N[Power[(-N[(N[Sqrt[N[(h + g), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(g - h), $MachinePrecision]], $MachinePrecision] + g), $MachinePrecision]), 1/3], $MachinePrecision] + N[Power[N[(N[(N[(g - g), $MachinePrecision] / -2.0), $MachinePrecision] / a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \sqrt[3]{\frac{0.5}{a}}\\
          t_1 := \sqrt[3]{\frac{-g}{a}}\\
          \mathbf{if}\;g \leq -2.15 \cdot 10^{+151}:\\
          \;\;\;\;t\_1 + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}\\
          
          \mathbf{elif}\;g \leq -4.8 \cdot 10^{-138}:\\
          \;\;\;\;\mathsf{fma}\left(t\_0, \sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}, \sqrt[3]{\left(\left(-g\right) - \left(-g\right)\right) \cdot \frac{0.5}{a}}\right)\\
          
          \mathbf{elif}\;g \leq 1.2 \cdot 10^{-264}:\\
          \;\;\;\;\frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + t\_1\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(t\_0, \sqrt[3]{-\mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}, \sqrt[3]{\frac{\frac{g - g}{-2}}{a}}\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if g < -2.14999999999999991e151

            1. Initial program 3.0%

              \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
            2. Add Preprocessing
            3. Taylor expanded in g around inf

              \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
            4. Step-by-step derivation
              1. associate-*r/N/A

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

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

                \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
              4. lower-neg.f643.9

                \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{\color{blue}{-g}}{a}} \]
            5. Applied rewrites3.9%

              \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
            6. Taylor expanded in g around inf

              \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
            7. Step-by-step derivation
              1. lower-*.f64N/A

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

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

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

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

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

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

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

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

                \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
              10. lower-cbrt.f6464.5

                \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
            8. Applied rewrites64.5%

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

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

                \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} \]
              3. lower-+.f6464.5

                \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} \]
            10. Applied rewrites64.5%

              \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}} \]

            if -2.14999999999999991e151 < g < -4.7999999999999998e-138

            1. Initial program 76.6%

              \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
            2. Add Preprocessing
            3. Applied rewrites77.3%

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

              \[\leadsto \frac{1}{\color{blue}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
            5. Taylor expanded in g around -inf

              \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \color{blue}{-1 \cdot g}\right)} \]
            6. Step-by-step derivation
              1. mul-1-negN/A

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

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

              \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \color{blue}{\left(-g\right)}\right)} \]
            8. Applied rewrites97.5%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{\frac{0.5}{a}}, \sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}, \sqrt[3]{\left(\left(-g\right) - \left(-g\right)\right) \cdot \frac{0.5}{a}}\right)} \]

            if -4.7999999999999998e-138 < g < 1.1999999999999999e-264

            1. Initial program 42.0%

              \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
            2. Add Preprocessing
            3. Taylor expanded in g around inf

              \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
            4. Step-by-step derivation
              1. associate-*r/N/A

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

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

                \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
              4. lower-neg.f6415.8

                \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{\color{blue}{-g}}{a}} \]
            5. Applied rewrites15.8%

              \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
            6. Taylor expanded in g around inf

              \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
            7. Step-by-step derivation
              1. lower-*.f64N/A

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

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

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

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

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

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

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

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

                \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
              10. lower-cbrt.f6474.3

                \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
            8. Applied rewrites74.3%

              \[\leadsto \color{blue}{\sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} + \sqrt[3]{\frac{-g}{a}} \]
            9. Step-by-step derivation
              1. Applied rewrites74.4%

                \[\leadsto \sqrt[3]{\frac{h}{a}} \cdot \color{blue}{\sqrt[3]{\frac{h}{g} \cdot -0.25}} + \sqrt[3]{\frac{-g}{a}} \]
              2. Step-by-step derivation
                1. Applied rewrites75.4%

                  \[\leadsto \frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\color{blue}{\sqrt[3]{a}}} + \sqrt[3]{\frac{-g}{a}} \]

                if 1.1999999999999999e-264 < g

                1. Initial program 44.7%

                  \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                2. Add Preprocessing
                3. Applied rewrites44.7%

                  \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                4. Taylor expanded in g around -inf

                  \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \color{blue}{-1 \cdot \left(g \cdot {\left(\sqrt{-1}\right)}^{2}\right)}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                5. Step-by-step derivation
                  1. associate-*r*N/A

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

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

                    \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(\mathsf{neg}\left(g\right)\right) \cdot \color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)}}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                  4. rem-square-sqrtN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \sqrt[3]{\frac{1}{\frac{a \cdot \color{blue}{2}}{\left(-g\right) - \sqrt{g \cdot g - h \cdot h}}}} \]
                  18. lower-*.f6446.3

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

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

                    \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \sqrt[3]{\frac{1}{\frac{a \cdot 2}{\left(-g\right) - \sqrt{\color{blue}{g \cdot g - h \cdot h}}}}} \]
                8. Applied rewrites68.8%

                  \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \left(-g\right) \cdot -1}}} + \sqrt[3]{\color{blue}{\frac{1}{\frac{a \cdot 2}{-\mathsf{fma}\left(\sqrt{g - h}, \sqrt{h + g}, g\right)}}}} \]
                9. Applied rewrites96.1%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{\frac{0.5}{a}}, \sqrt[3]{-\mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}, \sqrt[3]{\frac{\frac{g - g}{-2}}{a}}\right)} \]
              3. Recombined 4 regimes into one program.
              4. Add Preprocessing

              Alternative 5: 76.6% accurate, 0.8× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{\frac{-g}{a}}\\ \mathbf{if}\;g \leq -2.15 \cdot 10^{+151}:\\ \;\;\;\;t\_0 + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}\\ \mathbf{elif}\;g \leq -4.8 \cdot 10^{-138}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{0.5}{a}}, \sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}, \sqrt[3]{\left(\left(-g\right) - \left(-g\right)\right) \cdot \frac{0.5}{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + t\_0\\ \end{array} \end{array} \]
              (FPCore (g h a)
               :precision binary64
               (let* ((t_0 (cbrt (/ (- g) a))))
                 (if (<= g -2.15e+151)
                   (+ t_0 (cbrt (* -0.25 (* (/ h g) (/ h a)))))
                   (if (<= g -4.8e-138)
                     (fma
                      (cbrt (/ 0.5 a))
                      (cbrt (- (sqrt (* (+ h g) (- g h))) g))
                      (cbrt (* (- (- g) (- g)) (/ 0.5 a))))
                     (+ (/ (cbrt (* (* -0.25 (/ h g)) h)) (cbrt a)) t_0)))))
              double code(double g, double h, double a) {
              	double t_0 = cbrt((-g / a));
              	double tmp;
              	if (g <= -2.15e+151) {
              		tmp = t_0 + cbrt((-0.25 * ((h / g) * (h / a))));
              	} else if (g <= -4.8e-138) {
              		tmp = fma(cbrt((0.5 / a)), cbrt((sqrt(((h + g) * (g - h))) - g)), cbrt(((-g - -g) * (0.5 / a))));
              	} else {
              		tmp = (cbrt(((-0.25 * (h / g)) * h)) / cbrt(a)) + t_0;
              	}
              	return tmp;
              }
              
              function code(g, h, a)
              	t_0 = cbrt(Float64(Float64(-g) / a))
              	tmp = 0.0
              	if (g <= -2.15e+151)
              		tmp = Float64(t_0 + cbrt(Float64(-0.25 * Float64(Float64(h / g) * Float64(h / a)))));
              	elseif (g <= -4.8e-138)
              		tmp = fma(cbrt(Float64(0.5 / a)), cbrt(Float64(sqrt(Float64(Float64(h + g) * Float64(g - h))) - g)), cbrt(Float64(Float64(Float64(-g) - Float64(-g)) * Float64(0.5 / a))));
              	else
              		tmp = Float64(Float64(cbrt(Float64(Float64(-0.25 * Float64(h / g)) * h)) / cbrt(a)) + t_0);
              	end
              	return tmp
              end
              
              code[g_, h_, a_] := Block[{t$95$0 = N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[g, -2.15e+151], N[(t$95$0 + N[Power[N[(-0.25 * N[(N[(h / g), $MachinePrecision] * N[(h / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[g, -4.8e-138], N[(N[Power[N[(0.5 / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[Sqrt[N[(N[(h + g), $MachinePrecision] * N[(g - h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - g), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(N[((-g) - (-g)), $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(N[(-0.25 * N[(h / g), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[a, 1/3], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \sqrt[3]{\frac{-g}{a}}\\
              \mathbf{if}\;g \leq -2.15 \cdot 10^{+151}:\\
              \;\;\;\;t\_0 + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}\\
              
              \mathbf{elif}\;g \leq -4.8 \cdot 10^{-138}:\\
              \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{0.5}{a}}, \sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}, \sqrt[3]{\left(\left(-g\right) - \left(-g\right)\right) \cdot \frac{0.5}{a}}\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + t\_0\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if g < -2.14999999999999991e151

                1. Initial program 3.0%

                  \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in g around inf

                  \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
                4. Step-by-step derivation
                  1. associate-*r/N/A

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

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

                    \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
                  4. lower-neg.f643.9

                    \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{\color{blue}{-g}}{a}} \]
                5. Applied rewrites3.9%

                  \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
                6. Taylor expanded in g around inf

                  \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
                7. Step-by-step derivation
                  1. lower-*.f64N/A

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

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

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

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

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

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

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

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

                    \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
                  10. lower-cbrt.f6464.5

                    \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
                8. Applied rewrites64.5%

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

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

                    \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} \]
                  3. lower-+.f6464.5

                    \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} \]
                10. Applied rewrites64.5%

                  \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}} \]

                if -2.14999999999999991e151 < g < -4.7999999999999998e-138

                1. Initial program 76.6%

                  \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                2. Add Preprocessing
                3. Applied rewrites77.3%

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

                  \[\leadsto \frac{1}{\color{blue}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                5. Taylor expanded in g around -inf

                  \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \color{blue}{-1 \cdot g}\right)} \]
                6. Step-by-step derivation
                  1. mul-1-negN/A

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

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

                  \[\leadsto \frac{1}{\sqrt[3]{\frac{-1}{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}} \cdot \sqrt[3]{-2 \cdot a}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \color{blue}{\left(-g\right)}\right)} \]
                8. Applied rewrites97.5%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{\frac{0.5}{a}}, \sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}, \sqrt[3]{\left(\left(-g\right) - \left(-g\right)\right) \cdot \frac{0.5}{a}}\right)} \]

                if -4.7999999999999998e-138 < g

                1. Initial program 44.4%

                  \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in g around inf

                  \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
                4. Step-by-step derivation
                  1. associate-*r/N/A

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

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

                    \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
                  4. lower-neg.f6441.0

                    \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{\color{blue}{-g}}{a}} \]
                5. Applied rewrites41.0%

                  \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
                6. Taylor expanded in g around inf

                  \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
                7. Step-by-step derivation
                  1. lower-*.f64N/A

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

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

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

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

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

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

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

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

                    \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
                  10. lower-cbrt.f6470.1

                    \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
                8. Applied rewrites70.1%

                  \[\leadsto \color{blue}{\sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} + \sqrt[3]{\frac{-g}{a}} \]
                9. Step-by-step derivation
                  1. Applied rewrites70.1%

                    \[\leadsto \sqrt[3]{\frac{h}{a}} \cdot \color{blue}{\sqrt[3]{\frac{h}{g} \cdot -0.25}} + \sqrt[3]{\frac{-g}{a}} \]
                  2. Step-by-step derivation
                    1. Applied rewrites70.4%

                      \[\leadsto \frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\color{blue}{\sqrt[3]{a}}} + \sqrt[3]{\frac{-g}{a}} \]
                  3. Recombined 3 regimes into one program.
                  4. Add Preprocessing

                  Alternative 6: 74.6% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + \sqrt[3]{\frac{-g}{a}} \end{array} \]
                  (FPCore (g h a)
                   :precision binary64
                   (+ (/ (cbrt (* (* -0.25 (/ h g)) h)) (cbrt a)) (cbrt (/ (- g) a))))
                  double code(double g, double h, double a) {
                  	return (cbrt(((-0.25 * (h / g)) * h)) / cbrt(a)) + cbrt((-g / a));
                  }
                  
                  public static double code(double g, double h, double a) {
                  	return (Math.cbrt(((-0.25 * (h / g)) * h)) / Math.cbrt(a)) + Math.cbrt((-g / a));
                  }
                  
                  function code(g, h, a)
                  	return Float64(Float64(cbrt(Float64(Float64(-0.25 * Float64(h / g)) * h)) / cbrt(a)) + cbrt(Float64(Float64(-g) / a)))
                  end
                  
                  code[g_, h_, a_] := N[(N[(N[Power[N[(N[(-0.25 * N[(h / g), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[a, 1/3], $MachinePrecision]), $MachinePrecision] + N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  \frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\sqrt[3]{a}} + \sqrt[3]{\frac{-g}{a}}
                  \end{array}
                  
                  Derivation
                  1. Initial program 40.4%

                    \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in g around inf

                    \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
                  4. Step-by-step derivation
                    1. associate-*r/N/A

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

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

                      \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
                    4. lower-neg.f6426.2

                      \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{\color{blue}{-g}}{a}} \]
                  5. Applied rewrites26.2%

                    \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
                  6. Taylor expanded in g around inf

                    \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
                  7. Step-by-step derivation
                    1. lower-*.f64N/A

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

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

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

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

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

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

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

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

                      \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
                    10. lower-cbrt.f6470.2

                      \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
                  8. Applied rewrites70.2%

                    \[\leadsto \color{blue}{\sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} + \sqrt[3]{\frac{-g}{a}} \]
                  9. Step-by-step derivation
                    1. Applied rewrites70.2%

                      \[\leadsto \sqrt[3]{\frac{h}{a}} \cdot \color{blue}{\sqrt[3]{\frac{h}{g} \cdot -0.25}} + \sqrt[3]{\frac{-g}{a}} \]
                    2. Step-by-step derivation
                      1. Applied rewrites70.4%

                        \[\leadsto \frac{\sqrt[3]{\left(-0.25 \cdot \frac{h}{g}\right) \cdot h}}{\color{blue}{\sqrt[3]{a}}} + \sqrt[3]{\frac{-g}{a}} \]
                      2. Add Preprocessing

                      Alternative 7: 74.5% accurate, 0.9× speedup?

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

                        \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                      2. Add Preprocessing
                      3. Taylor expanded in g around inf

                        \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
                      4. Step-by-step derivation
                        1. associate-*r/N/A

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

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

                          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
                        4. lower-neg.f6426.2

                          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{\color{blue}{-g}}{a}} \]
                      5. Applied rewrites26.2%

                        \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
                      6. Taylor expanded in g around inf

                        \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
                      7. Step-by-step derivation
                        1. lower-*.f64N/A

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

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

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

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

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

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

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

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

                          \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
                        10. lower-cbrt.f6470.2

                          \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
                      8. Applied rewrites70.2%

                        \[\leadsto \color{blue}{\sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} + \sqrt[3]{\frac{-g}{a}} \]
                      9. Step-by-step derivation
                        1. Applied rewrites70.2%

                          \[\leadsto \sqrt[3]{\frac{h}{a}} \cdot \color{blue}{\sqrt[3]{\frac{h}{g} \cdot -0.25}} + \sqrt[3]{\frac{-g}{a}} \]
                        2. Add Preprocessing

                        Alternative 8: 15.2% accurate, 0.9× speedup?

                        \[\begin{array}{l} \\ \sqrt[3]{{\left(2 \cdot a\right)}^{-1} \cdot \left(-2 \cdot g\right)} + \sqrt[3]{\frac{-g}{a}} \end{array} \]
                        (FPCore (g h a)
                         :precision binary64
                         (+ (cbrt (* (pow (* 2.0 a) -1.0) (* -2.0 g))) (cbrt (/ (- g) a))))
                        double code(double g, double h, double a) {
                        	return cbrt((pow((2.0 * a), -1.0) * (-2.0 * g))) + cbrt((-g / a));
                        }
                        
                        public static double code(double g, double h, double a) {
                        	return Math.cbrt((Math.pow((2.0 * a), -1.0) * (-2.0 * g))) + Math.cbrt((-g / a));
                        }
                        
                        function code(g, h, a)
                        	return Float64(cbrt(Float64((Float64(2.0 * a) ^ -1.0) * Float64(-2.0 * g))) + cbrt(Float64(Float64(-g) / a)))
                        end
                        
                        code[g_, h_, a_] := N[(N[Power[N[(N[Power[N[(2.0 * a), $MachinePrecision], -1.0], $MachinePrecision] * N[(-2.0 * g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        \sqrt[3]{{\left(2 \cdot a\right)}^{-1} \cdot \left(-2 \cdot g\right)} + \sqrt[3]{\frac{-g}{a}}
                        \end{array}
                        
                        Derivation
                        1. Initial program 40.4%

                          \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                        2. Add Preprocessing
                        3. Taylor expanded in g around inf

                          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
                        4. Step-by-step derivation
                          1. associate-*r/N/A

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

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

                            \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
                          4. lower-neg.f6426.2

                            \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{\color{blue}{-g}}{a}} \]
                        5. Applied rewrites26.2%

                          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
                        6. Taylor expanded in g around -inf

                          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \color{blue}{\left(-2 \cdot g\right)}} + \sqrt[3]{\frac{-g}{a}} \]
                        7. Step-by-step derivation
                          1. lower-*.f6414.5

                            \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \color{blue}{\left(-2 \cdot g\right)}} + \sqrt[3]{\frac{-g}{a}} \]
                        8. Applied rewrites14.5%

                          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \color{blue}{\left(-2 \cdot g\right)}} + \sqrt[3]{\frac{-g}{a}} \]
                        9. Final simplification14.5%

                          \[\leadsto \sqrt[3]{{\left(2 \cdot a\right)}^{-1} \cdot \left(-2 \cdot g\right)} + \sqrt[3]{\frac{-g}{a}} \]
                        10. Add Preprocessing

                        Alternative 9: 74.5% accurate, 1.2× speedup?

                        \[\begin{array}{l} \\ \sqrt[3]{\frac{-g}{a}} + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)} \end{array} \]
                        (FPCore (g h a)
                         :precision binary64
                         (+ (cbrt (/ (- g) a)) (cbrt (* -0.25 (* (/ h g) (/ h a))))))
                        double code(double g, double h, double a) {
                        	return cbrt((-g / a)) + cbrt((-0.25 * ((h / g) * (h / a))));
                        }
                        
                        public static double code(double g, double h, double a) {
                        	return Math.cbrt((-g / a)) + Math.cbrt((-0.25 * ((h / g) * (h / a))));
                        }
                        
                        function code(g, h, a)
                        	return Float64(cbrt(Float64(Float64(-g) / a)) + cbrt(Float64(-0.25 * Float64(Float64(h / g) * Float64(h / a)))))
                        end
                        
                        code[g_, h_, a_] := N[(N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(-0.25 * N[(N[(h / g), $MachinePrecision] * N[(h / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        \sqrt[3]{\frac{-g}{a}} + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}
                        \end{array}
                        
                        Derivation
                        1. Initial program 40.4%

                          \[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                        2. Add Preprocessing
                        3. Taylor expanded in g around inf

                          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
                        4. Step-by-step derivation
                          1. associate-*r/N/A

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

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

                            \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{\mathsf{neg}\left(g\right)}{a}}} \]
                          4. lower-neg.f6426.2

                            \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{\color{blue}{-g}}{a}} \]
                        5. Applied rewrites26.2%

                          \[\leadsto \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
                        6. Taylor expanded in g around inf

                          \[\leadsto \color{blue}{\sqrt[3]{\frac{{h}^{2}}{a \cdot g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} + \sqrt[3]{\frac{-g}{a}} \]
                        7. Step-by-step derivation
                          1. lower-*.f64N/A

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

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

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

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

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

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

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

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

                            \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\color{blue}{\sqrt[3]{\frac{-1}{2}}} \cdot \sqrt[3]{\frac{1}{2}}\right) + \sqrt[3]{\frac{-g}{a}} \]
                          10. lower-cbrt.f6470.2

                            \[\leadsto \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \color{blue}{\sqrt[3]{0.5}}\right) + \sqrt[3]{\frac{-g}{a}} \]
                        8. Applied rewrites70.2%

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

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

                            \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{\frac{1}{2}}\right)} \]
                          3. lower-+.f6470.2

                            \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{h}{a} \cdot \frac{h}{g}} \cdot \left(\sqrt[3]{-0.5} \cdot \sqrt[3]{0.5}\right)} \]
                        10. Applied rewrites70.2%

                          \[\leadsto \color{blue}{\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{-0.25 \cdot \left(\frac{h}{g} \cdot \frac{h}{a}\right)}} \]
                        11. Add Preprocessing

                        Alternative 10: 2.9% accurate, 302.0× speedup?

                        \[\begin{array}{l} \\ 0 \end{array} \]
                        (FPCore (g h a) :precision binary64 0.0)
                        double code(double g, double h, double a) {
                        	return 0.0;
                        }
                        
                        real(8) function code(g, h, a)
                            real(8), intent (in) :: g
                            real(8), intent (in) :: h
                            real(8), intent (in) :: a
                            code = 0.0d0
                        end function
                        
                        public static double code(double g, double h, double a) {
                        	return 0.0;
                        }
                        
                        def code(g, h, a):
                        	return 0.0
                        
                        function code(g, h, a)
                        	return 0.0
                        end
                        
                        function tmp = code(g, h, a)
                        	tmp = 0.0;
                        end
                        
                        code[g_, h_, a_] := 0.0
                        
                        \begin{array}{l}
                        
                        \\
                        0
                        \end{array}
                        
                        Derivation
                        1. Initial program 40.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \sqrt[3]{\frac{\frac{1}{2}}{a}} \cdot \color{blue}{\sqrt[3]{\left(-g\right) + \sqrt{g \cdot g - h \cdot h}}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                          14. lower-cbrt.f6445.4

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

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

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

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

                            \[\leadsto \sqrt[3]{\frac{\frac{1}{2}}{a}} \cdot \sqrt[3]{\color{blue}{\sqrt{g \cdot g - h \cdot h} - g}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                          19. lower--.f6445.4

                            \[\leadsto \sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{\color{blue}{\sqrt{g \cdot g - h \cdot h} - g}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                        4. Applied rewrites45.4%

                          \[\leadsto \color{blue}{\sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{\sqrt{\left(g - h\right) \cdot \left(h + g\right)} - g}} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)} \]
                        5. Taylor expanded in g around -inf

                          \[\leadsto \color{blue}{-1 \cdot \left(\sqrt[3]{\frac{g \cdot \left(1 + {\left(\sqrt{-1}\right)}^{2}\right)}{a}} \cdot \sqrt[3]{\frac{1}{2}}\right)} \]
                        6. Step-by-step derivation
                          1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

                            \[\leadsto -\sqrt[3]{\frac{g \cdot \color{blue}{0}}{a}} \cdot \sqrt[3]{\frac{1}{2}} \]
                          11. lower-cbrt.f643.0

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

                          \[\leadsto \color{blue}{-\sqrt[3]{\frac{g \cdot 0}{a}} \cdot \sqrt[3]{0.5}} \]
                        8. Step-by-step derivation
                          1. Applied rewrites3.0%

                            \[\leadsto \color{blue}{0} \]
                          2. Add Preprocessing

                          Reproduce

                          ?
                          herbie shell --seed 2024309 
                          (FPCore (g h a)
                            :name "2-ancestry mixing, positive discriminant"
                            :precision binary64
                            (+ (cbrt (* (/ 1.0 (* 2.0 a)) (+ (- g) (sqrt (- (* g g) (* h h)))))) (cbrt (* (/ 1.0 (* 2.0 a)) (- (- g) (sqrt (- (* g g) (* h h))))))))