UniformSampleCone, x

Specification

?
\[\left(\left(2.328306437 \cdot 10^{-10} \leq ux \land ux \leq 1\right) \land \left(2.328306437 \cdot 10^{-10} \leq uy \land uy \leq 1\right)\right) \land \left(0 \leq maxCos \land maxCos \leq 1\right)\]
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(1 - ux\right) + ux \cdot maxCos\\ \cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - t\_0 \cdot t\_0} \end{array} \end{array} \]
(FPCore (ux uy maxCos)
 :precision binary32
 (let* ((t_0 (+ (- 1.0 ux) (* ux maxCos))))
   (* (cos (* (* uy 2.0) (PI))) (sqrt (- 1.0 (* t_0 t_0))))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(1 - ux\right) + ux \cdot maxCos\\
\cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - t\_0 \cdot t\_0}
\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2025029 
(FPCore (ux uy maxCos)
  :name "UniformSampleCone, x"
  :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)))
  (* (cos (* (* uy 2.0) (PI))) (sqrt (- 1.0 (* (+ (- 1.0 ux) (* ux maxCos)) (+ (- 1.0 ux) (* ux maxCos)))))))

Please file a bug report with this information.

Backtrace

symbol->string: contract violation expected: symbol? given: '(* x y)LC
insert-node!/home/nightlies/herbie/really-crazy-encodings/src/core/egg-herbie.rkt1082
egraph-add-exprs/home/nightlies/herbie/really-crazy-encodings/src/core/egg-herbie.rkt720
egraph-run-schedule/home/nightlies/herbie/really-crazy-encodings/src/core/egg-herbie.rkt12750
make-egraph/home/nightlies/herbie/really-crazy-encodings/src/core/egg-herbie.rkt13320
initial-simplify/home/nightlies/herbie/really-crazy-encodings/src/core/preprocess.rkt540
find-preprocessing/home/nightlies/herbie/really-crazy-encodings/src/core/preprocess.rkt810
run-improve!/home/nightlies/herbie/really-crazy-encodings/src/core/mainloop.rkt450
get-alternatives/report/home/nightlies/herbie/really-crazy-encodings/src/api/sandbox.rkt1740
(unnamed)/home/nightlies/herbie/really-crazy-encodings/src/api/sandbox.rkt2656
(unnamed)/usr/share/racket/pkgs/profile-lib/main.rkt4010
profile-thunk/usr/share/racket/pkgs/profile-lib/main.rkt90
in-engine/home/nightlies/herbie/really-crazy-encodings/src/api/sandbox.rkt2832
(unnamed)/usr/share/racket/collects/racket/engine.rkt4224