Average Error: 36.0 → 8.3
Time: 18.9s
Precision: binary64
Cost: 34124
\[\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)} \]
\[\begin{array}{l} t_0 := \sqrt{g \cdot g - h \cdot h}\\ \mathbf{if}\;g \leq 10^{-234}:\\ \;\;\;\;\sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{\mathsf{hypot}\left(g, h\right) - g} + \sqrt[3]{\left(g - g\right) \cdot \frac{-0.5}{a}}\\ \mathbf{elif}\;g \leq 10^{-147}:\\ \;\;\;\;\sqrt[3]{\frac{0.5}{a} \cdot \left(g - g\right)} + \frac{\sqrt[3]{-0.5 \cdot \left(g + \mathsf{hypot}\left(g, \sqrt{h \cdot \left(-h\right)}\right)\right)}}{\sqrt[3]{a}}\\ \mathbf{elif}\;g \leq 2.15 \cdot 10^{+146}:\\ \;\;\;\;\sqrt[3]{\frac{0.5}{a} \cdot \left(t_0 - g\right)} + \sqrt[3]{\frac{-0.5}{a}} \cdot \sqrt[3]{g + t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{0} + \sqrt[3]{\frac{-g}{a}}\\ \end{array} \]
(FPCore (g h a)
 :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))))))))
(FPCore (g h a)
 :precision binary64
 (let* ((t_0 (sqrt (- (* g g) (* h h)))))
   (if (<= g 1e-234)
     (+
      (* (cbrt (/ 0.5 a)) (cbrt (- (hypot g h) g)))
      (cbrt (* (- g g) (/ -0.5 a))))
     (if (<= g 1e-147)
       (+
        (cbrt (* (/ 0.5 a) (- g g)))
        (/ (cbrt (* -0.5 (+ g (hypot g (sqrt (* h (- h))))))) (cbrt a)))
       (if (<= g 2.15e+146)
         (+
          (cbrt (* (/ 0.5 a) (- t_0 g)))
          (* (cbrt (/ -0.5 a)) (cbrt (+ g t_0))))
         (+ (cbrt 0.0) (cbrt (/ (- g) a))))))))
double code(double g, double h, double a) {
	return cbrt(((1.0 / (2.0 * a)) * (-g + sqrt(((g * g) - (h * h)))))) + cbrt(((1.0 / (2.0 * a)) * (-g - sqrt(((g * g) - (h * h))))));
}
double code(double g, double h, double a) {
	double t_0 = sqrt(((g * g) - (h * h)));
	double tmp;
	if (g <= 1e-234) {
		tmp = (cbrt((0.5 / a)) * cbrt((hypot(g, h) - g))) + cbrt(((g - g) * (-0.5 / a)));
	} else if (g <= 1e-147) {
		tmp = cbrt(((0.5 / a) * (g - g))) + (cbrt((-0.5 * (g + hypot(g, sqrt((h * -h)))))) / cbrt(a));
	} else if (g <= 2.15e+146) {
		tmp = cbrt(((0.5 / a) * (t_0 - g))) + (cbrt((-0.5 / a)) * cbrt((g + t_0)));
	} else {
		tmp = cbrt(0.0) + cbrt((-g / a));
	}
	return tmp;
}
public static double code(double g, double h, double a) {
	return Math.cbrt(((1.0 / (2.0 * a)) * (-g + Math.sqrt(((g * g) - (h * h)))))) + Math.cbrt(((1.0 / (2.0 * a)) * (-g - Math.sqrt(((g * g) - (h * h))))));
}
public static double code(double g, double h, double a) {
	double t_0 = Math.sqrt(((g * g) - (h * h)));
	double tmp;
	if (g <= 1e-234) {
		tmp = (Math.cbrt((0.5 / a)) * Math.cbrt((Math.hypot(g, h) - g))) + Math.cbrt(((g - g) * (-0.5 / a)));
	} else if (g <= 1e-147) {
		tmp = Math.cbrt(((0.5 / a) * (g - g))) + (Math.cbrt((-0.5 * (g + Math.hypot(g, Math.sqrt((h * -h)))))) / Math.cbrt(a));
	} else if (g <= 2.15e+146) {
		tmp = Math.cbrt(((0.5 / a) * (t_0 - g))) + (Math.cbrt((-0.5 / a)) * Math.cbrt((g + t_0)));
	} else {
		tmp = Math.cbrt(0.0) + Math.cbrt((-g / a));
	}
	return tmp;
}
function code(g, h, a)
	return Float64(cbrt(Float64(Float64(1.0 / Float64(2.0 * a)) * Float64(Float64(-g) + sqrt(Float64(Float64(g * g) - Float64(h * h)))))) + cbrt(Float64(Float64(1.0 / Float64(2.0 * a)) * Float64(Float64(-g) - sqrt(Float64(Float64(g * g) - Float64(h * h)))))))
