(FPCore (cosTheta c)
:precision binary32
(/
1.0
(+
(+ 1.0 c)
(*
(* (/ 1.0 (sqrt PI)) (/ (sqrt (- (- 1.0 cosTheta) cosTheta)) cosTheta))
(exp (* (- cosTheta) cosTheta))))))float code(float cosTheta, float c) {
return 1.0f / ((1.0f + c) + (((1.0f / sqrtf(((float) M_PI))) * (sqrtf(((1.0f - cosTheta) - cosTheta)) / cosTheta)) * expf((-cosTheta * cosTheta))));
}
function code(cosTheta, c) return Float32(Float32(1.0) / Float32(Float32(Float32(1.0) + c) + Float32(Float32(Float32(Float32(1.0) / sqrt(Float32(pi))) * Float32(sqrt(Float32(Float32(Float32(1.0) - cosTheta) - cosTheta)) / cosTheta)) * exp(Float32(Float32(-cosTheta) * cosTheta))))) end
function tmp = code(cosTheta, c) tmp = single(1.0) / ((single(1.0) + c) + (((single(1.0) / sqrt(single(pi))) * (sqrt(((single(1.0) - cosTheta) - cosTheta)) / cosTheta)) * exp((-cosTheta * cosTheta)))); end
\frac{1}{\left(1 + c\right) + \left(\frac{1}{\sqrt{\pi}} \cdot \frac{\sqrt{\left(1 - cosTheta\right) - cosTheta}}{cosTheta}\right) \cdot e^{\left(-cosTheta\right) \cdot cosTheta}}
Please include this information when filing a bug report:
herbie shell --seed 2022150
(FPCore (cosTheta c)
:name "Beckmann Sample, normalization factor"
:precision binary32
:pre (and (and (< 0.0 cosTheta) (< cosTheta 0.9999)) (and (< -1.0 c) (< c 1.0)))
(/ 1.0 (+ (+ 1.0 c) (* (* (/ 1.0 (sqrt PI)) (/ (sqrt (- (- 1.0 cosTheta) cosTheta)) cosTheta)) (exp (* (- cosTheta) cosTheta))))))
| application: required keyword argument not supplied procedure: batch-egg-rewrite required keyword: #:rules arguments...: '(#<rule erfc-erf_binary32> #<rule erf-erfc_binary32> #<rule erf-odd_binary32> #<rule prod-diff_binary32> #<rule hypot-udef_binary32> #<rule expm1-log1p-u_binary32> #<rule log1p-expm1-u_binary32> #<rule log1p-udef_binary32> #<rule expm1-udef_binary32> #... #:depths '(1 1 1 1) #:roots '((2) (2) (2) (2)) | L | C | |
|---|---|---|---|
| (unnamed) | /opt/racket-8.1/collects/racket/private/kw.rkt | 1558 | 14 |
| rewrite-expressions | /data/pavpan/nightlies/herbie/timeline/src/core/matcher.rkt | 171 | 0 |
| gen-rewrites! | /data/pavpan/nightlies/herbie/timeline/src/patch.rkt | 144 | 0 |
| patch-table-run | /data/pavpan/nightlies/herbie/timeline/src/patch.rkt | 291 | 0 |
| (unnamed) | /opt/racket-8.1/collects/racket/contract/private/arrow-val-first.rkt | 486 | 18 |
| run-iter! | /data/pavpan/nightlies/herbie/timeline/src/mainloop.rkt | 246 | 0 |
| mutate! | /data/pavpan/nightlies/herbie/timeline/src/mainloop.rkt | 379 | 0 |
| run-improve! | /data/pavpan/nightlies/herbie/timeline/src/mainloop.rkt | 326 | 0 |
| (unnamed) | /data/pavpan/nightlies/herbie/timeline/src/sandbox.rkt | 66 | 6 |
| (unnamed) | /opt/racket-8.1/share/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /opt/racket-8.1/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /opt/racket-8.1/collects/racket/engine.rkt | 42 | 24 |