
(FPCore (cosTheta_i u1 u2) :precision binary32 (* (sqrt (- (log (- 1.0 u1)))) (sin (* (* 2.0 PI) u2))))
float code(float cosTheta_i, float u1, float u2) {
return sqrtf(-logf((1.0f - u1))) * sinf(((2.0f * ((float) M_PI)) * u2));
}
function code(cosTheta_i, u1, u2) return Float32(sqrt(Float32(-log(Float32(Float32(1.0) - u1)))) * sin(Float32(Float32(Float32(2.0) * Float32(pi)) * u2))) end
function tmp = code(cosTheta_i, u1, u2) tmp = sqrt(-log((single(1.0) - u1))) * sin(((single(2.0) * single(pi)) * u2)); end
\begin{array}{l}
\\
\sqrt{-\log \left(1 - u1\right)} \cdot \sin \left(\left(2 \cdot \pi\right) \cdot u2\right)
\end{array}
herbie shell --seed 2024154 -o setup:simplify
(FPCore (cosTheta_i u1 u2)
:name "Beckmann Sample, near normal, slope_y"
:precision binary32
: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))))
Please file a bug report with this information.
| binary32 is not implemented in this comparison | L | C | |
|---|---|---|---|
| run-sollya | /home/nightlies/herbie/artem-popl-s-eval/src/run-sollya.rkt | 180 | 0 |
| sample-points | /home/nightlies/herbie/artem-popl-s-eval/src/sampling.rkt | 176 | 0 |
| setup-context! | /home/nightlies/herbie/artem-popl-s-eval/src/mainloop.rkt | 45 | 0 |
| get-alternatives/report | /home/nightlies/herbie/artem-popl-s-eval/src/sandbox.rkt | 171 | 0 |
| (unnamed) | /home/nightlies/herbie/artem-popl-s-eval/src/sandbox.rkt | 265 | 6 |
| (unnamed) | /usr/local/racket/share/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/local/racket/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /usr/local/racket/collects/racket/engine.rkt | 42 | 24 |