
(FPCore (ux uy maxCos) :precision binary32 (+ (- 1.0 ux) (* ux maxCos)))
float code(float ux, float uy, float maxCos) {
return (1.0f - ux) + (ux * maxCos);
}
real(4) function code(ux, uy, maxcos)
real(4), intent (in) :: ux
real(4), intent (in) :: uy
real(4), intent (in) :: maxcos
code = (1.0e0 - ux) + (ux * maxcos)
end function
function code(ux, uy, maxCos) return Float32(Float32(Float32(1.0) - ux) + Float32(ux * maxCos)) end
function tmp = code(ux, uy, maxCos) tmp = (single(1.0) - ux) + (ux * maxCos); end
\begin{array}{l}
\\
\left(1 - ux\right) + ux \cdot maxCos
\end{array}
herbie shell --seed 2024058
(FPCore (ux uy maxCos)
:name "UniformSampleCone, z"
:precision binary32
:pre (and (and (and (<= 2.328306437e-10 ux) (<= ux 1.0)) (and (<= 2.328306437e-10 uy) (<= uy 1.0))) (and (<= 0.0 maxCos) (<= maxCos 1.0)))
(+ (- 1.0 ux) (* ux maxCos)))
Please file a bug report with this information.
| map: all lists must have same size first list length: 257 other list length: 513 procedure: #<procedure:list> | L | C | |
|---|---|---|---|
| gen-map | /usr/local/racket/collects/racket/private/map.rkt | 257 | 2 |
| actual-errors | /home/nightlies/herbie/literal-values/src/error-table.rkt | 9 | 0 |
| mutate! | /home/nightlies/herbie/literal-values/src/mainloop.rkt | 343 | 0 |
| run-improve! | /home/nightlies/herbie/literal-values/src/mainloop.rkt | 329 | 0 |
| get-alternatives/report | /home/nightlies/herbie/literal-values/src/sandbox.rkt | 169 | 0 |
| (unnamed) | /home/nightlies/herbie/literal-values/src/sandbox.rkt | 262 | 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 |