
(FPCore (k n) :precision binary64 (* (/ 1.0 (sqrt k)) (pow (* (* 2.0 PI) n) (/ (- 1.0 k) 2.0))))
double code(double k, double n) {
return (1.0 / sqrt(k)) * pow(((2.0 * ((double) M_PI)) * n), ((1.0 - k) / 2.0));
}
public static double code(double k, double n) {
return (1.0 / Math.sqrt(k)) * Math.pow(((2.0 * Math.PI) * n), ((1.0 - k) / 2.0));
}
def code(k, n): return (1.0 / math.sqrt(k)) * math.pow(((2.0 * math.pi) * n), ((1.0 - k) / 2.0))
function code(k, n) return Float64(Float64(1.0 / sqrt(k)) * (Float64(Float64(2.0 * pi) * n) ^ Float64(Float64(1.0 - k) / 2.0))) end
function tmp = code(k, n) tmp = (1.0 / sqrt(k)) * (((2.0 * pi) * n) ^ ((1.0 - k) / 2.0)); end
code[k_, n_] := N[(N[(1.0 / N[Sqrt[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 * Pi), $MachinePrecision] * n), $MachinePrecision], N[(N[(1.0 - k), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\frac{1}{\sqrt{k}} \cdot {\left(\left(2 \cdot \pi\right) \cdot n\right)}^{\left(\frac{1 - k}{2}\right)}
herbie shell --seed 2025191
(FPCore (k n)
:name "Migdal et al, Equation (51)"
:precision binary64
(* (/ 1.0 (sqrt k)) (pow (* (* 2.0 PI) n) (/ (- 1.0 k) 2.0))))
Please file a bug report with this information.
| egraph-prove: cannot prove #s(approx (* (/ 1 (sqrt k)) (pow (* (* 2 (PI)) n) (/ (- 1 k) 2))) (/.f64 (pow.f64 (*.f64 #s(literal 2 binary64) (*.f64 n (PI.f64))) #s(literal 1/2 binary64)) (sqrt.f64 k))) is equal to (/.f64 (sqrt.f64 (*.f64 (+.f64 (PI.f64) (PI.f64)) n)) (*.f64 (sqrt.f64 k) (pow.f64 (*.f64 (+.f64 (PI.f64) (PI.f64)) n) (*.f64 #s(literal 1/2 binary64) k)))); not equal | L | C | |
|---|---|---|---|
| add-derivations-to | /home/nightlies/herbie/batch-reconstruct-alt/src/core/derivations.rkt | 16 | 0 |
| hash-ref! | /usr/share/racket/collects/racket/private/more-scheme.rkt | 377 | 2 |
| loop | .../private/map.rkt | 40 | 19 |
| alt-map | /home/nightlies/herbie/batch-reconstruct-alt/src/utils/alternative.rkt | 20 | 0 |
| add-derivations | /home/nightlies/herbie/batch-reconstruct-alt/src/core/derivations.rkt | 30 | 0 |
| extract! | /home/nightlies/herbie/batch-reconstruct-alt/src/core/mainloop.rkt | 70 | 0 |
| run-improve! | /home/nightlies/herbie/batch-reconstruct-alt/src/core/mainloop.rkt | 42 | 0 |
| get-alternatives | /home/nightlies/herbie/batch-reconstruct-alt/src/api/sandbox.rkt | 61 | 0 |
| (unnamed) | /home/nightlies/herbie/batch-reconstruct-alt/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/batch-reconstruct-alt/src/api/sandbox.rkt | 197 | 2 |
| (unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |