
(FPCore (g h a) :precision binary64 (let* ((t_0 (/ 1.0 (* 2.0 a))) (t_1 (sqrt (- (* g g) (* h h))))) (+ (cbrt (* t_0 (+ (- g) t_1))) (cbrt (* t_0 (- (- g) t_1))))))
double code(double g, double h, double a) {
double t_0 = 1.0 / (2.0 * a);
double t_1 = sqrt(((g * g) - (h * h)));
return cbrt((t_0 * (-g + t_1))) + cbrt((t_0 * (-g - t_1)));
}
public static double code(double g, double h, double a) {
double t_0 = 1.0 / (2.0 * a);
double t_1 = Math.sqrt(((g * g) - (h * h)));
return Math.cbrt((t_0 * (-g + t_1))) + Math.cbrt((t_0 * (-g - t_1)));
}
function code(g, h, a) t_0 = Float64(1.0 / Float64(2.0 * a)) t_1 = sqrt(Float64(Float64(g * g) - Float64(h * h))) return Float64(cbrt(Float64(t_0 * Float64(Float64(-g) + t_1))) + cbrt(Float64(t_0 * Float64(Float64(-g) - t_1)))) end
code[g_, h_, a_] := Block[{t$95$0 = N[(1.0 / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(g * g), $MachinePrecision] - N[(h * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(N[Power[N[(t$95$0 * N[((-g) + t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[Power[N[(t$95$0 * N[((-g) - t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{2 \cdot a}\\
t_1 := \sqrt{g \cdot g - h \cdot h}\\
\sqrt[3]{t\_0 \cdot \left(\left(-g\right) + t\_1\right)} + \sqrt[3]{t\_0 \cdot \left(\left(-g\right) - t\_1\right)}
\end{array}
\end{array}
herbie shell --seed 2024283
(FPCore (g h a)
:name "2-ancestry mixing, positive discriminant"
:precision binary64
(+ (cbrt (* (/ 1.0 (* 2.0 a)) (+ (- g) (sqrt (- (* g g) (* h h)))))) (cbrt (* (/ 1.0 (* 2.0 a)) (- (- g) (sqrt (- (* g g) (* h h))))))))
Please file a bug report with this information.
| eprintf: format string requires 0 arguments, given 1; arguments were: '(#s(si 19 4)) | L | C | |
|---|---|---|---|
| err-lsts->split-indices | /home/nightlies/herbie/zane-regimes-old/src/core/regimes.rkt | 219 | 0 |
| option-on-expr | /home/nightlies/herbie/zane-regimes-old/src/core/regimes.rkt | 120 | 0 |
| infer-splitpoints | /home/nightlies/herbie/zane-regimes-old/src/core/regimes.rkt | 56 | 0 |
| loop | /home/nightlies/herbie/zane-regimes-old/src/core/regimes.rkt | 41 | 2 |
| make-regime! | /home/nightlies/herbie/zane-regimes-old/src/core/mainloop.rkt | 350 | 0 |
| extract! | /home/nightlies/herbie/zane-regimes-old/src/core/mainloop.rkt | 79 | 0 |
| run-improve! | /home/nightlies/herbie/zane-regimes-old/src/core/mainloop.rkt | 45 | 0 |
| get-alternatives/report | /home/nightlies/herbie/zane-regimes-old/src/api/sandbox.rkt | 186 | 0 |
| (unnamed) | /home/nightlies/herbie/zane-regimes-old/src/api/sandbox.rkt | 282 | 6 |
| (unnamed) | /usr/share/racket/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/share/racket/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |