2-ancestry mixing, positive discriminant

Percentage Accurate: 43.6% → 79.7%
Time: 11.2s
Alternatives: 12
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 12 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 43.6% 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: 79.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{\frac{-g}{a}}\\ t_1 := \sqrt{g - h}\\ t_2 := \left(h + g\right) \cdot \left(g - h\right)\\ t_3 := \sqrt{t\_2}\\ t_4 := t\_3 - g\\ t_5 := \sqrt{h + g}\\ \mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + t\_0\\ \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\ \;\;\;\;\sqrt[3]{\frac{\left(t\_2 - g \cdot g\right) \cdot \frac{0.5}{a}}{g - t\_3}} + \sqrt[3]{t\_4} \cdot \sqrt[3]{\frac{0.5}{a}}\\ \mathbf{elif}\;g \leq 1.05 \cdot 10^{-154}:\\ \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + t\_0\\ \mathbf{elif}\;g \leq 1.7 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{-1}{a}}, \sqrt[3]{\frac{\mathsf{fma}\left(t\_1, t\_5, g\right)}{2}}, \sqrt[3]{t\_4 \cdot \frac{0.5}{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt[3]{\frac{\left(-2\right) \cdot a}{\mathsf{fma}\left(t\_5, t\_1, g\right)}}} + \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{\left(\left(\frac{\left(\frac{{\left(0 \cdot g\right)}^{2} \cdot 0.25}{g \cdot g} - -1\right) \cdot h}{g} - \frac{0 \cdot g}{g}\right) \cdot 0.5\right) \cdot h}}}\\ \end{array} \end{array} \]
(FPCore (g h a)
 :precision binary64
 (let* ((t_0 (cbrt (/ (- g) a)))
        (t_1 (sqrt (- g h)))
        (t_2 (* (+ h g) (- g h)))
        (t_3 (sqrt t_2))
        (t_4 (- t_3 g))
        (t_5 (sqrt (+ h g))))
   (if (<= g -1.32e+154)
     (+ (cbrt (* (/ h a) (* -0.25 (/ h g)))) t_0)
     (if (<= g -6e-114)
       (+
        (cbrt (/ (* (- t_2 (* g g)) (/ 0.5 a)) (- g t_3)))
        (* (cbrt t_4) (cbrt (/ 0.5 a))))
       (if (<= g 1.05e-154)
         (+ (* (cbrt (* (/ -0.25 a) (/ h g))) (cbrt h)) t_0)
         (if (<= g 1.7e+153)
           (fma
            (cbrt (/ -1.0 a))
            (cbrt (/ (fma t_1 t_5 g) 2.0))
            (cbrt (* t_4 (/ 0.5 a))))
           (+
            (/ 1.0 (cbrt (/ (* (- 2.0) a) (fma t_5 t_1 g))))
            (/
             1.0
             (cbrt
              (/
               (* -2.0 a)
               (*
                (*
                 (-
                  (/ (* (- (/ (* (pow (* 0.0 g) 2.0) 0.25) (* g g)) -1.0) h) g)
                  (/ (* 0.0 g) g))
                 0.5)
                h)))))))))))
double code(double g, double h, double a) {
	double t_0 = cbrt((-g / a));
	double t_1 = sqrt((g - h));
	double t_2 = (h + g) * (g - h);
	double t_3 = sqrt(t_2);
	double t_4 = t_3 - g;
	double t_5 = sqrt((h + g));
	double tmp;
	if (g <= -1.32e+154) {
		tmp = cbrt(((h / a) * (-0.25 * (h / g)))) + t_0;
	} else if (g <= -6e-114) {
		tmp = cbrt((((t_2 - (g * g)) * (0.5 / a)) / (g - t_3))) + (cbrt(t_4) * cbrt((0.5 / a)));
	} else if (g <= 1.05e-154) {
		tmp = (cbrt(((-0.25 / a) * (h / g))) * cbrt(h)) + t_0;
	} else if (g <= 1.7e+153) {
		tmp = fma(cbrt((-1.0 / a)), cbrt((fma(t_1, t_5, g) / 2.0)), cbrt((t_4 * (0.5 / a))));
	} else {
		tmp = (1.0 / cbrt(((-2.0 * a) / fma(t_5, t_1, g)))) + (1.0 / cbrt(((-2.0 * a) / ((((((((pow((0.0 * g), 2.0) * 0.25) / (g * g)) - -1.0) * h) / g) - ((0.0 * g) / g)) * 0.5) * h))));
	}
	return tmp;
}
function code(g, h, a)
	t_0 = cbrt(Float64(Float64(-g) / a))
	t_1 = sqrt(Float64(g - h))
	t_2 = Float64(Float64(h + g) * Float64(g - h))
	t_3 = sqrt(t_2)
	t_4 = Float64(t_3 - g)
	t_5 = sqrt(Float64(h + g))
	tmp = 0.0
	if (g <= -1.32e+154)
		tmp = Float64(cbrt(Float64(Float64(h / a) * Float64(-0.25 * Float64(h / g)))) + t_0);
	elseif (g <= -6e-114)
		tmp = Float64(cbrt(Float64(Float64(Float64(t_2 - Float64(g * g)) * Float64(0.5 / a)) / Float64(g - t_3))) + Float64(cbrt(t_4) * cbrt(Float64(0.5 / a))));
	elseif (g <= 1.05e-154)
		tmp = Float64(Float64(cbrt(Float64(Float64(-0.25 / a) * Float64(h / g))) * cbrt(h)) + t_0);
	elseif (g <= 1.7e+153)
		tmp = fma(cbrt(Float64(-1.0 / a)), cbrt(Float64(fma(t_1, t_5, g) / 2.0)), cbrt(Float64(t_4 * Float64(0.5 / a))));
	else
		tmp = Float64(Float64(1.0 / cbrt(Float64(Float64(Float64(-2.0) * a) / fma(t_5, t_1, g)))) + Float64(1.0 / cbrt(Float64(Float64(-2.0 * a) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64((Float64(0.0 * g) ^ 2.0) * 0.25) / Float64(g * g)) - -1.0) * h) / g) - Float64(Float64(0.0 * g) / g)) * 0.5) * h)))));
	end
	return tmp
