
(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}
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}
herbie shell --seed 2025190
(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.
| rival-analyze: arity mismatch; the expected number of arguments does not match the given number expected: 2 given: 3 arguments...: #<rival-machine> '#((ival (bf "-2.098578716467387692404358116883839070632e323228496") (bf "2.098578716467387692404358116883839070632e323228496")) (ival (bf "-2.098578716467387692404358116883839070632e323228496") (bf "2.098578716467387692404358116883839070632e323228496")... #f | L | C | |
|---|---|---|---|
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt | 489 | 18 |
| search-step | /home/nightlies/herbie/hash-lang-platform/src/core/searchreals.rkt | 32 | 0 |
| find-intervals | /home/nightlies/herbie/hash-lang-platform/src/core/searchreals.rkt | 90 | 0 |
| make-sampler | /home/nightlies/herbie/hash-lang-platform/src/core/sampling.rkt | 102 | 0 |
| sample-points | /home/nightlies/herbie/hash-lang-platform/src/core/sampling.rkt | 177 | 0 |
| get-sample | /home/nightlies/herbie/hash-lang-platform/src/api/sandbox.rkt | 133 | 0 |
| (unnamed) | /home/nightlies/herbie/hash-lang-platform/src/api/sandbox.rkt | 181 | 6 |
| (unnamed) | /usr/share/racket/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/share/racket/pkgs/profile-lib/main.rkt | 9 | 0 |
| in-engine | /home/nightlies/herbie/hash-lang-platform/src/api/sandbox.rkt | 197 | 2 |
| (unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |