2-ancestry mixing, zero discriminant

Percentage Accurate: 75.6% → 98.7%
Time: 2.4s
Alternatives: 8
Speedup: 1.0×

Specification

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

\\
\sqrt[3]{\frac{g}{2 \cdot a}}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 8 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: 75.6% accurate, 1.0× speedup?

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

\\
\sqrt[3]{\frac{g}{2 \cdot a}}
\end{array}

Alternative 1: 98.7% accurate, 0.4× speedup?

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

\\
\frac{\frac{\sqrt[3]{g}}{{2}^{0.3333333333333333}}}{\sqrt[3]{a}}
\end{array}
Derivation
  1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{\sqrt[3]{a}}} \]
  4. Applied rewrites98.7%

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{\sqrt[3]{2}}}}{\sqrt[3]{a}} \]
  6. Applied rewrites98.1%

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

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

      \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{{2}^{\frac{1}{3}}}}}{\sqrt[3]{a}} \]
    3. lower-pow.f6498.7

      \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{{2}^{0.3333333333333333}}}}{\sqrt[3]{a}} \]
  8. Applied rewrites98.7%

    \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{{2}^{0.3333333333333333}}}}{\sqrt[3]{a}} \]
  9. Add Preprocessing

Alternative 2: 83.6% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{g}}{{\left(a + a\right)}^{0.3333333333333333}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.5e-304

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{\sqrt[3]{a}}} \]
    4. Applied rewrites98.8%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{\sqrt[3]{2}}}}{\sqrt[3]{a}} \]
    6. Applied rewrites98.1%

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

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

        \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{{2}^{\frac{1}{3}}}}}{\sqrt[3]{a}} \]
      3. lower-pow.f6498.8

        \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{{2}^{0.3333333333333333}}}}{\sqrt[3]{a}} \]
    8. Applied rewrites98.8%

      \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{{2}^{0.3333333333333333}}}}{\sqrt[3]{a}} \]
    9. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5e-304 < a

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt[3]{g}}{\sqrt[3]{\color{blue}{a \cdot 2}}} \]
      9. lower-*.f6498.6

        \[\leadsto \frac{\sqrt[3]{g}}{\sqrt[3]{\color{blue}{a \cdot 2}}} \]
    4. Applied rewrites98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt[3]{g}}{{\color{blue}{\left(a + a\right)}}^{\frac{1}{3}}} \]
      4. lower-+.f6492.1

        \[\leadsto \frac{\sqrt[3]{g}}{{\color{blue}{\left(a + a\right)}}^{0.3333333333333333}} \]
    8. Applied rewrites92.1%

      \[\leadsto \frac{\sqrt[3]{g}}{{\color{blue}{\left(a + a\right)}}^{0.3333333333333333}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 83.7% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{g}}{{\left(a + a\right)}^{0.3333333333333333}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.5e-304

    1. Initial program 79.8%

      \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
    2. Add Preprocessing
    3. Taylor expanded in g around 0

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

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

        \[\leadsto \sqrt[3]{0.5 \cdot \frac{g}{\color{blue}{a}}} \]
    5. Applied rewrites80.6%

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

    if 3.5e-304 < a

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt[3]{g}}{\sqrt[3]{\color{blue}{a \cdot 2}}} \]
      9. lower-*.f6498.6

        \[\leadsto \frac{\sqrt[3]{g}}{\sqrt[3]{\color{blue}{a \cdot 2}}} \]
    4. Applied rewrites98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt[3]{g}}{{\color{blue}{\left(a + a\right)}}^{\frac{1}{3}}} \]
      4. lower-+.f6492.1

        \[\leadsto \frac{\sqrt[3]{g}}{{\color{blue}{\left(a + a\right)}}^{0.3333333333333333}} \]
    8. Applied rewrites92.1%

      \[\leadsto \frac{\sqrt[3]{g}}{{\color{blue}{\left(a + a\right)}}^{0.3333333333333333}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 98.7% accurate, 0.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{\sqrt[3]{a}}} \]
  4. Applied rewrites98.7%

    \[\leadsto \color{blue}{\frac{\sqrt[3]{\frac{g}{2}}}{\sqrt[3]{a}}} \]
  5. Taylor expanded in g around 0

    \[\leadsto \frac{\sqrt[3]{\color{blue}{\frac{1}{2} \cdot g}}}{\sqrt[3]{a}} \]
  6. Step-by-step derivation
    1. lower-*.f6498.7

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

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

