Average Error: 15.8 → 0.9
Time: 5.7s
Precision: binary64
\[\sqrt[3]{\frac{g}{2 \cdot a}} \]
\[\frac{\sqrt[3]{g}}{\sqrt[3]{a \cdot 2}} \]
(FPCore (g a) :precision binary64 (cbrt (/ g (* 2.0 a))))
(FPCore (g a) :precision binary64 (/ (cbrt g) (cbrt (* a 2.0))))
double code(double g, double a) {
	return cbrt((g / (2.0 * a)));
}
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 / (2.0 * a)));
}
public static double code(double g, double a) {
	return Math.cbrt(g) / Math.cbrt((a * 2.0));
}
function code(g, a)
	return cbrt(Float64(g / Float64(2.0 * a)))
end
function code(g, a)
	return Float64(cbrt(g) / cbrt(Float64(a * 2.0)))
end
code[g_, a_] := N[Power[N[(g / N[(2.0 * a), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]
code[g_, a_] := N[(N[Power[g, 1/3], $MachinePrecision] / N[Power[N[(a * 2.0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]
\sqrt[3]{\frac{g}{2 \cdot a}}
\frac{\sqrt[3]{g}}{\sqrt[3]{a \cdot 2}}

Error

Bits error versus g

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.8

    \[\sqrt[3]{\frac{g}{2 \cdot a}} \]
  2. Applied cbrt-div_binary640.9

    \[\leadsto \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{2 \cdot a}}} \]
  3. Applied clear-num_binary640.9

    \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt[3]{2 \cdot a}}{\sqrt[3]{g}}}} \]
  4. Applied *-un-lft-identity_binary640.9

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

    \[\leadsto \frac{1}{\frac{\sqrt[3]{2 \cdot a}}{\color{blue}{\sqrt[3]{1} \cdot \sqrt[3]{g}}}} \]
  6. Applied *-un-lft-identity_binary640.9

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

    \[\leadsto \frac{1}{\color{blue}{\frac{1}{\sqrt[3]{1}} \cdot \frac{\sqrt[3]{2 \cdot a}}{\sqrt[3]{g}}}} \]
  8. Applied add-cube-cbrt_binary640.9

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{\frac{1}{\sqrt[3]{1}} \cdot \frac{\sqrt[3]{2 \cdot a}}{\sqrt[3]{g}}} \]
  9. Applied times-frac_binary640.9

    \[\leadsto \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{1}{\sqrt[3]{1}}} \cdot \frac{\sqrt[3]{1}}{\frac{\sqrt[3]{2 \cdot a}}{\sqrt[3]{g}}}} \]
  10. Simplified0.9

    \[\leadsto \color{blue}{1} \cdot \frac{\sqrt[3]{1}}{\frac{\sqrt[3]{2 \cdot a}}{\sqrt[3]{g}}} \]
  11. Simplified0.9

    \[\leadsto 1 \cdot \color{blue}{\frac{\sqrt[3]{g}}{\sqrt[3]{a \cdot 2}}} \]
  12. Final simplification0.9

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

Reproduce

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