(FPCore (cosTheta_i u1 u2) :precision binary64 (* (sqrt (- (log (- 1.0 u1)))) (sin (* (* 2.0 PI) u2))))
double code(double cosTheta_i, double u1, double u2) {
return sqrt(-log((1.0 - u1))) * sin(((2.0 * ((double) M_PI)) * u2));
}
public static double code(double cosTheta_i, double u1, double u2) {
return Math.sqrt(-Math.log((1.0 - u1))) * Math.sin(((2.0 * Math.PI) * u2));
}
def code(cosTheta_i, u1, u2): return math.sqrt(-math.log((1.0 - u1))) * math.sin(((2.0 * math.pi) * u2))
function code(cosTheta_i, u1, u2) return Float64(sqrt(Float64(-log(Float64(1.0 - u1)))) * sin(Float64(Float64(2.0 * pi) * u2))) end
function tmp = code(cosTheta_i, u1, u2) tmp = sqrt(-log((1.0 - u1))) * sin(((2.0 * pi) * u2)); end
code[cosTheta$95$i_, u1_, u2_] := N[(N[Sqrt[(-N[Log[N[(1.0 - u1), $MachinePrecision]], $MachinePrecision])], $MachinePrecision] * N[Sin[N[(N[(2.0 * Pi), $MachinePrecision] * u2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\sqrt{-\log \left(1 - u1\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot u2\right)
Please include this information when filing a bug report:
herbie shell --seed 2023033
(FPCore (cosTheta_i u1 u2)
:name "Beckmann Sample, near normal, slope_y"
:precision binary64
:pre (and (and (and (> cosTheta_i 0.9999) (<= cosTheta_i 1.0)) (and (<= 2.328306437e-10 u1) (<= u1 1.0))) (and (<= 2.328306437e-10 u2) (<= u2 1.0)))
(* (sqrt (- (log (- 1.0 u1)))) (sin (* (* 2.0 PI) u2))))
| map: contract violation expected: list? given: #<eof> | L | C | |
|---|---|---|---|
| gen-map | /usr/share/racket/collects/racket/private/map.rkt | 257 | 2 |
| run-egglog | /home/nightlies/herbie/oflatt-egglog-ctx/src/egglog/run-egglog.rkt | 1456 | 0 |
| run-simplify-input | /home/nightlies/herbie/oflatt-egglog-ctx/src/core/simplify.rkt | 73 | 0 |
| simplify-batch | /home/nightlies/herbie/oflatt-egglog-ctx/src/core/simplify.rkt | 48 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-higher-order.rkt | 379 | 33 |
| simplify! | /home/nightlies/herbie/oflatt-egglog-ctx/src/patch.rkt | 246 | 0 |
| patch-table-run | /home/nightlies/herbie/oflatt-egglog-ctx/src/patch.rkt | 318 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt | 486 | 18 |
| run-iter! | /home/nightlies/herbie/oflatt-egglog-ctx/src/mainloop.rkt | 262 | 0 |
| mutate! | /home/nightlies/herbie/oflatt-egglog-ctx/src/mainloop.rkt | 372 | 0 |
| run-improve! | /home/nightlies/herbie/oflatt-egglog-ctx/src/mainloop.rkt | 320 | 0 |
| run-herbie | /home/nightlies/herbie/oflatt-egglog-ctx/src/sandbox.rkt | 57 | 0 |
| (unnamed) | /home/nightlies/herbie/oflatt-egglog-ctx/src/sandbox.rkt | 133 | 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 |