Alternative 5: 98.6% accurate, 0.5× speedup?

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt[3]{g}}{\sqrt[3]{\color{blue}{a \cdot 2}}} \]
    9. lower-*.f6498.4

      \[\leadsto \frac{\sqrt[3]{g}}{\sqrt[3]{\color{blue}{a \cdot 2}}} \]
  4. Applied rewrites98.4%

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

Alternative 6: 75.6% accurate, 1.0× speedup?

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

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

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Add Preprocessing
  3. Taylor expanded in g around 0

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

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

      \[\leadsto \sqrt[3]{0.5 \cdot \frac{g}{\color{blue}{a}}} \]
  5. Applied rewrites79.7%

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

Alternative 7: 75.6% accurate, 1.0× speedup?

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

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

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

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

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{a + a}}} \]
    3. lower-+.f6479.3

      \[\leadsto \sqrt[3]{\frac{g}{\color{blue}{a + a}}} \]
  4. Applied rewrites79.3%

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

Alternative 8: 4.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt[3]{\frac{g}{2}}}{\color{blue}{\sqrt[3]{a}}} \]
  4. Applied rewrites98.7%

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{\sqrt[3]{2}}}}{\sqrt[3]{a}} \]
  6. Applied rewrites98.1%

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

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

      \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{{2}^{\frac{1}{3}}}}}{\sqrt[3]{a}} \]
    3. lower-pow.f6498.7

      \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{{2}^{0.3333333333333333}}}}{\sqrt[3]{a}} \]
  8. Applied rewrites98.7%

    \[\leadsto \frac{\frac{\sqrt[3]{g}}{\color{blue}{{2}^{0.3333333333333333}}}}{\sqrt[3]{a}} \]
  9. Taylor expanded in g around -inf

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

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

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

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

      \[\leadsto -\sqrt[3]{\frac{g}{a}} \cdot \frac{\sqrt[3]{-1}}{\sqrt[3]{2}} \]
    5. cbrt-undivN/A

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

      \[\leadsto -\sqrt[3]{\frac{g}{a}} \cdot \sqrt[3]{\frac{-1}{2}} \]
    7. cbrt-unprodN/A

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

      \[\leadsto -\sqrt[3]{\frac{g}{a} \cdot \frac{-1}{2}} \]
    9. frac-timesN/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{a \cdot 2}} \]
    10. *-commutativeN/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{2 \cdot a}} \]
    11. count-2-revN/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{a + a}} \]
    12. flip-+N/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{\frac{a \cdot a - a \cdot a}{a - a}}} \]
    13. +-inversesN/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{\frac{0}{a - a}}} \]
    14. metadata-evalN/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{\frac{1 - 1}{a - a}}} \]
    15. metadata-evalN/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{\frac{1 \cdot 1 - 1}{a - a}}} \]
    16. metadata-evalN/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{\frac{1 \cdot 1 - 1 \cdot 1}{a - a}}} \]
    17. +-inversesN/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{\frac{1 \cdot 1 - 1 \cdot 1}{0}}} \]
    18. metadata-evalN/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{\frac{1 \cdot 1 - 1 \cdot 1}{1 - 1}}} \]
    19. flip-+N/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{1 + 1}} \]
    20. metadata-evalN/A

      \[\leadsto -\sqrt[3]{\frac{g \cdot -1}{2}} \]
    21. cbrt-undivN/A

      \[\leadsto -\frac{\sqrt[3]{g \cdot -1}}{\sqrt[3]{2}} \]
  11. Applied rewrites5.2%

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

Reproduce

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