Average Error: 15.6 → 0.9
Time: 22.7s
Precision: binary64
Cost: 640
\[\sqrt[3]{\frac{g}{2 \cdot a}}\]
\[\frac{\sqrt[3]{1} \cdot \sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}\]
\sqrt[3]{\frac{g}{2 \cdot a}}
\frac{\sqrt[3]{1} \cdot \sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}
(FPCore (g a) :precision binary64 (cbrt (/ g (* 2.0 a))))
(FPCore (g a) :precision binary64 (/ (* (cbrt 1.0) (cbrt g)) (cbrt (* 2.0 a))))
double code(double g, double a) {
	return cbrt(g / (2.0 * a));
}
double code(double g, double a) {
	return (cbrt(1.0) * cbrt(g)) / cbrt(2.0 * a);
}

Error

Bits error versus g

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs
Alternative 1
Accuracy1.1
Cost512
\[\frac{\frac{\sqrt[3]{g}}{\sqrt[3]{2}}}{\sqrt[3]{a}}\]
Alternative 2
Accuracy1.5
Cost2432
\[\sqrt[3]{\frac{\sqrt[3]{-g} \cdot \sqrt[3]{-1}}{\sqrt[3]{2 \cdot a}}} \cdot \left(\sqrt[3]{\frac{\sqrt[3]{-g} \cdot \sqrt[3]{-1}}{\sqrt[3]{2 \cdot a}}} \cdot \sqrt[3]{\frac{\sqrt[3]{-g} \cdot \sqrt[3]{-1}}{\sqrt[3]{2 \cdot a}}}\right)\]
Alternative 3
Accuracy9.4
Cost1858
\[\begin{array}{l} \mathbf{if}\;g \leq -6.445037312505954 \cdot 10^{-154}:\\ \;\;\;\;\frac{\sqrt[3]{-1}}{\sqrt[3]{-2}} \cdot \sqrt[3]{\frac{g}{a}}\\ \mathbf{elif}\;g \leq -4.4880163632447157 \cdot 10^{-212}:\\ \;\;\;\;\sqrt{\frac{\sqrt[3]{g} \cdot \sqrt[3]{1}}{\sqrt[3]{a \cdot 2}}} \cdot \sqrt{\frac{\sqrt[3]{g} \cdot \sqrt[3]{1}}{\sqrt[3]{a \cdot 2}}}\\ \mathbf{elif}\;g \leq -5.2067209407112 \cdot 10^{-311}:\\ \;\;\;\;\frac{\sqrt[3]{-1}}{\sqrt[3]{-2}} \cdot \sqrt[3]{\frac{g}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{\sqrt{g}}}{\sqrt[3]{2}} \cdot \frac{\sqrt[3]{\sqrt{g}}}{\sqrt[3]{a}}\\ \end{array}\]
Alternative 4
Accuracy11.0
Cost1793
\[\begin{array}{l} \mathbf{if}\;2 \cdot a \leq -1.1737270115384541 \cdot 10^{+188}:\\ \;\;\;\;\sqrt{\frac{\sqrt[3]{g} \cdot \sqrt[3]{1}}{\sqrt[3]{2 \cdot a}}} \cdot \sqrt{\frac{\sqrt[3]{g} \cdot \sqrt[3]{1}}{\sqrt[3]{2 \cdot a}}}\\ \mathbf{elif}\;2 \cdot a \leq 3.611518122603782 \cdot 10^{-306}:\\ \;\;\;\;\frac{\sqrt[3]{-1}}{\sqrt[3]{-2}} \cdot \sqrt[3]{\frac{g}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{-1} \cdot \sqrt[3]{-g}}{e^{\log \left(\sqrt[3]{2 \cdot a}\right)}}\\ \end{array}\]
Alternative 5
Accuracy10.1
Cost1153
\[\begin{array}{l} \mathbf{if}\;2 \cdot a \leq 3.611518122603782 \cdot 10^{-306}:\\ \;\;\;\;\frac{\sqrt[3]{-1}}{\sqrt[3]{-2}} \cdot \sqrt[3]{\frac{g}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{-1} \cdot \sqrt[3]{-g}}{e^{\log \left(\sqrt[3]{2 \cdot a}\right)}}\\ \end{array}\]
Alternative 6
Accuracy34.2
Cost832
\[\frac{\sqrt[3]{-g} \cdot \sqrt[3]{-1}}{e^{\log \left(\sqrt[3]{2 \cdot a}\right)}}\]
Alternative 7
Accuracy34.6
Cost768
\[\frac{\sqrt[3]{-g} \cdot \sqrt[3]{-1}}{{\left(2 \cdot a\right)}^{0.3333333333333333}}\]

Derivation

  1. Initial program 15.6

    \[\sqrt[3]{\frac{g}{2 \cdot a}}\]
  2. Using strategy rm
  3. Applied cbrt-div_binary64_24970.9

    \[\leadsto \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity_binary64_24650.9

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

    \[\leadsto \frac{\color{blue}{\sqrt[3]{1} \cdot \sqrt[3]{g}}}{\sqrt[3]{2 \cdot a}}\]
  7. Using strategy rm
  8. Applied pow1_binary64_25260.9

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

    \[\leadsto \frac{\sqrt[3]{1} \cdot \sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}\]

Reproduce

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