
(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}
Sampling outcomes in binary32 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (cos (* (* uy 2.0) (PI)))))
(if (<= maxCos 4.999999969612645e-9)
(*
t_0
(sqrt (* (- (fma -2.0 maxCos 2.0) (* (pow (- maxCos 1.0) 2.0) ux)) ux)))
(*
t_0
(sqrt
(*
(*
(* ux ux)
(+
(/ (/ (- (/ 2.0 ux) 1.0) maxCos) maxCos)
(+ (/ (- 2.0 (/ 2.0 ux)) maxCos) -1.0)))
(* maxCos maxCos)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right)\\
\mathbf{if}\;maxCos \leq 4.999999969612645 \cdot 10^{-9}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(\mathsf{fma}\left(-2, maxCos, 2\right) - {\left(maxCos - 1\right)}^{2} \cdot ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(\left(ux \cdot ux\right) \cdot \left(\frac{\frac{\frac{2}{ux} - 1}{maxCos}}{maxCos} + \left(\frac{2 - \frac{2}{ux}}{maxCos} + -1\right)\right)\right) \cdot \left(maxCos \cdot maxCos\right)}\\
\end{array}
\end{array}
if maxCos < 4.99999997e-9Initial program 56.2%
Taylor expanded in ux around inf
*-commutativeN/A
lower-*.f32N/A
associate--r+N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
div-subN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f32N/A
lower-/.f32N/A
+-commutativeN/A
lower-fma.f32N/A
lower-pow.f32N/A
lower--.f32N/A
unpow2N/A
lower-*.f3272.6
Applied rewrites72.6%
Taylor expanded in ux around 0
Applied rewrites72.8%
if 4.99999997e-9 < maxCos Initial program 55.9%
Taylor expanded in ux around inf
*-commutativeN/A
lower-*.f32N/A
associate--r+N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
div-subN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f32N/A
lower-/.f32N/A
+-commutativeN/A
lower-fma.f32N/A
lower-pow.f32N/A
lower--.f32N/A
unpow2N/A
lower-*.f3247.7
Applied rewrites47.7%
Applied rewrites98.9%
Taylor expanded in maxCos around inf
Applied rewrites98.7%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (+ (- 1.0 ux) (* ux maxCos))) (t_1 (cos (* (* uy 2.0) (PI)))))
(if (<= (* t_1 (sqrt (- 1.0 (* t_0 t_0)))) 0.0038999998942017555)
(* t_1 (sqrt (* (- (- 3.0 (+ maxCos 1.0)) maxCos) ux)))
(* (fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0) (sqrt (* (- 2.0 ux) ux))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - ux\right) + ux \cdot maxCos\\
t_1 := \cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right)\\
\mathbf{if}\;t\_1 \cdot \sqrt{1 - t\_0 \cdot t\_0} \leq 0.0038999998942017555:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(\left(3 - \left(maxCos + 1\right)\right) - maxCos\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right) \cdot \sqrt{\left(2 - ux\right) \cdot ux}\\
\end{array}
\end{array}
if (*.f32 (cos.f32 (*.f32 (*.f32 uy #s(literal 2 binary32)) (PI.f32))) (sqrt.f32 (-.f32 #s(literal 1 binary32) (*.f32 (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)) (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)))))) < 0.00389999989Initial program 29.8%
lift-+.f32N/A
flip-+N/A
div-invN/A
lower-*.f32N/A
lower--.f32N/A
pow2N/A
lower-pow.f32N/A
pow2N/A
lower-pow.f32N/A
lift-*.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-/.f32N/A
lower--.f3229.5
lift-*.f32N/A
*-commutativeN/A
lower-*.f3229.5
Applied rewrites29.5%
Taylor expanded in ux around 0
*-commutativeN/A
lower-*.f32N/A
lower--.f32N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-+.f3295.4
Applied rewrites95.4%
if 0.00389999989 < (*.f32 (cos.f32 (*.f32 (*.f32 uy #s(literal 2 binary32)) (PI.f32))) (sqrt.f32 (-.f32 #s(literal 1 binary32) (*.f32 (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)) (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)))))) Initial program 83.7%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3273.6
Applied rewrites72.9%
Taylor expanded in ux around 0
*-commutativeN/A
associate--l+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f32N/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-pow.f32N/A
lower--.f3280.2
Applied rewrites79.4%
Taylor expanded in maxCos around 0
Applied rewrites79.5%
Final simplification88.0%
(FPCore (ux uy maxCos) :precision binary32 (* (cos (* (* uy 2.0) (PI))) (sqrt (* (- (/ (+ (* -2.0 maxCos) 2.0) ux) (pow (- maxCos 1.0) 2.0)) (* ux ux)))))
\begin{array}{l}
\\
\cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(\frac{-2 \cdot maxCos + 2}{ux} - {\left(maxCos - 1\right)}^{2}\right) \cdot \left(ux \cdot ux\right)}
\end{array}
Initial program 56.2%
Taylor expanded in ux around inf
*-commutativeN/A
lower-*.f32N/A
associate--r+N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
div-subN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f32N/A
lower-/.f32N/A
+-commutativeN/A
lower-fma.f32N/A
lower-pow.f32N/A
lower--.f32N/A
unpow2N/A
lower-*.f3267.2
Applied rewrites67.5%
Applied rewrites98.7%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (- (/ 2.0 ux) 1.0)) (t_1 (cos (* (* uy 2.0) (PI)))))
(if (<= maxCos 4.999999969612645e-9)
(* t_1 (sqrt (* (* t_0 ux) ux)))
(*
t_1
(sqrt
(*
(*
(* ux ux)
(+ (/ (/ t_0 maxCos) maxCos) (+ (/ (- 2.0 (/ 2.0 ux)) maxCos) -1.0)))
(* maxCos maxCos)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{2}{ux} - 1\\
t_1 := \cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right)\\
\mathbf{if}\;maxCos \leq 4.999999969612645 \cdot 10^{-9}:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(t\_0 \cdot ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(\left(ux \cdot ux\right) \cdot \left(\frac{\frac{t\_0}{maxCos}}{maxCos} + \left(\frac{2 - \frac{2}{ux}}{maxCos} + -1\right)\right)\right) \cdot \left(maxCos \cdot maxCos\right)}\\
\end{array}
\end{array}
if maxCos < 4.99999997e-9Initial program 56.2%
Taylor expanded in ux around inf
*-commutativeN/A
lower-*.f32N/A
associate--r+N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
div-subN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f32N/A
lower-/.f32N/A
+-commutativeN/A
lower-fma.f32N/A
lower-pow.f32N/A
lower--.f32N/A
unpow2N/A
lower-*.f3273.0
Applied rewrites72.6%
Applied rewrites98.7%
Taylor expanded in maxCos around 0
Applied rewrites98.8%
if 4.99999997e-9 < maxCos Initial program 55.9%
Taylor expanded in ux around inf
*-commutativeN/A
lower-*.f32N/A
associate--r+N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
div-subN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f32N/A
lower-/.f32N/A
+-commutativeN/A
lower-fma.f32N/A
lower-pow.f32N/A
lower--.f32N/A
unpow2N/A
lower-*.f3247.7
Applied rewrites47.7%
Applied rewrites98.9%
Taylor expanded in maxCos around inf
Applied rewrites98.7%
(FPCore (ux uy maxCos)
:precision binary32
(if (<= maxCos 4.999999987376214e-7)
(* (cos (* (* uy 2.0) (PI))) (sqrt (* (* (- (/ 2.0 ux) 1.0) ux) ux)))
(*
(+ (* (pow (* (PI) uy) 2.0) -2.0) 1.0)
(sqrt
(*
(+
(/ (+ (/ (* (- ux 2.0) ux) maxCos) (* (* (+ -1.0 ux) ux) -2.0)) maxCos)
(* ux ux))
(* (- maxCos) maxCos))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;maxCos \leq 4.999999987376214 \cdot 10^{-7}:\\
\;\;\;\;\cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(\left(\frac{2}{ux} - 1\right) \cdot ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;\left({\left(\mathsf{PI}\left(\right) \cdot uy\right)}^{2} \cdot -2 + 1\right) \cdot \sqrt{\left(\frac{\frac{\left(ux - 2\right) \cdot ux}{maxCos} + \left(\left(-1 + ux\right) \cdot ux\right) \cdot -2}{maxCos} + ux \cdot ux\right) \cdot \left(\left(-maxCos\right) \cdot maxCos\right)}\\
\end{array}
\end{array}
if maxCos < 4.99999999e-7Initial program 55.6%
Taylor expanded in ux around inf
*-commutativeN/A
lower-*.f32N/A
associate--r+N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
div-subN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f32N/A
lower-/.f32N/A
+-commutativeN/A
lower-fma.f32N/A
lower-pow.f32N/A
lower--.f32N/A
unpow2N/A
lower-*.f3271.5
Applied rewrites71.2%
Applied rewrites98.7%
Taylor expanded in maxCos around 0
Applied rewrites98.7%
if 4.99999999e-7 < maxCos Initial program 58.8%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3252.2
Applied rewrites52.2%
Taylor expanded in maxCos around -inf
*-commutativeN/A
lower-*.f32N/A
Applied rewrites42.3%
Taylor expanded in ux around 0
Applied rewrites81.3%
Applied rewrites90.5%
Final simplification97.3%
(FPCore (ux uy maxCos)
:precision binary32
(if (<= (* uy 2.0) 0.0002086000022245571)
(*
(fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0)
(sqrt
(*
(- (/ (+ (* -2.0 maxCos) 2.0) ux) (pow (- maxCos 1.0) 2.0))
(* ux ux))))
(* (cos (* (* uy 2.0) (PI))) (sqrt (* (* (- (/ 2.0 ux) 1.0) ux) ux)))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;uy \cdot 2 \leq 0.0002086000022245571:\\
\;\;\;\;\mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right) \cdot \sqrt{\left(\frac{-2 \cdot maxCos + 2}{ux} - {\left(maxCos - 1\right)}^{2}\right) \cdot \left(ux \cdot ux\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(\left(\frac{2}{ux} - 1\right) \cdot ux\right) \cdot ux}\\
\end{array}
\end{array}
if (*.f32 uy #s(literal 2 binary32)) < 2.08600002e-4Initial program 56.1%
Taylor expanded in ux around inf
*-commutativeN/A
lower-*.f32N/A
associate--r+N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
div-subN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f32N/A
lower-/.f32N/A
+-commutativeN/A
lower-fma.f32N/A
lower-pow.f32N/A
lower--.f32N/A
unpow2N/A
lower-*.f3291.2
Applied rewrites91.2%
Applied rewrites99.3%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3299.0
Applied rewrites98.4%
if 2.08600002e-4 < (*.f32 uy #s(literal 2 binary32)) Initial program 56.3%
Taylor expanded in ux around inf
*-commutativeN/A
lower-*.f32N/A
associate--r+N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
div-subN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f32N/A
lower-/.f32N/A
+-commutativeN/A
lower-fma.f32N/A
lower-pow.f32N/A
lower--.f32N/A
unpow2N/A
lower-*.f3229.7
Applied rewrites29.7%
Applied rewrites97.8%
Taylor expanded in maxCos around 0
Applied rewrites92.9%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (+ (- 1.0 ux) (* ux maxCos))) (t_1 (cos (* (* uy 2.0) (PI)))))
(if (<= (- 1.0 (* t_0 t_0)) 0.0002800000074785203)
(* t_1 (sqrt (* (- (- 3.0 (+ maxCos 1.0)) maxCos) ux)))
(* t_1 (sqrt (- 1.0 (* (- 1.0 (- ux (* maxCos ux))) (- 1.0 ux))))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - ux\right) + ux \cdot maxCos\\
t_1 := \cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right)\\
\mathbf{if}\;1 - t\_0 \cdot t\_0 \leq 0.0002800000074785203:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(\left(3 - \left(maxCos + 1\right)\right) - maxCos\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{1 - \left(1 - \left(ux - maxCos \cdot ux\right)\right) \cdot \left(1 - ux\right)}\\
\end{array}
\end{array}
if (-.f32 #s(literal 1 binary32) (*.f32 (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)) (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)))) < 2.80000007e-4Initial program 35.6%
lift-+.f32N/A
flip-+N/A
div-invN/A
lower-*.f32N/A
lower--.f32N/A
pow2N/A
lower-pow.f32N/A
pow2N/A
lower-pow.f32N/A
lift-*.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-/.f32N/A
lower--.f3234.9
lift-*.f32N/A
*-commutativeN/A
lower-*.f3234.9
Applied rewrites34.9%
Taylor expanded in ux around 0
*-commutativeN/A
lower-*.f32N/A
lower--.f32N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-+.f3293.0
Applied rewrites93.0%
if 2.80000007e-4 < (-.f32 #s(literal 1 binary32) (*.f32 (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)) (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)))) Initial program 89.2%
lift-+.f32N/A
lift--.f32N/A
associate-+l-N/A
lower--.f32N/A
lower--.f3289.4
lift-*.f32N/A
*-commutativeN/A
lower-*.f3289.4
Applied rewrites89.4%
Taylor expanded in maxCos around 0
lower--.f3285.7
Applied rewrites85.7%
Final simplification90.2%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (+ (- 1.0 ux) (* ux maxCos))) (t_1 (cos (* (* uy 2.0) (PI)))))
(if (<= (- 1.0 (* t_0 t_0)) 0.0002800000074785203)
(* t_1 (sqrt (* (- (- 3.0 (+ maxCos 1.0)) maxCos) ux)))
(* t_1 (sqrt (- 1.0 (* (- 1.0 ux) (- 1.0 ux))))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - ux\right) + ux \cdot maxCos\\
t_1 := \cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right)\\
\mathbf{if}\;1 - t\_0 \cdot t\_0 \leq 0.0002800000074785203:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(\left(3 - \left(maxCos + 1\right)\right) - maxCos\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{1 - \left(1 - ux\right) \cdot \left(1 - ux\right)}\\
\end{array}
\end{array}
if (-.f32 #s(literal 1 binary32) (*.f32 (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)) (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)))) < 2.80000007e-4Initial program 35.6%
lift-+.f32N/A
flip-+N/A
div-invN/A
lower-*.f32N/A
lower--.f32N/A
pow2N/A
lower-pow.f32N/A
pow2N/A
lower-pow.f32N/A
lift-*.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-/.f32N/A
lower--.f3234.9
lift-*.f32N/A
*-commutativeN/A
lower-*.f3234.9
Applied rewrites34.9%
Taylor expanded in ux around 0
*-commutativeN/A
lower-*.f32N/A
lower--.f32N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-+.f3293.0
Applied rewrites93.0%
if 2.80000007e-4 < (-.f32 #s(literal 1 binary32) (*.f32 (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)) (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)))) Initial program 89.2%
Taylor expanded in maxCos around 0
lower--.f3285.6
Applied rewrites85.6%
Taylor expanded in maxCos around 0
lower--.f3285.3
Applied rewrites85.3%
Final simplification90.0%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (+ (- 1.0 ux) (* ux maxCos))) (t_1 (cos (* (* uy 2.0) (PI)))))
(if (<= t_0 0.9998599886894226)
(* t_1 (sqrt (- 1.0 (* t_0 (- 1.0 ux)))))
(* t_1 (sqrt (* (- (- 3.0 (+ maxCos 1.0)) maxCos) ux))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 - ux\right) + ux \cdot maxCos\\
t_1 := \cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right)\\
\mathbf{if}\;t\_0 \leq 0.9998599886894226:\\
\;\;\;\;t\_1 \cdot \sqrt{1 - t\_0 \cdot \left(1 - ux\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(\left(3 - \left(maxCos + 1\right)\right) - maxCos\right) \cdot ux}\\
\end{array}
\end{array}
if (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)) < 0.999859989Initial program 89.2%
Taylor expanded in maxCos around 0
lower--.f3285.6
Applied rewrites85.6%
if 0.999859989 < (+.f32 (-.f32 #s(literal 1 binary32) ux) (*.f32 ux maxCos)) Initial program 35.6%
lift-+.f32N/A
flip-+N/A
div-invN/A
lower-*.f32N/A
lower--.f32N/A
pow2N/A
lower-pow.f32N/A
pow2N/A
lower-pow.f32N/A
lift-*.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-/.f32N/A
lower--.f3234.9
lift-*.f32N/A
*-commutativeN/A
lower-*.f3234.9
Applied rewrites34.9%
Taylor expanded in ux around 0
*-commutativeN/A
lower-*.f32N/A
lower--.f32N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-+.f3293.0
Applied rewrites93.0%
Final simplification90.2%
(FPCore (ux uy maxCos)
:precision binary32
(if (<= maxCos 2.8000000384054147e-5)
(* (cos (* (* uy 2.0) (PI))) (sqrt (* (* (- (/ 2.0 ux) 1.0) ux) ux)))
(*
(fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0)
(sqrt
(*
(*
(* maxCos maxCos)
(-
(- (/ 2.0 maxCos) (/ (- (/ 2.0 maxCos) (/ 2.0 (* maxCos maxCos))) ux))
(+ (/ 1.0 (* maxCos maxCos)) 1.0)))
(* ux ux))))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;maxCos \leq 2.8000000384054147 \cdot 10^{-5}:\\
\;\;\;\;\cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(\left(\frac{2}{ux} - 1\right) \cdot ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right) \cdot \sqrt{\left(\left(maxCos \cdot maxCos\right) \cdot \left(\left(\frac{2}{maxCos} - \frac{\frac{2}{maxCos} - \frac{2}{maxCos \cdot maxCos}}{ux}\right) - \left(\frac{1}{maxCos \cdot maxCos} + 1\right)\right)\right) \cdot \left(ux \cdot ux\right)}\\
\end{array}
\end{array}
if maxCos < 2.80000004e-5Initial program 56.2%
Taylor expanded in ux around inf
*-commutativeN/A
lower-*.f32N/A
associate--r+N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
div-subN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f32N/A
lower-/.f32N/A
+-commutativeN/A
lower-fma.f32N/A
lower-pow.f32N/A
lower--.f32N/A
unpow2N/A
lower-*.f3270.5
Applied rewrites70.5%
Applied rewrites98.7%
Taylor expanded in maxCos around 0
Applied rewrites97.9%
if 2.80000004e-5 < maxCos Initial program 56.2%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3250.9
Applied rewrites50.9%
Taylor expanded in maxCos around -inf
*-commutativeN/A
lower-*.f32N/A
Applied rewrites37.1%
Taylor expanded in ux around 0
Applied rewrites83.5%
Taylor expanded in ux around -inf
Applied rewrites86.6%
(FPCore (ux uy maxCos) :precision binary32 (if (<= (* uy 2.0) 0.0012000000569969416) (* (fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0) (sqrt (* (- 2.0 ux) ux))) (* (cos (* (* uy 2.0) (PI))) (sqrt (* (fma -2.0 maxCos 2.0) ux)))))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;uy \cdot 2 \leq 0.0012000000569969416:\\
\;\;\;\;\mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right) \cdot \sqrt{\left(2 - ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(-2, maxCos, 2\right) \cdot ux}\\
\end{array}
\end{array}
if (*.f32 uy #s(literal 2 binary32)) < 0.00120000006Initial program 56.4%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3256.1
Applied rewrites55.6%
Taylor expanded in ux around 0
*-commutativeN/A
associate--l+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f32N/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-pow.f32N/A
lower--.f3290.7
Applied rewrites90.2%
Taylor expanded in maxCos around 0
Applied rewrites90.2%
if 0.00120000006 < (*.f32 uy #s(literal 2 binary32)) Initial program 55.6%
Taylor expanded in ux around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f32N/A
+-commutativeN/A
lower-fma.f3217.3
Applied rewrites17.4%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0)))
(if (<= maxCos 1.0000000116860974e-7)
(* t_0 (sqrt (* (- 2.0 ux) ux)))
(*
t_0
(sqrt
(*
(*
(* maxCos maxCos)
(-
(-
(/ 2.0 maxCos)
(/ (- (/ 2.0 maxCos) (/ 2.0 (* maxCos maxCos))) ux))
(+ (/ 1.0 (* maxCos maxCos)) 1.0)))
(* ux ux)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\
\mathbf{if}\;maxCos \leq 1.0000000116860974 \cdot 10^{-7}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(2 - ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(\left(maxCos \cdot maxCos\right) \cdot \left(\left(\frac{2}{maxCos} - \frac{\frac{2}{maxCos} - \frac{2}{maxCos \cdot maxCos}}{ux}\right) - \left(\frac{1}{maxCos \cdot maxCos} + 1\right)\right)\right) \cdot \left(ux \cdot ux\right)}\\
\end{array}
\end{array}
if maxCos < 1.00000001e-7Initial program 55.9%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3247.8
Applied rewrites47.3%
Taylor expanded in ux around 0
*-commutativeN/A
associate--l+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f32N/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-pow.f32N/A
lower--.f3279.8
Applied rewrites79.8%
Taylor expanded in maxCos around 0
Applied rewrites79.8%
if 1.00000001e-7 < maxCos Initial program 57.4%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3249.3
Applied rewrites49.3%
Taylor expanded in maxCos around -inf
*-commutativeN/A
lower-*.f32N/A
Applied rewrites37.1%
Taylor expanded in ux around 0
Applied rewrites78.8%
Taylor expanded in ux around -inf
Applied rewrites78.9%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0)))
(if (<= maxCos 1.0000000116860974e-7)
(* t_0 (sqrt (* (- 2.0 ux) ux)))
(*
t_0
(sqrt
(*
(+
(/
(*
(- (- (/ 1.0 maxCos) 2.0) (/ (- (/ 2.0 maxCos) 2.0) ux))
(* ux ux))
maxCos)
(* ux ux))
(* (- maxCos) maxCos)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\
\mathbf{if}\;maxCos \leq 1.0000000116860974 \cdot 10^{-7}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(2 - ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(\frac{\left(\left(\frac{1}{maxCos} - 2\right) - \frac{\frac{2}{maxCos} - 2}{ux}\right) \cdot \left(ux \cdot ux\right)}{maxCos} + ux \cdot ux\right) \cdot \left(\left(-maxCos\right) \cdot maxCos\right)}\\
\end{array}
\end{array}
if maxCos < 1.00000001e-7Initial program 55.9%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3247.8
Applied rewrites47.3%
Taylor expanded in ux around 0
*-commutativeN/A
associate--l+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f32N/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-pow.f32N/A
lower--.f3279.8
Applied rewrites79.4%
Taylor expanded in maxCos around 0
Applied rewrites79.4%
if 1.00000001e-7 < maxCos Initial program 57.4%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3249.3
Applied rewrites49.3%
Taylor expanded in maxCos around -inf
*-commutativeN/A
lower-*.f32N/A
Applied rewrites37.1%
Taylor expanded in ux around inf
Applied rewrites78.8%
Final simplification80.0%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0)))
(if (<= maxCos 1.0000000116860974e-7)
(* t_0 (sqrt (* (- 2.0 ux) ux)))
(*
t_0
(sqrt
(*
(+
(/
(+ (/ (* (- ux 2.0) ux) maxCos) (* (* (+ -1.0 ux) ux) -2.0))
maxCos)
(* ux ux))
(* (- maxCos) maxCos)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\
\mathbf{if}\;maxCos \leq 1.0000000116860974 \cdot 10^{-7}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(2 - ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(\frac{\frac{\left(ux - 2\right) \cdot ux}{maxCos} + \left(\left(-1 + ux\right) \cdot ux\right) \cdot -2}{maxCos} + ux \cdot ux\right) \cdot \left(\left(-maxCos\right) \cdot maxCos\right)}\\
\end{array}
\end{array}
if maxCos < 1.00000001e-7Initial program 55.9%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3247.8
Applied rewrites47.3%
Taylor expanded in ux around 0
*-commutativeN/A
associate--l+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f32N/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-pow.f32N/A
lower--.f3279.8
Applied rewrites79.4%
Taylor expanded in maxCos around 0
Applied rewrites79.8%
if 1.00000001e-7 < maxCos Initial program 57.4%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3249.3
Applied rewrites49.3%
Taylor expanded in maxCos around -inf
*-commutativeN/A
lower-*.f32N/A
Applied rewrites38.6%
Taylor expanded in ux around 0
Applied rewrites78.8%
Final simplification80.0%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0)))
(if (<= maxCos 1.0000000116860974e-7)
(* t_0 (sqrt (* (- 2.0 ux) ux)))
(*
t_0
(sqrt
(*
(+ (/ (- (/ (* (- ux 2.0) ux) maxCos) (* -2.0 ux)) maxCos) (* ux ux))
(* (- maxCos) maxCos)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\
\mathbf{if}\;maxCos \leq 1.0000000116860974 \cdot 10^{-7}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(2 - ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(\frac{\frac{\left(ux - 2\right) \cdot ux}{maxCos} - -2 \cdot ux}{maxCos} + ux \cdot ux\right) \cdot \left(\left(-maxCos\right) \cdot maxCos\right)}\\
\end{array}
\end{array}
if maxCos < 1.00000001e-7Initial program 55.9%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3247.8
Applied rewrites47.3%
Taylor expanded in ux around 0
*-commutativeN/A
associate--l+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f32N/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-pow.f32N/A
lower--.f3279.8
Applied rewrites79.8%
Taylor expanded in maxCos around 0
Applied rewrites79.8%
if 1.00000001e-7 < maxCos Initial program 57.4%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3249.3
Applied rewrites49.3%
Taylor expanded in maxCos around -inf
*-commutativeN/A
lower-*.f32N/A
Applied rewrites37.1%
Taylor expanded in ux around 0
Applied rewrites80.7%
Taylor expanded in ux around 0
Applied rewrites62.9%
Final simplification76.8%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0)))
(if (<= maxCos 5.999999848427251e-5)
(* t_0 (sqrt (* (- 2.0 ux) ux)))
(*
t_0
(sqrt
(*
(* (- (/ 2.0 (* maxCos maxCos)) (/ 2.0 maxCos)) ux)
(* maxCos maxCos)))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\
\mathbf{if}\;maxCos \leq 5.999999848427251 \cdot 10^{-5}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(2 - ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(\left(\frac{2}{maxCos \cdot maxCos} - \frac{2}{maxCos}\right) \cdot ux\right) \cdot \left(maxCos \cdot maxCos\right)}\\
\end{array}
\end{array}
if maxCos < 5.99999985e-5Initial program 56.7%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3248.4
Applied rewrites47.9%
Taylor expanded in ux around 0
*-commutativeN/A
associate--l+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f32N/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-pow.f32N/A
lower--.f3278.6
Applied rewrites78.6%
Taylor expanded in maxCos around 0
Applied rewrites78.2%
if 5.99999985e-5 < maxCos Initial program 51.8%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3246.0
Applied rewrites46.0%
Taylor expanded in maxCos around -inf
*-commutativeN/A
lower-*.f32N/A
Applied rewrites32.3%
Taylor expanded in ux around 0
Applied rewrites82.0%
Taylor expanded in ux around 0
Applied rewrites73.1%
(FPCore (ux uy maxCos)
:precision binary32
(let* ((t_0 (fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0)))
(if (<= maxCos 5.999999848427251e-5)
(* t_0 (sqrt (* (- 2.0 ux) ux)))
(*
t_0
(sqrt
(*
(* (* maxCos maxCos) ux)
(- (/ 2.0 (* maxCos maxCos)) (/ 2.0 maxCos))))))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\
\mathbf{if}\;maxCos \leq 5.999999848427251 \cdot 10^{-5}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(2 - ux\right) \cdot ux}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sqrt{\left(\left(maxCos \cdot maxCos\right) \cdot ux\right) \cdot \left(\frac{2}{maxCos \cdot maxCos} - \frac{2}{maxCos}\right)}\\
\end{array}
\end{array}
if maxCos < 5.99999985e-5Initial program 56.7%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3248.4
Applied rewrites47.9%
Taylor expanded in ux around 0
*-commutativeN/A
associate--l+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f32N/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-pow.f32N/A
lower--.f3278.6
Applied rewrites78.6%
Taylor expanded in maxCos around 0
Applied rewrites78.2%
if 5.99999985e-5 < maxCos Initial program 51.8%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3246.0
Applied rewrites46.0%
Taylor expanded in maxCos around -inf
*-commutativeN/A
lower-*.f32N/A
Applied rewrites32.3%
Taylor expanded in ux around 0
Applied rewrites82.0%
Taylor expanded in ux around 0
Applied rewrites73.0%
(FPCore (ux uy maxCos) :precision binary32 (* (fma (* (* uy uy) -2.0) (* (PI) (PI)) 1.0) (sqrt (* (- 2.0 ux) ux))))
\begin{array}{l}
\\
\mathsf{fma}\left(\left(uy \cdot uy\right) \cdot -2, \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right) \cdot \sqrt{\left(2 - ux\right) \cdot ux}
\end{array}
Initial program 56.2%
Taylor expanded in uy around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
unpow2N/A
lower-*.f32N/A
lower-PI.f32N/A
lower-PI.f3248.1
Applied rewrites47.7%
Taylor expanded in ux around 0
*-commutativeN/A
associate--l+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-*.f32N/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
lower--.f32N/A
+-commutativeN/A
lower-fma.f32N/A
*-commutativeN/A
lower-*.f32N/A
lower-pow.f32N/A
lower--.f3274.7
Applied rewrites74.4%
Taylor expanded in maxCos around 0
Applied rewrites74.8%
herbie shell --seed 2024318
(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)))))))