2-ancestry mixing, positive discriminant

Percentage Accurate: 43.9% → 95.9%
Time: 11.5s
Alternatives: 4
Speedup: 1.4×

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

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

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

Alternative 1: 95.9% accurate, 0.7× speedup?

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

\\
\sqrt[3]{\frac{0.5}{a}} \cdot \left(\sqrt[3]{g} \cdot \left(\sqrt[3]{-1} \cdot {4}^{0.16666666666666666}\right)\right)
\end{array}
Derivation
  1. Initial program 46.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt[3]{\frac{0.5}{a}} \cdot \left(\sqrt[3]{g} \cdot \left(\sqrt[3]{-1} \cdot {4}^{\color{blue}{0.16666666666666666}}\right)\right) \]
    2. Add Preprocessing

    Alternative 2: 80.8% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{\left(2 \cdot a\right)}^{-1} \leq 2 \cdot 10^{+76}:\\ \;\;\;\;\sqrt[3]{\frac{g}{a}} \cdot \sqrt[3]{-1}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot a\right)}^{-0.3333333333333333} \cdot \sqrt[3]{g \cdot -2}\\ \end{array} \end{array} \]
    (FPCore (g h a)
     :precision binary64
     (if (<= (pow (* 2.0 a) -1.0) 2e+76)
       (* (cbrt (/ g a)) (cbrt -1.0))
       (* (pow (* 2.0 a) -0.3333333333333333) (cbrt (* g -2.0)))))
    double code(double g, double h, double a) {
    	double tmp;
    	if (pow((2.0 * a), -1.0) <= 2e+76) {
    		tmp = cbrt((g / a)) * cbrt(-1.0);
    	} else {
    		tmp = pow((2.0 * a), -0.3333333333333333) * cbrt((g * -2.0));
    	}
    	return tmp;
    }
    
    public static double code(double g, double h, double a) {
    	double tmp;
    	if (Math.pow((2.0 * a), -1.0) <= 2e+76) {
    		tmp = Math.cbrt((g / a)) * Math.cbrt(-1.0);
    	} else {
    		tmp = Math.pow((2.0 * a), -0.3333333333333333) * Math.cbrt((g * -2.0));
    	}
    	return tmp;
    }
    
    function code(g, h, a)
    	tmp = 0.0
    	if ((Float64(2.0 * a) ^ -1.0) <= 2e+76)
    		tmp = Float64(cbrt(Float64(g / a)) * cbrt(-1.0));
    	else
    		tmp = Float64((Float64(2.0 * a) ^ -0.3333333333333333) * cbrt(Float64(g * -2.0)));
    	end
    	return tmp
    end
    
    code[g_, h_, a_] := If[LessEqual[N[Power[N[(2.0 * a), $MachinePrecision], -1.0], $MachinePrecision], 2e+76], N[(N[Power[N[(g / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[-1.0, 1/3], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(2.0 * a), $MachinePrecision], -0.3333333333333333], $MachinePrecision] * N[Power[N[(g * -2.0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;{\left(2 \cdot a\right)}^{-1} \leq 2 \cdot 10^{+76}:\\
    \;\;\;\;\sqrt[3]{\frac{g}{a}} \cdot \sqrt[3]{-1}\\
    
    \mathbf{else}:\\
    \;\;\;\;{\left(2 \cdot a\right)}^{-0.3333333333333333} \cdot \sqrt[3]{g \cdot -2}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a)) < 2.0000000000000001e76

      1. Initial program 51.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. 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. sqr-powN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sqrt[3]{\color{blue}{\frac{g}{a}}} \cdot \sqrt[3]{-1} \]
        4. lower-cbrt.f6486.9

          \[\leadsto \sqrt[3]{\frac{g}{a}} \cdot \color{blue}{\sqrt[3]{-1}} \]
      9. Applied rewrites86.9%

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

      if 2.0000000000000001e76 < (/.f64 #s(literal 1 binary64) (*.f64 #s(literal 2 binary64) a))

      1. Initial program 24.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 95.8% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 73.2% accurate, 1.4× speedup?

        \[\begin{array}{l} \\ \sqrt[3]{\frac{g}{a}} \cdot \sqrt[3]{-1} \end{array} \]
        (FPCore (g h a) :precision binary64 (* (cbrt (/ g a)) (cbrt -1.0)))
        double code(double g, double h, double a) {
        	return cbrt((g / a)) * cbrt(-1.0);
        }
        
        public static double code(double g, double h, double a) {
        	return Math.cbrt((g / a)) * Math.cbrt(-1.0);
        }
        
        function code(g, h, a)
        	return Float64(cbrt(Float64(g / a)) * cbrt(-1.0))
        end
        
        code[g_, h_, a_] := N[(N[Power[N[(g / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[-1.0, 1/3], $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \sqrt[3]{\frac{g}{a}} \cdot \sqrt[3]{-1}
        \end{array}
        
        Derivation
        1. Initial program 46.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. sqr-powN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Reproduce

        ?
        herbie shell --seed 2024339 
        (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))))))))