end
function code(g, h, a)
	t_0 = sqrt(Float64(Float64(g * g) - Float64(h * h)))
	tmp = 0.0
	if (g <= 1e-234)
		tmp = Float64(Float64(cbrt(Float64(0.5 / a)) * cbrt(Float64(hypot(g, h) - g))) + cbrt(Float64(Float64(g - g) * Float64(-0.5 / a))));
	elseif (g <= 1e-147)
		tmp = Float64(cbrt(Float64(Float64(0.5 / a) * Float64(g - g))) + Float64(cbrt(Float64(-0.5 * Float64(g + hypot(g, sqrt(Float64(h * Float64(-h))))))) / cbrt(a)));
	elseif (g <= 2.15e+146)
		tmp = Float64(cbrt(Float64(Float64(0.5 / a) * Float64(t_0 - g))) + Float64(cbrt(Float64(-0.5 / a)) * cbrt(Float64(g + t_0))));
	else
		tmp = Float64(cbrt(0.0) + cbrt(Float64(Float64(-g) / a)));
	end
	return tmp
end
code[g_, h_, a_] := N[(N[Power[N[(N[(1.0 / N[(2.0 * a), $MachinePrecision]), $MachinePrecision] * N[((-g) + N[Sqrt[N[(N[(g * g), $MachinePrecision] - N[(h * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(N[(1.0 / N[(2.0 * a), $MachinePrecision]), $MachinePrecision] * N[((-g) - N[Sqrt[N[(N[(g * g), $MachinePrecision] - N[(h * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]
code[g_, h_, a_] := Block[{t$95$0 = N[Sqrt[N[(N[(g * g), $MachinePrecision] - N[(h * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[g, 1e-234], N[(N[(N[Power[N[(0.5 / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[Sqrt[g ^ 2 + h ^ 2], $MachinePrecision] - g), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[Power[N[(N[(g - g), $MachinePrecision] * N[(-0.5 / a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[g, 1e-147], N[(N[Power[N[(N[(0.5 / a), $MachinePrecision] * N[(g - g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[(N[Power[N[(-0.5 * N[(g + N[Sqrt[g ^ 2 + N[Sqrt[N[(h * (-h)), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[a, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[g, 2.15e+146], N[(N[Power[N[(N[(0.5 / a), $MachinePrecision] * N[(t$95$0 - g), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[(N[Power[N[(-0.5 / a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(g + t$95$0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[0.0, 1/3], $MachinePrecision] + N[Power[N[((-g) / a), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]]]
\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)}
\begin{array}{l}
t_0 := \sqrt{g \cdot g - h \cdot h}\\
\mathbf{if}\;g \leq 10^{-234}:\\
\;\;\;\;\sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{\mathsf{hypot}\left(g, h\right) - g} + \sqrt[3]{\left(g - g\right) \cdot \frac{-0.5}{a}}\\

\mathbf{elif}\;g \leq 10^{-147}:\\
\;\;\;\;\sqrt[3]{\frac{0.5}{a} \cdot \left(g - g\right)} + \frac{\sqrt[3]{-0.5 \cdot \left(g + \mathsf{hypot}\left(g, \sqrt{h \cdot \left(-h\right)}\right)\right)}}{\sqrt[3]{a}}\\

\mathbf{elif}\;g \leq 2.15 \cdot 10^{+146}:\\
\;\;\;\;\sqrt[3]{\frac{0.5}{a} \cdot \left(t_0 - g\right)} + \sqrt[3]{\frac{-0.5}{a}} \cdot \sqrt[3]{g + t_0}\\

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{0} + \sqrt[3]{\frac{-g}{a}}\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if g < 9.9999999999999996e-235

    1. Initial program 36.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. Simplified36.1

      \[\leadsto \color{blue}{\sqrt[3]{\frac{0.5}{a} \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{-0.5}{a}}} \]
      Proof
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1/2 a) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 (Rewrite<= metadata-eval (/.f64 1 2)) a) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 2 a))) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= unsub-neg_binary64 (+.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) (neg.f64 g))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= +-commutative_binary64 (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 (Rewrite<= metadata-eval (*.f64 1/2 -1)) a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 (*.f64 (Rewrite<= metadata-eval (/.f64 1 2)) -1) a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (/.f64 1 2) a) -1))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 2 a))) -1)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (Rewrite=> *-commutative_binary64 (*.f64 (*.f64 (/.f64 1 (*.f64 2 a)) -1) (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (Rewrite<= associate-*r*_binary64 (*.f64 (/.f64 1 (*.f64 2 a)) (*.f64 -1 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= neg-mul-1_binary64 (neg.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= distribute-neg-out_binary64 (+.f64 (neg.f64 g) (neg.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= sub-neg_binary64 (-.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr48.2

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

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

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

      \[\leadsto \sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{\mathsf{hypot}\left(g, h\right) - g} + \sqrt[3]{\left(g + \color{blue}{\left(-g\right)}\right) \cdot \frac{-0.5}{a}} \]
      Proof
      (neg.f64 g): 0 points increase in error, 0 points decrease in error
      (Rewrite<= mul-1-neg_binary64 (*.f64 -1 g)): 0 points increase in error, 0 points decrease in error

    if 9.9999999999999996e-235 < g < 9.9999999999999997e-148

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

      \[\leadsto \color{blue}{\sqrt[3]{\frac{0.5}{a} \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{-0.5}{a}}} \]
      Proof
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1/2 a) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 (Rewrite<= metadata-eval (/.f64 1 2)) a) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 2 a))) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= unsub-neg_binary64 (+.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) (neg.f64 g))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= +-commutative_binary64 (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 (Rewrite<= metadata-eval (*.f64 1/2 -1)) a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 (*.f64 (Rewrite<= metadata-eval (/.f64 1 2)) -1) a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (/.f64 1 2) a) -1))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 2 a))) -1)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (Rewrite=> *-commutative_binary64 (*.f64 (*.f64 (/.f64 1 (*.f64 2 a)) -1) (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (Rewrite<= associate-*r*_binary64 (*.f64 (/.f64 1 (*.f64 2 a)) (*.f64 -1 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= neg-mul-1_binary64 (neg.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= distribute-neg-out_binary64 (+.f64 (neg.f64 g) (neg.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= sub-neg_binary64 (-.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in g around inf 47.7

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

      \[\leadsto \sqrt[3]{\frac{0.5}{a} \cdot \left(g - g\right)} + \sqrt[3]{\left(g + \color{blue}{{\left({\left(g \cdot g - h \cdot h\right)}^{1.5}\right)}^{0.3333333333333333}}\right) \cdot \frac{-0.5}{a}} \]
    5. Applied egg-rr7.2

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

    if 9.9999999999999997e-148 < g < 2.1499999999999999e146

    1. Initial program 9.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. Simplified9.2

      \[\leadsto \color{blue}{\sqrt[3]{\frac{0.5}{a} \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{-0.5}{a}}} \]
      Proof
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1/2 a) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 (Rewrite<= metadata-eval (/.f64 1 2)) a) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 2 a))) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= unsub-neg_binary64 (+.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) (neg.f64 g))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= +-commutative_binary64 (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 (Rewrite<= metadata-eval (*.f64 1/2 -1)) a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 (*.f64 (Rewrite<= metadata-eval (/.f64 1 2)) -1) a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (/.f64 1 2) a) -1))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 2 a))) -1)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (Rewrite=> *-commutative_binary64 (*.f64 (*.f64 (/.f64 1 (*.f64 2 a)) -1) (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (Rewrite<= associate-*r*_binary64 (*.f64 (/.f64 1 (*.f64 2 a)) (*.f64 -1 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= neg-mul-1_binary64 (neg.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= distribute-neg-out_binary64 (+.f64 (neg.f64 g) (neg.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= sub-neg_binary64 (-.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr9.2

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

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

    if 2.1499999999999999e146 < g

    1. Initial program 62.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. Simplified62.4

      \[\leadsto \color{blue}{\sqrt[3]{\frac{0.5}{a} \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{-0.5}{a}}} \]
      Proof
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1/2 a) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 (Rewrite<= metadata-eval (/.f64 1 2)) a) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 2 a))) (-.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) g))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= unsub-neg_binary64 (+.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))) (neg.f64 g))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= +-commutative_binary64 (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 -1/2 a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 (Rewrite<= metadata-eval (*.f64 1/2 -1)) a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (/.f64 (*.f64 (Rewrite<= metadata-eval (/.f64 1 2)) -1) a)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (/.f64 1 2) a) -1))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))) (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 2 a))) -1)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (Rewrite=> *-commutative_binary64 (*.f64 (*.f64 (/.f64 1 (*.f64 2 a)) -1) (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (Rewrite<= associate-*r*_binary64 (*.f64 (/.f64 1 (*.f64 2 a)) (*.f64 -1 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= neg-mul-1_binary64 (neg.f64 (+.f64 g (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= distribute-neg-out_binary64 (+.f64 (neg.f64 g) (neg.f64 (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h))))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (+.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))) (cbrt.f64 (*.f64 (/.f64 1 (*.f64 2 a)) (Rewrite<= sub-neg_binary64 (-.f64 (neg.f64 g) (sqrt.f64 (-.f64 (*.f64 g g) (*.f64 h h)))))))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in g around inf 62.4

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

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

      \[\leadsto \sqrt[3]{\color{blue}{0}} + \sqrt[3]{\left(g + g\right) \cdot \frac{-0.5}{a}} \]
    6. Taylor expanded in g around 0 25.4

      \[\leadsto \sqrt[3]{0} + \sqrt[3]{\color{blue}{-1 \cdot \frac{g}{a}}} \]
    7. Simplified25.4

      \[\leadsto \sqrt[3]{0} + \sqrt[3]{\color{blue}{\frac{-g}{a}}} \]
      Proof
      (/.f64 (neg.f64 g) a): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 g)) a): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 -1 (/.f64 g a))): 0 points increase in error, 0 points decrease in error
  3. Recombined 4 regimes into one program.
  4. Final simplification8.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;g \leq 10^{-234}:\\ \;\;\;\;\sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{\mathsf{hypot}\left(g, h\right) - g} + \sqrt[3]{\left(g - g\right) \cdot \frac{-0.5}{a}}\\ \mathbf{elif}\;g \leq 10^{-147}:\\ \;\;\;\;\sqrt[3]{\frac{0.5}{a} \cdot \left(g - g\right)} + \frac{\sqrt[3]{-0.5 \cdot \left(g + \mathsf{hypot}\left(g, \sqrt{h \cdot \left(-h\right)}\right)\right)}}{\sqrt[3]{a}}\\ \mathbf{elif}\;g \leq 2.15 \cdot 10^{+146}:\\ \;\;\;\;\sqrt[3]{\frac{0.5}{a} \cdot \left(\sqrt{g \cdot g - h \cdot h} - g\right)} + \sqrt[3]{\frac{-0.5}{a}} \cdot \sqrt[3]{g + \sqrt{g \cdot g - h \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{0} + \sqrt[3]{\frac{-g}{a}}\\ \end{array} \]

Alternatives

Alternative 1
Error10.6
Cost26756
\[\begin{array}{l} \mathbf{if}\;g \leq -1.8 \cdot 10^{-207}:\\ \;\;\;\;\sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{\mathsf{hypot}\left(g, h\right) - g} + \sqrt[3]{\left(g - g\right) \cdot \frac{-0.5}{a}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{0} + \sqrt[3]{\frac{-0.5}{a} \cdot \left(g + g\right)}\\ \end{array} \]
Alternative 2
Error12.0
Cost20228
\[\begin{array}{l} \mathbf{if}\;g \leq -2.8 \cdot 10^{+106}:\\ \;\;\;\;\sqrt[3]{\frac{0.5}{a}} \cdot \sqrt[3]{\mathsf{hypot}\left(g, h\right) - g} + \frac{1}{g + g}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{0} + \sqrt[3]{\frac{-0.5}{a} \cdot \left(g + g\right)}\\ \end{array} \]
Alternative 3
Error17.5
Cost13376
\[\sqrt[3]{0} + \sqrt[3]{\frac{-0.5}{a} \cdot \left(g + g\right)} \]
Alternative 4
Error17.5
Cost13184
\[\sqrt[3]{0} + \sqrt[3]{\frac{-g}{a}} \]
Alternative 5
Error59.9
Cost7240
\[\begin{array}{l} \mathbf{if}\;a \leq -3.4036613461819185 \cdot 10^{-306}:\\ \;\;\;\;\sqrt[3]{0} + \left(g + g\right)\\ \mathbf{elif}\;a \leq 2.8837874914240136 \cdot 10^{+78}:\\ \;\;\;\;\sqrt[3]{0} + -0.5 \cdot \left(g + g\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{0} + \frac{-0.5}{a} \cdot \left(g + g\right)\\ \end{array} \]
Alternative 6
Error60.0
Cost6980
\[\begin{array}{l} \mathbf{if}\;a \leq -3.4036613461819185 \cdot 10^{-306}:\\ \;\;\;\;\sqrt[3]{0} + \left(g + g\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{0} + -0.5 \cdot \left(g + g\right)\\ \end{array} \]
Alternative 7
Error61.6
Cost6720
\[\sqrt[3]{0} + \left(g + g\right) \]

Error

Reproduce

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