(FPCore (xi yi zi ux uy maxCos)
:precision binary32
(+
(+
(*
(*
(cos (* (* uy 2.0) PI))
(sqrt
(- 1.0 (* (* (* (- 1.0 ux) maxCos) ux) (* (* (- 1.0 ux) maxCos) ux)))))
xi)
(*
(*
(sin (* (* uy 2.0) PI))
(sqrt
(- 1.0 (* (* (* (- 1.0 ux) maxCos) ux) (* (* (- 1.0 ux) maxCos) ux)))))
yi))
(* (* (* (- 1.0 ux) maxCos) ux) zi)))float code(float xi, float yi, float zi, float ux, float uy, float maxCos) {
return (((cosf(((uy * 2.0f) * ((float) M_PI))) * sqrtf((1.0f - ((((1.0f - ux) * maxCos) * ux) * (((1.0f - ux) * maxCos) * ux))))) * xi) + ((sinf(((uy * 2.0f) * ((float) M_PI))) * sqrtf((1.0f - ((((1.0f - ux) * maxCos) * ux) * (((1.0f - ux) * maxCos) * ux))))) * yi)) + ((((1.0f - ux) * maxCos) * ux) * zi);
}
function code(xi, yi, zi, ux, uy, maxCos) return Float32(Float32(Float32(Float32(cos(Float32(Float32(uy * Float32(2.0)) * Float32(pi))) * sqrt(Float32(Float32(1.0) - Float32(Float32(Float32(Float32(Float32(1.0) - ux) * maxCos) * ux) * Float32(Float32(Float32(Float32(1.0) - ux) * maxCos) * ux))))) * xi) + Float32(Float32(sin(Float32(Float32(uy * Float32(2.0)) * Float32(pi))) * sqrt(Float32(Float32(1.0) - Float32(Float32(Float32(Float32(Float32(1.0) - ux) * maxCos) * ux) * Float32(Float32(Float32(Float32(1.0) - ux) * maxCos) * ux))))) * yi)) + Float32(Float32(Float32(Float32(Float32(1.0) - ux) * maxCos) * ux) * zi)) end
function tmp = code(xi, yi, zi, ux, uy, maxCos) tmp = (((cos(((uy * single(2.0)) * single(pi))) * sqrt((single(1.0) - ((((single(1.0) - ux) * maxCos) * ux) * (((single(1.0) - ux) * maxCos) * ux))))) * xi) + ((sin(((uy * single(2.0)) * single(pi))) * sqrt((single(1.0) - ((((single(1.0) - ux) * maxCos) * ux) * (((single(1.0) - ux) * maxCos) * ux))))) * yi)) + ((((single(1.0) - ux) * maxCos) * ux) * zi); end
\left(\left(\cos \left(\left(uy \cdot 2\right) \cdot \pi\right) \cdot \sqrt{1 - \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right) \cdot \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right)}\right) \cdot xi + \left(\sin \left(\left(uy \cdot 2\right) \cdot \pi\right) \cdot \sqrt{1 - \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right) \cdot \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right)}\right) \cdot yi\right) + \left(\left(\left(1 - ux\right) \cdot maxCos\right) \cdot ux\right) \cdot zi
Please include this information when filing a bug report:
herbie shell --seed 2022150
(FPCore (xi yi zi ux uy maxCos)
:name "UniformSampleCone 2"
:precision binary32
:pre (and (and (and (and (and (and (<= -10000.0 xi) (<= xi 10000.0)) (and (<= -10000.0 yi) (<= yi 10000.0))) (and (<= -10000.0 zi) (<= zi 10000.0))) (and (<= 2.328306437e-10 ux) (<= ux 1.0))) (and (<= 2.328306437e-10 uy) (<= uy 1.0))) (and (<= 0.0 maxCos) (<= maxCos 1.0)))
(+ (+ (* (* (cos (* (* uy 2.0) PI)) (sqrt (- 1.0 (* (* (* (- 1.0 ux) maxCos) ux) (* (* (- 1.0 ux) maxCos) ux))))) xi) (* (* (sin (* (* uy 2.0) PI)) (sqrt (- 1.0 (* (* (* (- 1.0 ux) maxCos) ux) (* (* (- 1.0 ux) maxCos) ux))))) yi)) (* (* (* (- 1.0 ux) maxCos) ux) zi)))
| 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 |