?

Average Error: 24.65% → 1.32%
Time: 5.9s
Precision: binary64
Cost: 13248

?

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

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 24.65

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Applied egg-rr24.58

    \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{\frac{a}{g \cdot 0.5}}}} \]
  3. Applied egg-rr1.35

    \[\leadsto \frac{1}{\color{blue}{\sqrt[3]{a} \cdot \frac{1}{\sqrt[3]{g \cdot 0.5}}}} \]
  4. Simplified1.32

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

    [Start]1.35

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

    associate-*r/ [=>]1.32

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

    associate-*l/ [<=]1.32

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

    *-rgt-identity [=>]1.32

    \[ \frac{1}{\color{blue}{\frac{\sqrt[3]{a}}{\sqrt[3]{g \cdot 0.5}}}} \]
  5. Final simplification1.32

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

Alternatives

Alternative 1
Error1.31%
Cost13120
\[\sqrt[3]{g} \cdot \sqrt[3]{\frac{0.5}{a}} \]
Alternative 2
Error1.3%
Cost13120
\[\frac{\sqrt[3]{g}}{\sqrt[3]{a \cdot 2}} \]
Alternative 3
Error24.59%
Cost6848
\[\frac{1}{\sqrt[3]{a \cdot \frac{2}{g}}} \]
Alternative 4
Error24.58%
Cost6848
\[\frac{1}{\sqrt[3]{\frac{a}{g \cdot 0.5}}} \]
Alternative 5
Error24.65%
Cost6720
\[\sqrt[3]{g \cdot \frac{0.5}{a}} \]

Error

Reproduce?

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