end
code[g_, h_, a_] := Block[{t$95$0 = N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(g - h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(h + g), $MachinePrecision] * N[(g - h), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 - g), $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(h + g), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[g, -1.32e+154], N[(N[Power[N[(N[(h / a), $MachinePrecision] * N[(-0.25 * N[(h / g), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[g, -6e-114], N[(N[Power[N[(N[(N[(t$95$2 - N[(g * g), $MachinePrecision]), $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision] / N[(g - t$95$3), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[(N[Power[t$95$4, 1/3], $MachinePrecision] * N[Power[N[(0.5 / a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[g, 1.05e-154], N[(N[(N[Power[N[(N[(-0.25 / a), $MachinePrecision] * N[(h / g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[h, 1/3], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[g, 1.7e+153], N[(N[Power[N[(-1.0 / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(t$95$1 * t$95$5 + g), $MachinePrecision] / 2.0), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(t$95$4 * N[(0.5 / a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Power[N[(N[((-2.0) * a), $MachinePrecision] / N[(t$95$5 * t$95$1 + g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[N[(N[(-2.0 * a), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(N[(N[Power[N[(0.0 * g), $MachinePrecision], 2.0], $MachinePrecision] * 0.25), $MachinePrecision] / N[(g * g), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision] * h), $MachinePrecision] / g), $MachinePrecision] - N[(N[(0.0 * g), $MachinePrecision] / g), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt[3]{\frac{-g}{a}}\\
t_1 := \sqrt{g - h}\\
t_2 := \left(h + g\right) \cdot \left(g - h\right)\\
t_3 := \sqrt{t\_2}\\
t_4 := t\_3 - g\\
t_5 := \sqrt{h + g}\\
\mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + t\_0\\

\mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\
\;\;\;\;\sqrt[3]{\frac{\left(t\_2 - g \cdot g\right) \cdot \frac{0.5}{a}}{g - t\_3}} + \sqrt[3]{t\_4} \cdot \sqrt[3]{\frac{0.5}{a}}\\

\mathbf{elif}\;g \leq 1.05 \cdot 10^{-154}:\\
\;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + t\_0\\

\mathbf{elif}\;g \leq 1.7 \cdot 10^{+153}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{-1}{a}}, \sqrt[3]{\frac{\mathsf{fma}\left(t\_1, t\_5, g\right)}{2}}, \sqrt[3]{t\_4 \cdot \frac{0.5}{a}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if g < -1.31999999999999998e154

    1. Initial program 0.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.5

        \[\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.5%

      \[\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.f6461.8

        \[\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 rewrites61.8%

      \[\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-+.f6461.8

        \[\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 rewrites61.8%

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

    if -1.31999999999999998e154 < g < -6.0000000000000003e-114

    1. Initial program 85.1%

      \[\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.f6497.7

        \[\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--.f6497.7

        \[\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 rewrites97.7%

      \[\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. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt[3]{\frac{\frac{1}{2}}{a}} \cdot \sqrt[3]{\sqrt{\left(g - h\right) \cdot \left(h + g\right)} - g} + \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 \sqrt[3]{\frac{\frac{1}{2}}{a}} \cdot \sqrt[3]{\sqrt{\left(g - h\right) \cdot \left(h + g\right)} - g} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \color{blue}{\left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)}} \]
      3. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.0000000000000003e-114 < g < 1.04999999999999992e-154

    1. Initial program 25.8%

      \[\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.f6416.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 rewrites16.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.f6479.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 rewrites79.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. Applied rewrites80.3%

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

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

        if 1.04999999999999992e-154 < g < 1.6999999999999999e153

        1. Initial program 86.9%

          \[\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 rewrites86.9%

          \[\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. Step-by-step derivation
          1. lift-cbrt.f64N/A

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

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

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

            \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}} + \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. cbrt-divN/A

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

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

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

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

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

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

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

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

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

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

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

        if 1.6999999999999999e153 < g

        1. Initial program 1.9%

          \[\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 rewrites1.9%

          \[\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. Step-by-step derivation
          1. lift-cbrt.f64N/A

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

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

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

            \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}} + \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. cbrt-divN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + \sqrt[3]{\frac{-g}{a}}\\ \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\ \;\;\;\;\sqrt[3]{\frac{\left(\left(h + g\right) \cdot \left(g - h\right) - g \cdot g\right) \cdot \frac{0.5}{a}}{g - \sqrt{\left(h + g\right) \cdot \left(g - h\right)}}} + \sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g} \cdot \sqrt[3]{\frac{0.5}{a}}\\ \mathbf{elif}\;g \leq 1.05 \cdot 10^{-154}:\\ \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + \sqrt[3]{\frac{-g}{a}}\\ \mathbf{elif}\;g \leq 1.7 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{-1}{a}}, \sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{g - h}, \sqrt{h + g}, g\right)}{2}}, \sqrt[3]{\left(\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g\right) \cdot \frac{0.5}{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt[3]{\frac{\left(-2\right) \cdot a}{\mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}}} + \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{\left(\left(\frac{\left(\frac{{\left(0 \cdot g\right)}^{2} \cdot 0.25}{g \cdot g} - -1\right) \cdot h}{g} - \frac{0 \cdot g}{g}\right) \cdot 0.5\right) \cdot h}}}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 2: 76.6% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{a \cdot 2}\\ t_1 := \sqrt{g \cdot g - h \cdot h}\\ \mathbf{if}\;\sqrt[3]{t\_0 \cdot \left(t\_1 + g\right)} + \sqrt[3]{\left(g - t\_1\right) \cdot t\_0} \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{-0.5} \cdot \sqrt[3]{\frac{1}{\left(g \cdot g\right) \cdot a}}, \sqrt[3]{2}, \frac{{\left(\sqrt[3]{0.5}\right)}^{2}}{g} \cdot \sqrt[3]{\frac{0 \cdot h}{a}}\right) \cdot g\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{-0.25}{a}} \cdot \sqrt[3]{\frac{h}{g} \cdot h}\\ \end{array} \end{array} \]
      (FPCore (g h a)
       :precision binary64
       (let* ((t_0 (/ -1.0 (* a 2.0))) (t_1 (sqrt (- (* g g) (* h h)))))
         (if (<= (+ (cbrt (* t_0 (+ t_1 g))) (cbrt (* (- g t_1) t_0))) (- INFINITY))
           (*
            (fma
             (* (cbrt -0.5) (cbrt (/ 1.0 (* (* g g) a))))
             (cbrt 2.0)
             (* (/ (pow (cbrt 0.5) 2.0) g) (cbrt (/ (* 0.0 h) a))))
            g)
           (+ (cbrt (/ (- g) a)) (* (cbrt (/ -0.25 a)) (cbrt (* (/ h g) h)))))))
      double code(double g, double h, double a) {
      	double t_0 = -1.0 / (a * 2.0);
      	double t_1 = sqrt(((g * g) - (h * h)));
      	double tmp;
      	if ((cbrt((t_0 * (t_1 + g))) + cbrt(((g - t_1) * t_0))) <= -((double) INFINITY)) {
      		tmp = fma((cbrt(-0.5) * cbrt((1.0 / ((g * g) * a)))), cbrt(2.0), ((pow(cbrt(0.5), 2.0) / g) * cbrt(((0.0 * h) / a)))) * g;
      	} else {
      		tmp = cbrt((-g / a)) + (cbrt((-0.25 / a)) * cbrt(((h / g) * h)));
      	}
      	return tmp;
      }
      
      function code(g, h, a)
      	t_0 = Float64(-1.0 / Float64(a * 2.0))
      	t_1 = sqrt(Float64(Float64(g * g) - Float64(h * h)))
      	tmp = 0.0
      	if (Float64(cbrt(Float64(t_0 * Float64(t_1 + g))) + cbrt(Float64(Float64(g - t_1) * t_0))) <= Float64(-Inf))
      		tmp = Float64(fma(Float64(cbrt(-0.5) * cbrt(Float64(1.0 / Float64(Float64(g * g) * a)))), cbrt(2.0), Float64(Float64((cbrt(0.5) ^ 2.0) / g) * cbrt(Float64(Float64(0.0 * h) / a)))) * g);
      	else
      		tmp = Float64(cbrt(Float64(Float64(-g) / a)) + Float64(cbrt(Float64(-0.25 / a)) * cbrt(Float64(Float64(h / g) * h))));
      	end
      	return tmp
      end
      
      code[g_, h_, a_] := Block[{t$95$0 = N[(-1.0 / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(g * g), $MachinePrecision] - N[(h * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Power[N[(t$95$0 * N[(t$95$1 + g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(N[(g - t$95$1), $MachinePrecision] * t$95$0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(N[(N[Power[-0.5, 1/3], $MachinePrecision] * N[Power[N[(1.0 / N[(N[(g * g), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision] + N[(N[(N[Power[N[Power[0.5, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / g), $MachinePrecision] * N[Power[N[(N[(0.0 * h), $MachinePrecision] / a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * g), $MachinePrecision], N[(N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision] + N[(N[Power[N[(-0.25 / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(h / g), $MachinePrecision] * h), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{-1}{a \cdot 2}\\
      t_1 := \sqrt{g \cdot g - h \cdot h}\\
      \mathbf{if}\;\sqrt[3]{t\_0 \cdot \left(t\_1 + g\right)} + \sqrt[3]{\left(g - t\_1\right) \cdot t\_0} \leq -\infty:\\
      \;\;\;\;\mathsf{fma}\left(\sqrt[3]{-0.5} \cdot \sqrt[3]{\frac{1}{\left(g \cdot g\right) \cdot a}}, \sqrt[3]{2}, \frac{{\left(\sqrt[3]{0.5}\right)}^{2}}{g} \cdot \sqrt[3]{\frac{0 \cdot h}{a}}\right) \cdot g\\
      
      \mathbf{else}:\\
      \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{-0.25}{a}} \cdot \sqrt[3]{\frac{h}{g} \cdot h}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (+.f64 (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (-.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))) < -inf.0

        1. Initial program 4.2%

          \[\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.f6467.3

            \[\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--.f6467.3

            \[\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 rewrites67.3%

          \[\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}{g \cdot \left(\sqrt[3]{\frac{1}{a \cdot {g}^{2}}} \cdot \left(\sqrt[3]{\frac{-1}{2}} \cdot \sqrt[3]{2}\right) + \sqrt[3]{\frac{h + -1 \cdot h}{a}} \cdot \frac{{\left(\sqrt[3]{\frac{1}{2}}\right)}^{2}}{g}\right)} \]
        6. Step-by-step derivation
          1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -inf.0 < (+.f64 (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (-.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))

        1. Initial program 48.2%

          \[\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.f6430.1

            \[\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 rewrites30.1%

          \[\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.f6477.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 rewrites77.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. Applied rewrites77.7%

            \[\leadsto \sqrt[3]{\frac{h}{g} \cdot h} \cdot \color{blue}{\sqrt[3]{\frac{-0.25}{a}}} + \sqrt[3]{\frac{-g}{a}} \]
        10. Recombined 2 regimes into one program.
        11. Final simplification78.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt[3]{\frac{-1}{a \cdot 2} \cdot \left(\sqrt{g \cdot g - h \cdot h} + g\right)} + \sqrt[3]{\left(g - \sqrt{g \cdot g - h \cdot h}\right) \cdot \frac{-1}{a \cdot 2}} \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{-0.5} \cdot \sqrt[3]{\frac{1}{\left(g \cdot g\right) \cdot a}}, \sqrt[3]{2}, \frac{{\left(\sqrt[3]{0.5}\right)}^{2}}{g} \cdot \sqrt[3]{\frac{0 \cdot h}{a}}\right) \cdot g\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{-0.25}{a}} \cdot \sqrt[3]{\frac{h}{g} \cdot h}\\ \end{array} \]
        12. Add Preprocessing

        Alternative 3: 75.6% accurate, 0.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{a \cdot 2}\\ t_1 := \sqrt{g \cdot g - h \cdot h}\\ t_2 := \sqrt[3]{t\_0 \cdot \left(t\_1 + g\right)}\\ \mathbf{if}\;t\_2 + \sqrt[3]{\left(g - t\_1\right) \cdot t\_0} \leq -1 \cdot 10^{+61}:\\ \;\;\;\;\frac{\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}}{\sqrt[3]{a \cdot 2}} + t\_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{-0.25}{a}} \cdot \sqrt[3]{\frac{h}{g} \cdot h}\\ \end{array} \end{array} \]
        (FPCore (g h a)
         :precision binary64
         (let* ((t_0 (/ -1.0 (* a 2.0)))
                (t_1 (sqrt (- (* g g) (* h h))))
                (t_2 (cbrt (* t_0 (+ t_1 g)))))
           (if (<= (+ t_2 (cbrt (* (- g t_1) t_0))) -1e+61)
             (+ (/ (cbrt (- (sqrt (* (+ h g) (- g h))) g)) (cbrt (* a 2.0))) t_2)
             (+ (cbrt (/ (- g) a)) (* (cbrt (/ -0.25 a)) (cbrt (* (/ h g) h)))))))
        double code(double g, double h, double a) {
        	double t_0 = -1.0 / (a * 2.0);
        	double t_1 = sqrt(((g * g) - (h * h)));
        	double t_2 = cbrt((t_0 * (t_1 + g)));
        	double tmp;
        	if ((t_2 + cbrt(((g - t_1) * t_0))) <= -1e+61) {
        		tmp = (cbrt((sqrt(((h + g) * (g - h))) - g)) / cbrt((a * 2.0))) + t_2;
        	} else {
        		tmp = cbrt((-g / a)) + (cbrt((-0.25 / a)) * cbrt(((h / g) * h)));
        	}
        	return tmp;
        }
        
        public static double code(double g, double h, double a) {
        	double t_0 = -1.0 / (a * 2.0);
        	double t_1 = Math.sqrt(((g * g) - (h * h)));
        	double t_2 = Math.cbrt((t_0 * (t_1 + g)));
        	double tmp;
        	if ((t_2 + Math.cbrt(((g - t_1) * t_0))) <= -1e+61) {
        		tmp = (Math.cbrt((Math.sqrt(((h + g) * (g - h))) - g)) / Math.cbrt((a * 2.0))) + t_2;
        	} else {
        		tmp = Math.cbrt((-g / a)) + (Math.cbrt((-0.25 / a)) * Math.cbrt(((h / g) * h)));
        	}
        	return tmp;
        }
        
        function code(g, h, a)
        	t_0 = Float64(-1.0 / Float64(a * 2.0))
        	t_1 = sqrt(Float64(Float64(g * g) - Float64(h * h)))
        	t_2 = cbrt(Float64(t_0 * Float64(t_1 + g)))
        	tmp = 0.0
        	if (Float64(t_2 + cbrt(Float64(Float64(g - t_1) * t_0))) <= -1e+61)
        		tmp = Float64(Float64(cbrt(Float64(sqrt(Float64(Float64(h + g) * Float64(g - h))) - g)) / cbrt(Float64(a * 2.0))) + t_2);
        	else
        		tmp = Float64(cbrt(Float64(Float64(-g) / a)) + Float64(cbrt(Float64(-0.25 / a)) * cbrt(Float64(Float64(h / g) * h))));
        	end
        	return tmp
        end
        
        code[g_, h_, a_] := Block[{t$95$0 = N[(-1.0 / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(g * g), $MachinePrecision] - N[(h * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(t$95$0 * N[(t$95$1 + g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[N[(t$95$2 + N[Power[N[(N[(g - t$95$1), $MachinePrecision] * t$95$0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], -1e+61], N[(N[(N[Power[N[(N[Sqrt[N[(N[(h + g), $MachinePrecision] * N[(g - h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - g), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[N[(a * 2.0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], N[(N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision] + N[(N[Power[N[(-0.25 / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(h / g), $MachinePrecision] * h), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{-1}{a \cdot 2}\\
        t_1 := \sqrt{g \cdot g - h \cdot h}\\
        t_2 := \sqrt[3]{t\_0 \cdot \left(t\_1 + g\right)}\\
        \mathbf{if}\;t\_2 + \sqrt[3]{\left(g - t\_1\right) \cdot t\_0} \leq -1 \cdot 10^{+61}:\\
        \;\;\;\;\frac{\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}}{\sqrt[3]{a \cdot 2}} + t\_2\\
        
        \mathbf{else}:\\
        \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{-0.25}{a}} \cdot \sqrt[3]{\frac{h}{g} \cdot h}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (+.f64 (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (-.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))) < -9.99999999999999949e60

          1. Initial program 60.3%

            \[\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. 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)}} + \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 \sqrt[3]{\color{blue}{\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)} \]
            4. associate-*l/N/A

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

              \[\leadsto \color{blue}{\frac{\sqrt[3]{1 \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)}}{\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)} \]
            6. *-lft-identityN/A

              \[\leadsto \frac{\sqrt[3]{\color{blue}{\left(-g\right) + \sqrt{g \cdot g - h \cdot h}}}}{\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)} \]
            7. pow1/3N/A

              \[\leadsto \frac{\color{blue}{{\left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)}^{\frac{1}{3}}}}{\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)} \]
            8. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{{\left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)}^{\frac{1}{3}}}{\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)} \]
          4. Applied rewrites85.7%

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

          if -9.99999999999999949e60 < (+.f64 (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (-.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))

          1. Initial program 46.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.f6429.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 rewrites29.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.f6476.9

              \[\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 rewrites76.9%

            \[\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 rewrites77.1%

              \[\leadsto \sqrt[3]{\frac{h}{g} \cdot h} \cdot \color{blue}{\sqrt[3]{\frac{-0.25}{a}}} + \sqrt[3]{\frac{-g}{a}} \]
          10. Recombined 2 regimes into one program.
          11. Final simplification77.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt[3]{\frac{-1}{a \cdot 2} \cdot \left(\sqrt{g \cdot g - h \cdot h} + g\right)} + \sqrt[3]{\left(g - \sqrt{g \cdot g - h \cdot h}\right) \cdot \frac{-1}{a \cdot 2}} \leq -1 \cdot 10^{+61}:\\ \;\;\;\;\frac{\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}}{\sqrt[3]{a \cdot 2}} + \sqrt[3]{\frac{-1}{a \cdot 2} \cdot \left(\sqrt{g \cdot g - h \cdot h} + g\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{-0.25}{a}} \cdot \sqrt[3]{\frac{h}{g} \cdot h}\\ \end{array} \]
          12. Add Preprocessing

          Alternative 4: 75.6% accurate, 0.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{a \cdot 2}\\ t_1 := \sqrt{g \cdot g - h \cdot h}\\ t_2 := \sqrt[3]{t\_0 \cdot \left(t\_1 + g\right)}\\ \mathbf{if}\;t\_2 + \sqrt[3]{\left(g - t\_1\right) \cdot t\_0} \leq -4 \cdot 10^{+55}:\\ \;\;\;\;\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g} \cdot \sqrt[3]{\frac{0.5}{a}} + t\_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{-0.25}{a}} \cdot \sqrt[3]{\frac{h}{g} \cdot h}\\ \end{array} \end{array} \]
          (FPCore (g h a)
           :precision binary64
           (let* ((t_0 (/ -1.0 (* a 2.0)))
                  (t_1 (sqrt (- (* g g) (* h h))))
                  (t_2 (cbrt (* t_0 (+ t_1 g)))))
             (if (<= (+ t_2 (cbrt (* (- g t_1) t_0))) -4e+55)
               (+ (* (cbrt (- (sqrt (* (+ h g) (- g h))) g)) (cbrt (/ 0.5 a))) t_2)
               (+ (cbrt (/ (- g) a)) (* (cbrt (/ -0.25 a)) (cbrt (* (/ h g) h)))))))
          double code(double g, double h, double a) {
          	double t_0 = -1.0 / (a * 2.0);
          	double t_1 = sqrt(((g * g) - (h * h)));
          	double t_2 = cbrt((t_0 * (t_1 + g)));
          	double tmp;
          	if ((t_2 + cbrt(((g - t_1) * t_0))) <= -4e+55) {
          		tmp = (cbrt((sqrt(((h + g) * (g - h))) - g)) * cbrt((0.5 / a))) + t_2;
          	} else {
          		tmp = cbrt((-g / a)) + (cbrt((-0.25 / a)) * cbrt(((h / g) * h)));
          	}
          	return tmp;
          }
          
          public static double code(double g, double h, double a) {
          	double t_0 = -1.0 / (a * 2.0);
          	double t_1 = Math.sqrt(((g * g) - (h * h)));
          	double t_2 = Math.cbrt((t_0 * (t_1 + g)));
          	double tmp;
          	if ((t_2 + Math.cbrt(((g - t_1) * t_0))) <= -4e+55) {
          		tmp = (Math.cbrt((Math.sqrt(((h + g) * (g - h))) - g)) * Math.cbrt((0.5 / a))) + t_2;
          	} else {
          		tmp = Math.cbrt((-g / a)) + (Math.cbrt((-0.25 / a)) * Math.cbrt(((h / g) * h)));
          	}
          	return tmp;
          }
          
          function code(g, h, a)
          	t_0 = Float64(-1.0 / Float64(a * 2.0))
          	t_1 = sqrt(Float64(Float64(g * g) - Float64(h * h)))
          	t_2 = cbrt(Float64(t_0 * Float64(t_1 + g)))
          	tmp = 0.0
          	if (Float64(t_2 + cbrt(Float64(Float64(g - t_1) * t_0))) <= -4e+55)
          		tmp = Float64(Float64(cbrt(Float64(sqrt(Float64(Float64(h + g) * Float64(g - h))) - g)) * cbrt(Float64(0.5 / a))) + t_2);
          	else
          		tmp = Float64(cbrt(Float64(Float64(-g) / a)) + Float64(cbrt(Float64(-0.25 / a)) * cbrt(Float64(Float64(h / g) * h))));
          	end
          	return tmp
          end
          
          code[g_, h_, a_] := Block[{t$95$0 = N[(-1.0 / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(g * g), $MachinePrecision] - N[(h * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(t$95$0 * N[(t$95$1 + g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[N[(t$95$2 + N[Power[N[(N[(g - t$95$1), $MachinePrecision] * t$95$0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], -4e+55], N[(N[(N[Power[N[(N[Sqrt[N[(N[(h + g), $MachinePrecision] * N[(g - h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - g), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(0.5 / a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], N[(N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision] + N[(N[Power[N[(-0.25 / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(h / g), $MachinePrecision] * h), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \frac{-1}{a \cdot 2}\\
          t_1 := \sqrt{g \cdot g - h \cdot h}\\
          t_2 := \sqrt[3]{t\_0 \cdot \left(t\_1 + g\right)}\\
          \mathbf{if}\;t\_2 + \sqrt[3]{\left(g - t\_1\right) \cdot t\_0} \leq -4 \cdot 10^{+55}:\\
          \;\;\;\;\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g} \cdot \sqrt[3]{\frac{0.5}{a}} + t\_2\\
          
          \mathbf{else}:\\
          \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{-0.25}{a}} \cdot \sqrt[3]{\frac{h}{g} \cdot h}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (-.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))) < -4.00000000000000004e55

            1. Initial program 62.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. 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.f6486.3

                \[\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--.f6486.3

                \[\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 rewrites86.3%

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

            if -4.00000000000000004e55 < (+.f64 (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) (-.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))

            1. Initial program 46.2%

              \[\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.f6429.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 rewrites29.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.f6476.8

                \[\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 rewrites76.8%

              \[\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 rewrites77.0%

                \[\leadsto \sqrt[3]{\frac{h}{g} \cdot h} \cdot \color{blue}{\sqrt[3]{\frac{-0.25}{a}}} + \sqrt[3]{\frac{-g}{a}} \]
            10. Recombined 2 regimes into one program.
            11. Final simplification77.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt[3]{\frac{-1}{a \cdot 2} \cdot \left(\sqrt{g \cdot g - h \cdot h} + g\right)} + \sqrt[3]{\left(g - \sqrt{g \cdot g - h \cdot h}\right) \cdot \frac{-1}{a \cdot 2}} \leq -4 \cdot 10^{+55}:\\ \;\;\;\;\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g} \cdot \sqrt[3]{\frac{0.5}{a}} + \sqrt[3]{\frac{-1}{a \cdot 2} \cdot \left(\sqrt{g \cdot g - h \cdot h} + g\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\frac{-g}{a}} + \sqrt[3]{\frac{-0.25}{a}} \cdot \sqrt[3]{\frac{h}{g} \cdot h}\\ \end{array} \]
            12. Add Preprocessing

            Alternative 5: 79.6% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{\frac{-g}{a}}\\ t_1 := \sqrt{g - h}\\ t_2 := \left(h + g\right) \cdot \left(g - h\right)\\ t_3 := \sqrt{t\_2}\\ t_4 := t\_3 - g\\ t_5 := \sqrt{h + g}\\ \mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + t\_0\\ \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\ \;\;\;\;\sqrt[3]{\frac{\left(t\_2 - g \cdot g\right) \cdot \frac{0.5}{a}}{g - t\_3}} + \sqrt[3]{t\_4} \cdot \sqrt[3]{\frac{0.5}{a}}\\ \mathbf{elif}\;g \leq 1.05 \cdot 10^{-154}:\\ \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + t\_0\\ \mathbf{elif}\;g \leq 1.7 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{-1}{a}}, \sqrt[3]{\frac{\mathsf{fma}\left(t\_1, t\_5, g\right)}{2}}, \sqrt[3]{t\_4 \cdot \frac{0.5}{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{\left(0 \cdot h\right) \cdot -0.5}}} + \frac{1}{\sqrt[3]{\frac{\left(-2\right) \cdot a}{\mathsf{fma}\left(t\_5, t\_1, g\right)}}}\\ \end{array} \end{array} \]
            (FPCore (g h a)
             :precision binary64
             (let* ((t_0 (cbrt (/ (- g) a)))
                    (t_1 (sqrt (- g h)))
                    (t_2 (* (+ h g) (- g h)))
                    (t_3 (sqrt t_2))
                    (t_4 (- t_3 g))
                    (t_5 (sqrt (+ h g))))
               (if (<= g -1.32e+154)
                 (+ (cbrt (* (/ h a) (* -0.25 (/ h g)))) t_0)
                 (if (<= g -6e-114)
                   (+
                    (cbrt (/ (* (- t_2 (* g g)) (/ 0.5 a)) (- g t_3)))
                    (* (cbrt t_4) (cbrt (/ 0.5 a))))
                   (if (<= g 1.05e-154)
                     (+ (* (cbrt (* (/ -0.25 a) (/ h g))) (cbrt h)) t_0)
                     (if (<= g 1.7e+153)
                       (fma
                        (cbrt (/ -1.0 a))
                        (cbrt (/ (fma t_1 t_5 g) 2.0))
                        (cbrt (* t_4 (/ 0.5 a))))
                       (+
                        (/ 1.0 (cbrt (/ (* -2.0 a) (* (* 0.0 h) -0.5))))
                        (/ 1.0 (cbrt (/ (* (- 2.0) a) (fma t_5 t_1 g)))))))))))
            double code(double g, double h, double a) {
            	double t_0 = cbrt((-g / a));
            	double t_1 = sqrt((g - h));
            	double t_2 = (h + g) * (g - h);
            	double t_3 = sqrt(t_2);
            	double t_4 = t_3 - g;
            	double t_5 = sqrt((h + g));
            	double tmp;
            	if (g <= -1.32e+154) {
            		tmp = cbrt(((h / a) * (-0.25 * (h / g)))) + t_0;
            	} else if (g <= -6e-114) {
            		tmp = cbrt((((t_2 - (g * g)) * (0.5 / a)) / (g - t_3))) + (cbrt(t_4) * cbrt((0.5 / a)));
            	} else if (g <= 1.05e-154) {
            		tmp = (cbrt(((-0.25 / a) * (h / g))) * cbrt(h)) + t_0;
            	} else if (g <= 1.7e+153) {
            		tmp = fma(cbrt((-1.0 / a)), cbrt((fma(t_1, t_5, g) / 2.0)), cbrt((t_4 * (0.5 / a))));
            	} else {
            		tmp = (1.0 / cbrt(((-2.0 * a) / ((0.0 * h) * -0.5)))) + (1.0 / cbrt(((-2.0 * a) / fma(t_5, t_1, g))));
            	}
            	return tmp;
            }
            
            function code(g, h, a)
            	t_0 = cbrt(Float64(Float64(-g) / a))
            	t_1 = sqrt(Float64(g - h))
            	t_2 = Float64(Float64(h + g) * Float64(g - h))
            	t_3 = sqrt(t_2)
            	t_4 = Float64(t_3 - g)
            	t_5 = sqrt(Float64(h + g))
            	tmp = 0.0
            	if (g <= -1.32e+154)
            		tmp = Float64(cbrt(Float64(Float64(h / a) * Float64(-0.25 * Float64(h / g)))) + t_0);
            	elseif (g <= -6e-114)
            		tmp = Float64(cbrt(Float64(Float64(Float64(t_2 - Float64(g * g)) * Float64(0.5 / a)) / Float64(g - t_3))) + Float64(cbrt(t_4) * cbrt(Float64(0.5 / a))));
            	elseif (g <= 1.05e-154)
            		tmp = Float64(Float64(cbrt(Float64(Float64(-0.25 / a) * Float64(h / g))) * cbrt(h)) + t_0);
            	elseif (g <= 1.7e+153)
            		tmp = fma(cbrt(Float64(-1.0 / a)), cbrt(Float64(fma(t_1, t_5, g) / 2.0)), cbrt(Float64(t_4 * Float64(0.5 / a))));
            	else
            		tmp = Float64(Float64(1.0 / cbrt(Float64(Float64(-2.0 * a) / Float64(Float64(0.0 * h) * -0.5)))) + Float64(1.0 / cbrt(Float64(Float64(Float64(-2.0) * a) / fma(t_5, t_1, g)))));
            	end
            	return tmp
            end
            
            code[g_, h_, a_] := Block[{t$95$0 = N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(g - h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(h + g), $MachinePrecision] * N[(g - h), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 - g), $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(h + g), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[g, -1.32e+154], N[(N[Power[N[(N[(h / a), $MachinePrecision] * N[(-0.25 * N[(h / g), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[g, -6e-114], N[(N[Power[N[(N[(N[(t$95$2 - N[(g * g), $MachinePrecision]), $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision] / N[(g - t$95$3), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[(N[Power[t$95$4, 1/3], $MachinePrecision] * N[Power[N[(0.5 / a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[g, 1.05e-154], N[(N[(N[Power[N[(N[(-0.25 / a), $MachinePrecision] * N[(h / g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[h, 1/3], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[g, 1.7e+153], N[(N[Power[N[(-1.0 / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(t$95$1 * t$95$5 + g), $MachinePrecision] / 2.0), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(t$95$4 * N[(0.5 / a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Power[N[(N[(-2.0 * a), $MachinePrecision] / N[(N[(0.0 * h), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[N[(N[((-2.0) * a), $MachinePrecision] / N[(t$95$5 * t$95$1 + g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \sqrt[3]{\frac{-g}{a}}\\
            t_1 := \sqrt{g - h}\\
            t_2 := \left(h + g\right) \cdot \left(g - h\right)\\
            t_3 := \sqrt{t\_2}\\
            t_4 := t\_3 - g\\
            t_5 := \sqrt{h + g}\\
            \mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\
            \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + t\_0\\
            
            \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\
            \;\;\;\;\sqrt[3]{\frac{\left(t\_2 - g \cdot g\right) \cdot \frac{0.5}{a}}{g - t\_3}} + \sqrt[3]{t\_4} \cdot \sqrt[3]{\frac{0.5}{a}}\\
            
            \mathbf{elif}\;g \leq 1.05 \cdot 10^{-154}:\\
            \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + t\_0\\
            
            \mathbf{elif}\;g \leq 1.7 \cdot 10^{+153}:\\
            \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{-1}{a}}, \sqrt[3]{\frac{\mathsf{fma}\left(t\_1, t\_5, g\right)}{2}}, \sqrt[3]{t\_4 \cdot \frac{0.5}{a}}\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{\left(0 \cdot h\right) \cdot -0.5}}} + \frac{1}{\sqrt[3]{\frac{\left(-2\right) \cdot a}{\mathsf{fma}\left(t\_5, t\_1, g\right)}}}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 5 regimes
            2. if g < -1.31999999999999998e154

              1. Initial program 0.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.5

                  \[\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.5%

                \[\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.f6461.8

                  \[\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 rewrites61.8%

                \[\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-+.f6461.8

                  \[\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 rewrites61.8%

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

              if -1.31999999999999998e154 < g < -6.0000000000000003e-114

              1. Initial program 85.1%

                \[\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.f6497.7

                  \[\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--.f6497.7

                  \[\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 rewrites97.7%

                \[\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. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \sqrt[3]{\frac{\frac{1}{2}}{a}} \cdot \sqrt[3]{\sqrt{\left(g - h\right) \cdot \left(h + g\right)} - g} + \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 \sqrt[3]{\frac{\frac{1}{2}}{a}} \cdot \sqrt[3]{\sqrt{\left(g - h\right) \cdot \left(h + g\right)} - g} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \color{blue}{\left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)}} \]
                3. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -6.0000000000000003e-114 < g < 1.04999999999999992e-154

              1. Initial program 25.8%

                \[\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.f6416.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 rewrites16.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.f6479.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 rewrites79.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. Applied rewrites80.3%

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

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

                  if 1.04999999999999992e-154 < g < 1.6999999999999999e153

                  1. Initial program 86.9%

                    \[\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 rewrites86.9%

                    \[\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. Step-by-step derivation
                    1. lift-cbrt.f64N/A

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

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

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

                      \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}} + \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. cbrt-divN/A

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

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

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

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

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

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

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

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

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

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

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

                  if 1.6999999999999999e153 < g

                  1. Initial program 1.9%

                    \[\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 rewrites1.9%

                    \[\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. Step-by-step derivation
                    1. lift-cbrt.f64N/A

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

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

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

                      \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}} + \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. cbrt-divN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + \sqrt[3]{\frac{-g}{a}}\\ \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\ \;\;\;\;\sqrt[3]{\frac{\left(\left(h + g\right) \cdot \left(g - h\right) - g \cdot g\right) \cdot \frac{0.5}{a}}{g - \sqrt{\left(h + g\right) \cdot \left(g - h\right)}}} + \sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g} \cdot \sqrt[3]{\frac{0.5}{a}}\\ \mathbf{elif}\;g \leq 1.05 \cdot 10^{-154}:\\ \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + \sqrt[3]{\frac{-g}{a}}\\ \mathbf{elif}\;g \leq 1.7 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{-1}{a}}, \sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{g - h}, \sqrt{h + g}, g\right)}{2}}, \sqrt[3]{\left(\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g\right) \cdot \frac{0.5}{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{\left(0 \cdot h\right) \cdot -0.5}}} + \frac{1}{\sqrt[3]{\frac{\left(-2\right) \cdot a}{\mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}}}\\ \end{array} \]
                5. Add Preprocessing

                Alternative 6: 79.7% accurate, 0.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{\frac{-g}{a}}\\ t_1 := \sqrt{g - h}\\ t_2 := \sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g\\ t_3 := \sqrt{h + g}\\ \mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + t\_0\\ \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\ \;\;\;\;\frac{\sqrt[3]{t\_2}}{\sqrt[3]{a \cdot 2}} + \sqrt[3]{\frac{h \cdot h}{g} \cdot \frac{-0.25}{a}}\\ \mathbf{elif}\;g \leq 1.05 \cdot 10^{-154}:\\ \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + t\_0\\ \mathbf{elif}\;g \leq 1.7 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{-1}{a}}, \sqrt[3]{\frac{\mathsf{fma}\left(t\_1, t\_3, g\right)}{2}}, \sqrt[3]{t\_2 \cdot \frac{0.5}{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{\left(0 \cdot h\right) \cdot -0.5}}} + \frac{1}{\sqrt[3]{\frac{\left(-2\right) \cdot a}{\mathsf{fma}\left(t\_3, t\_1, g\right)}}}\\ \end{array} \end{array} \]
                (FPCore (g h a)
                 :precision binary64
                 (let* ((t_0 (cbrt (/ (- g) a)))
                        (t_1 (sqrt (- g h)))
                        (t_2 (- (sqrt (* (+ h g) (- g h))) g))
                        (t_3 (sqrt (+ h g))))
                   (if (<= g -1.32e+154)
                     (+ (cbrt (* (/ h a) (* -0.25 (/ h g)))) t_0)
                     (if (<= g -6e-114)
                       (+ (/ (cbrt t_2) (cbrt (* a 2.0))) (cbrt (* (/ (* h h) g) (/ -0.25 a))))
                       (if (<= g 1.05e-154)
                         (+ (* (cbrt (* (/ -0.25 a) (/ h g))) (cbrt h)) t_0)
                         (if (<= g 1.7e+153)
                           (fma
                            (cbrt (/ -1.0 a))
                            (cbrt (/ (fma t_1 t_3 g) 2.0))
                            (cbrt (* t_2 (/ 0.5 a))))
                           (+
                            (/ 1.0 (cbrt (/ (* -2.0 a) (* (* 0.0 h) -0.5))))
                            (/ 1.0 (cbrt (/ (* (- 2.0) a) (fma t_3 t_1 g)))))))))))
                double code(double g, double h, double a) {
                	double t_0 = cbrt((-g / a));
                	double t_1 = sqrt((g - h));
                	double t_2 = sqrt(((h + g) * (g - h))) - g;
                	double t_3 = sqrt((h + g));
                	double tmp;
                	if (g <= -1.32e+154) {
                		tmp = cbrt(((h / a) * (-0.25 * (h / g)))) + t_0;
                	} else if (g <= -6e-114) {
                		tmp = (cbrt(t_2) / cbrt((a * 2.0))) + cbrt((((h * h) / g) * (-0.25 / a)));
                	} else if (g <= 1.05e-154) {
                		tmp = (cbrt(((-0.25 / a) * (h / g))) * cbrt(h)) + t_0;
                	} else if (g <= 1.7e+153) {
                		tmp = fma(cbrt((-1.0 / a)), cbrt((fma(t_1, t_3, g) / 2.0)), cbrt((t_2 * (0.5 / a))));
                	} else {
                		tmp = (1.0 / cbrt(((-2.0 * a) / ((0.0 * h) * -0.5)))) + (1.0 / cbrt(((-2.0 * a) / fma(t_3, t_1, g))));
                	}
                	return tmp;
                }
                
                function code(g, h, a)
                	t_0 = cbrt(Float64(Float64(-g) / a))
                	t_1 = sqrt(Float64(g - h))
                	t_2 = Float64(sqrt(Float64(Float64(h + g) * Float64(g - h))) - g)
                	t_3 = sqrt(Float64(h + g))
                	tmp = 0.0
                	if (g <= -1.32e+154)
                		tmp = Float64(cbrt(Float64(Float64(h / a) * Float64(-0.25 * Float64(h / g)))) + t_0);
                	elseif (g <= -6e-114)
                		tmp = Float64(Float64(cbrt(t_2) / cbrt(Float64(a * 2.0))) + cbrt(Float64(Float64(Float64(h * h) / g) * Float64(-0.25 / a))));
                	elseif (g <= 1.05e-154)
                		tmp = Float64(Float64(cbrt(Float64(Float64(-0.25 / a) * Float64(h / g))) * cbrt(h)) + t_0);
                	elseif (g <= 1.7e+153)
                		tmp = fma(cbrt(Float64(-1.0 / a)), cbrt(Float64(fma(t_1, t_3, g) / 2.0)), cbrt(Float64(t_2 * Float64(0.5 / a))));
                	else
                		tmp = Float64(Float64(1.0 / cbrt(Float64(Float64(-2.0 * a) / Float64(Float64(0.0 * h) * -0.5)))) + Float64(1.0 / cbrt(Float64(Float64(Float64(-2.0) * a) / fma(t_3, t_1, g)))));
                	end
                	return tmp
                end
                
                code[g_, h_, a_] := Block[{t$95$0 = N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(g - h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(N[(h + g), $MachinePrecision] * N[(g - h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - g), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(h + g), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[g, -1.32e+154], N[(N[Power[N[(N[(h / a), $MachinePrecision] * N[(-0.25 * N[(h / g), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[g, -6e-114], N[(N[(N[Power[t$95$2, 1/3], $MachinePrecision] / N[Power[N[(a * 2.0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[Power[N[(N[(N[(h * h), $MachinePrecision] / g), $MachinePrecision] * N[(-0.25 / a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[g, 1.05e-154], N[(N[(N[Power[N[(N[(-0.25 / a), $MachinePrecision] * N[(h / g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[h, 1/3], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[g, 1.7e+153], N[(N[Power[N[(-1.0 / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(t$95$1 * t$95$3 + g), $MachinePrecision] / 2.0), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(t$95$2 * N[(0.5 / a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Power[N[(N[(-2.0 * a), $MachinePrecision] / N[(N[(0.0 * h), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[N[(N[((-2.0) * a), $MachinePrecision] / N[(t$95$3 * t$95$1 + g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \sqrt[3]{\frac{-g}{a}}\\
                t_1 := \sqrt{g - h}\\
                t_2 := \sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g\\
                t_3 := \sqrt{h + g}\\
                \mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\
                \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + t\_0\\
                
                \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\
                \;\;\;\;\frac{\sqrt[3]{t\_2}}{\sqrt[3]{a \cdot 2}} + \sqrt[3]{\frac{h \cdot h}{g} \cdot \frac{-0.25}{a}}\\
                
                \mathbf{elif}\;g \leq 1.05 \cdot 10^{-154}:\\
                \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + t\_0\\
                
                \mathbf{elif}\;g \leq 1.7 \cdot 10^{+153}:\\
                \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{-1}{a}}, \sqrt[3]{\frac{\mathsf{fma}\left(t\_1, t\_3, g\right)}{2}}, \sqrt[3]{t\_2 \cdot \frac{0.5}{a}}\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{\left(0 \cdot h\right) \cdot -0.5}}} + \frac{1}{\sqrt[3]{\frac{\left(-2\right) \cdot a}{\mathsf{fma}\left(t\_3, t\_1, g\right)}}}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 5 regimes
                2. if g < -1.31999999999999998e154

                  1. Initial program 0.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.5

                      \[\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.5%

                    \[\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.f6461.8

                      \[\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 rewrites61.8%

                    \[\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-+.f6461.8

                      \[\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 rewrites61.8%

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

                  if -1.31999999999999998e154 < g < -6.0000000000000003e-114

                  1. Initial program 85.1%

                    \[\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.f6416.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 rewrites16.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. 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{-g}{a}} \]
                    2. 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)}} + \sqrt[3]{\frac{-g}{a}} \]
                    3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -6.0000000000000003e-114 < g < 1.04999999999999992e-154

                  1. Initial program 25.8%

                    \[\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.f6416.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 rewrites16.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.f6479.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 rewrites79.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. Applied rewrites80.3%

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

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

                      if 1.04999999999999992e-154 < g < 1.6999999999999999e153

                      1. Initial program 86.9%

                        \[\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 rewrites86.9%

                        \[\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. Step-by-step derivation
                        1. lift-cbrt.f64N/A

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

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

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

                          \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}} + \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. cbrt-divN/A

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

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

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

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

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

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

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

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

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

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

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

                      if 1.6999999999999999e153 < g

                      1. Initial program 1.9%

                        \[\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 rewrites1.9%

                        \[\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. Step-by-step derivation
                        1. lift-cbrt.f64N/A

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

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

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

                          \[\leadsto \frac{1}{\sqrt[3]{\frac{-2 \cdot a}{g - \sqrt{\left(g - h\right) \cdot \left(h + g\right)}}}} + \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. cbrt-divN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + \sqrt[3]{\frac{-g}{a}}\\ \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\ \;\;\;\;\frac{\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}}{\sqrt[3]{a \cdot 2}} + \sqrt[3]{\frac{h \cdot h}{g} \cdot \frac{-0.25}{a}}\\ \mathbf{elif}\;g \leq 1.05 \cdot 10^{-154}:\\ \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + \sqrt[3]{\frac{-g}{a}}\\ \mathbf{elif}\;g \leq 1.7 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{-1}{a}}, \sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{g - h}, \sqrt{h + g}, g\right)}{2}}, \sqrt[3]{\left(\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g\right) \cdot \frac{0.5}{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt[3]{\frac{-2 \cdot a}{\left(0 \cdot h\right) \cdot -0.5}}} + \frac{1}{\sqrt[3]{\frac{\left(-2\right) \cdot a}{\mathsf{fma}\left(\sqrt{h + g}, \sqrt{g - h}, g\right)}}}\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 7: 77.3% accurate, 0.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{\frac{-g}{a}}\\ \mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + t\_0\\ \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\ \;\;\;\;\frac{\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}}{\sqrt[3]{a \cdot 2}} + \sqrt[3]{\frac{h \cdot h}{g} \cdot \frac{-0.25}{a}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + t\_0\\ \end{array} \end{array} \]
                    (FPCore (g h a)
                     :precision binary64
                     (let* ((t_0 (cbrt (/ (- g) a))))
                       (if (<= g -1.32e+154)
                         (+ (cbrt (* (/ h a) (* -0.25 (/ h g)))) t_0)
                         (if (<= g -6e-114)
                           (+
                            (/ (cbrt (- (sqrt (* (+ h g) (- g h))) g)) (cbrt (* a 2.0)))
                            (cbrt (* (/ (* h h) g) (/ -0.25 a))))
                           (+ (* (cbrt (* (/ -0.25 a) (/ h g))) (cbrt h)) t_0)))))
                    double code(double g, double h, double a) {
                    	double t_0 = cbrt((-g / a));
                    	double tmp;
                    	if (g <= -1.32e+154) {
                    		tmp = cbrt(((h / a) * (-0.25 * (h / g)))) + t_0;
                    	} else if (g <= -6e-114) {
                    		tmp = (cbrt((sqrt(((h + g) * (g - h))) - g)) / cbrt((a * 2.0))) + cbrt((((h * h) / g) * (-0.25 / a)));
                    	} else {
                    		tmp = (cbrt(((-0.25 / a) * (h / g))) * cbrt(h)) + t_0;
                    	}
                    	return tmp;
                    }
                    
                    public static double code(double g, double h, double a) {
                    	double t_0 = Math.cbrt((-g / a));
                    	double tmp;
                    	if (g <= -1.32e+154) {
                    		tmp = Math.cbrt(((h / a) * (-0.25 * (h / g)))) + t_0;
                    	} else if (g <= -6e-114) {
                    		tmp = (Math.cbrt((Math.sqrt(((h + g) * (g - h))) - g)) / Math.cbrt((a * 2.0))) + Math.cbrt((((h * h) / g) * (-0.25 / a)));
                    	} else {
                    		tmp = (Math.cbrt(((-0.25 / a) * (h / g))) * Math.cbrt(h)) + t_0;
                    	}
                    	return tmp;
                    }
                    
                    function code(g, h, a)
                    	t_0 = cbrt(Float64(Float64(-g) / a))
                    	tmp = 0.0
                    	if (g <= -1.32e+154)
                    		tmp = Float64(cbrt(Float64(Float64(h / a) * Float64(-0.25 * Float64(h / g)))) + t_0);
                    	elseif (g <= -6e-114)
                    		tmp = Float64(Float64(cbrt(Float64(sqrt(Float64(Float64(h + g) * Float64(g - h))) - g)) / cbrt(Float64(a * 2.0))) + cbrt(Float64(Float64(Float64(h * h) / g) * Float64(-0.25 / a))));
                    	else
                    		tmp = Float64(Float64(cbrt(Float64(Float64(-0.25 / a) * Float64(h / g))) * cbrt(h)) + 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, -1.32e+154], N[(N[Power[N[(N[(h / a), $MachinePrecision] * N[(-0.25 * N[(h / g), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[g, -6e-114], N[(N[(N[Power[N[(N[Sqrt[N[(N[(h + g), $MachinePrecision] * N[(g - h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - g), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[N[(a * 2.0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[Power[N[(N[(N[(h * h), $MachinePrecision] / g), $MachinePrecision] * N[(-0.25 / a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(N[(-0.25 / a), $MachinePrecision] * N[(h / g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[h, 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 -1.32 \cdot 10^{+154}:\\
                    \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + t\_0\\
                    
                    \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\
                    \;\;\;\;\frac{\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}}{\sqrt[3]{a \cdot 2}} + \sqrt[3]{\frac{h \cdot h}{g} \cdot \frac{-0.25}{a}}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + t\_0\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if g < -1.31999999999999998e154

                      1. Initial program 0.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.5

                          \[\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.5%

                        \[\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.f6461.8

                          \[\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 rewrites61.8%

                        \[\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-+.f6461.8

                          \[\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 rewrites61.8%

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

                      if -1.31999999999999998e154 < g < -6.0000000000000003e-114

                      1. Initial program 85.1%

                        \[\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.f6416.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 rewrites16.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. 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{-g}{a}} \]
                        2. 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)}} + \sqrt[3]{\frac{-g}{a}} \]
                        3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -6.0000000000000003e-114 < g

                      1. Initial program 45.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.f6444.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 rewrites44.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.f6476.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 rewrites76.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 rewrites76.4%

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

                            \[\leadsto \sqrt[3]{h} \cdot \color{blue}{\sqrt[3]{\frac{h}{g} \cdot \frac{-0.25}{a}}} + \sqrt[3]{\frac{-g}{a}} \]
                        3. Recombined 3 regimes into one program.
                        4. Final simplification79.2%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;g \leq -1.32 \cdot 10^{+154}:\\ \;\;\;\;\sqrt[3]{\frac{h}{a} \cdot \left(-0.25 \cdot \frac{h}{g}\right)} + \sqrt[3]{\frac{-g}{a}}\\ \mathbf{elif}\;g \leq -6 \cdot 10^{-114}:\\ \;\;\;\;\frac{\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}}{\sqrt[3]{a \cdot 2}} + \sqrt[3]{\frac{h \cdot h}{g} \cdot \frac{-0.25}{a}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\frac{-0.25}{a} \cdot \frac{h}{g}} \cdot \sqrt[3]{h} + \sqrt[3]{\frac{-g}{a}}\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 8: 74.7% accurate, 0.9× speedup?

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

                          \[\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.f6429.5

                            \[\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 rewrites29.5%

                          \[\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.f6475.8

                            \[\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 rewrites75.8%

                          \[\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 rewrites75.9%

                            \[\leadsto \sqrt[3]{\frac{h}{g} \cdot h} \cdot \color{blue}{\sqrt[3]{\frac{-0.25}{a}}} + \sqrt[3]{\frac{-g}{a}} \]
                          2. Final simplification75.9%

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

                          Alternative 9: 74.7% accurate, 0.9× speedup?

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

                            \[\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.f6429.5

                              \[\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 rewrites29.5%

                            \[\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.f6475.8

                              \[\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 rewrites75.8%

                            \[\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 rewrites75.9%

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

                                \[\leadsto \sqrt[3]{h} \cdot \color{blue}{\sqrt[3]{\frac{h}{g} \cdot \frac{-0.25}{a}}} + \sqrt[3]{\frac{-g}{a}} \]
                              2. Final simplification75.9%

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

                              Alternative 10: 74.6% accurate, 1.2× speedup?

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

                                \[\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.f6429.5

                                  \[\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 rewrites29.5%

                                \[\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.f6475.8

                                  \[\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 rewrites75.8%

                                \[\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-+.f6475.8

                                  \[\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 rewrites75.8%

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

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

                              Alternative 11: 15.2% accurate, 1.2× speedup?

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

                                \[\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.f6429.5

                                  \[\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 rewrites29.5%

                                \[\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 \left(\left(-g\right) + \color{blue}{-1 \cdot g}\right)} + \sqrt[3]{\frac{-g}{a}} \]
                              7. Step-by-step derivation
                                1. mul-1-negN/A

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

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

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

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

                              Alternative 12: 3.0% 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 47.2%

                                \[\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.f6450.7

                                  \[\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--.f6450.7

                                  \[\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 rewrites50.7%

                                \[\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 2024325 
                                (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))))))))