| Alternative 1 | |
|---|---|
| Error | 0.9 |
| Cost | 19904 |
\[\sqrt[3]{g} \cdot \frac{\sqrt[3]{0.1111111111111111 \cdot \frac{-0.5}{-0.037037037037037035 \cdot a}}}{\sqrt[3]{3}}
\]
(FPCore (g a) :precision binary64 (cbrt (/ g (* 2.0 a))))
(FPCore (g a) :precision binary64 (* (cbrt g) (* (cbrt (pow a -1.0)) (cbrt 0.5))))
double code(double g, double a) {
return cbrt((g / (2.0 * a)));
}
double code(double g, double a) {
return cbrt(g) * (cbrt(pow(a, -1.0)) * cbrt(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 Math.cbrt(g) * (Math.cbrt(Math.pow(a, -1.0)) * Math.cbrt(0.5));
}
function code(g, a) return cbrt(Float64(g / Float64(2.0 * a))) end
function code(g, a) return Float64(cbrt(g) * Float64(cbrt((a ^ -1.0)) * cbrt(0.5))) 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[(N[Power[N[Power[a, -1.0], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[0.5, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\sqrt[3]{\frac{g}{2 \cdot a}}
\sqrt[3]{g} \cdot \left(\sqrt[3]{{a}^{-1}} \cdot \sqrt[3]{0.5}\right)
Results
Initial program 15.9
Simplified15.9
Applied egg-rr0.8
Applied egg-rr0.9
| Alternative 1 | |
|---|---|
| Error | 0.9 |
| Cost | 19904 |
| Alternative 2 | |
|---|---|
| Error | 0.9 |
| Cost | 19520 |
| Alternative 3 | |
|---|---|
| Error | 0.9 |
| Cost | 13376 |
| Alternative 4 | |
|---|---|
| Error | 0.8 |
| Cost | 13248 |
| Alternative 5 | |
|---|---|
| Error | 0.8 |
| Cost | 13120 |
| Alternative 6 | |
|---|---|
| Error | 15.9 |
| Cost | 6720 |
herbie shell --seed 2023033
(FPCore (g a)
:name "2-ancestry mixing, zero discriminant"
:precision binary64
(cbrt (/ g (* 2.0 a))))