UniformSampleCone, y

Percentage Accurate: 57.3% → 98.0%
Time: 16.8s
Alternatives: 10
Speedup: 5.0×

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\\ \sin \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))))
   (* (sin (* (* 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\\
\sin \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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 10 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 57.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(1 - ux\right) + ux \cdot maxCos\\ \sin \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))))
   (* (sin (* (* 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\\
\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - t\_0 \cdot t\_0}
\end{array}
\end{array}

Alternative 1: 98.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + \left(1 - maxCos\right) \cdot \left(maxCos \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)} \end{array} \]
(FPCore (ux uy maxCos)
 :precision binary32
 (*
  (sin (* (* uy 2.0) (PI)))
  (sqrt
   (*
    (* ux ux)
    (+
     (/ (+ 2.0 (* maxCos -2.0)) ux)
     (* (- 1.0 maxCos) (* maxCos (- (/ -1.0 maxCos) -1.0))))))))
\begin{array}{l}

\\
\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + \left(1 - maxCos\right) \cdot \left(maxCos \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 57.7%

    \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in maxCos around inf

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
  4. Step-by-step derivation
    1. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
    2. associate--l+N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \left(\frac{1}{maxCos} - \frac{ux}{maxCos}\right)\right)}\right)} \]
    3. div-subN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
    4. lower-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \frac{1 - ux}{maxCos}\right)}\right)} \]
    5. lower-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
    6. lower--.f3257.9

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \frac{\color{blue}{1 - ux}}{maxCos}\right)\right)} \]
  5. Applied rewrites57.9%

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(ux + \frac{1 - ux}{maxCos}\right)\right)}} \]
  6. Taylor expanded in ux around -inf

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
  7. Step-by-step derivation
    1. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
    2. unpow2N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    3. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    4. lower--.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
    5. lower-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux}} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    6. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    7. sub-negN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + \left(\mathsf{neg}\left(2\right)\right)\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    8. metadata-evalN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} + \color{blue}{-2}\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    9. lower-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + -2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    10. associate-*r/N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2 \cdot 1}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    11. metadata-evalN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{\color{blue}{2}}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    12. lower-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    13. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
    14. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \color{blue}{\left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
    15. lower-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\color{blue}{\left(1 + -1 \cdot maxCos\right)} \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    16. mul-1-negN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    17. lower-neg.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    18. sub-negN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{maxCos} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right)} \]
  8. Applied rewrites98.0%

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)}} \]
  9. Step-by-step derivation
    1. lift-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    2. +-commutativeN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(-2 + \frac{2}{maxCos}\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    3. distribute-rgt-inN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{-2 \cdot maxCos + \frac{2}{maxCos} \cdot maxCos}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    4. *-commutativeN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + \frac{2}{maxCos} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    5. lift-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\frac{2}{maxCos}} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    6. div-invN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\left(2 \cdot \frac{1}{maxCos}\right)} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    7. lift-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \left(2 \cdot \color{blue}{\frac{1}{maxCos}}\right) \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    8. associate-*l*N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2 \cdot \left(\frac{1}{maxCos} \cdot maxCos\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    9. lift-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{\frac{1}{maxCos}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    10. inv-powN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{{maxCos}^{-1}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    11. pow-plusN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{{maxCos}^{\left(-1 + 1\right)}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    12. metadata-evalN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot {maxCos}^{\color{blue}{0}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    13. metadata-evalN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{1}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    14. metadata-evalN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    15. lower-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    16. lower-*.f3298.2

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
  10. Applied rewrites98.2%

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
  11. Step-by-step derivation
    1. lift-neg.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    2. lift-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right)} \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    3. lift-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\color{blue}{\frac{1}{maxCos}} + -1\right)\right)\right)} \]
    4. lift-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{maxCos} + -1\right)}\right)\right)} \]
    5. lift-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \color{blue}{\left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)}\right)} \]
    6. *-commutativeN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \color{blue}{\left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right) \cdot maxCos}\right)} \]
    7. lift-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \color{blue}{\left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)} \cdot maxCos\right)} \]
    8. associate-*l*N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \color{blue}{\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\left(\frac{1}{maxCos} + -1\right) \cdot maxCos\right)}\right)} \]
    9. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \color{blue}{\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\left(\frac{1}{maxCos} + -1\right) \cdot maxCos\right)}\right)} \]
    10. lift-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \color{blue}{\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right)} \cdot \left(\left(\frac{1}{maxCos} + -1\right) \cdot maxCos\right)\right)} \]
    11. lift-neg.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\left(\frac{1}{maxCos} + -1\right) \cdot maxCos\right)\right)} \]
    12. unsub-negN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \color{blue}{\left(1 - maxCos\right)} \cdot \left(\left(\frac{1}{maxCos} + -1\right) \cdot maxCos\right)\right)} \]
    13. lower--.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \color{blue}{\left(1 - maxCos\right)} \cdot \left(\left(\frac{1}{maxCos} + -1\right) \cdot maxCos\right)\right)} \]
    14. lower-*.f3298.3

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \left(1 - maxCos\right) \cdot \color{blue}{\left(\left(\frac{1}{maxCos} + -1\right) \cdot maxCos\right)}\right)} \]
  12. Applied rewrites98.3%

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \color{blue}{\left(1 - maxCos\right) \cdot \left(\left(\frac{1}{maxCos} + -1\right) \cdot maxCos\right)}\right)} \]
  13. Final simplification98.3%

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + \left(1 - maxCos\right) \cdot \left(maxCos \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)} \]
  14. Add Preprocessing

Alternative 2: 96.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + -1\right)} \end{array} \]
(FPCore (ux uy maxCos)
 :precision binary32
 (*
  (sin (* (* uy 2.0) (PI)))
  (sqrt (* (* ux ux) (+ (/ (+ 2.0 (* maxCos -2.0)) ux) -1.0)))))
\begin{array}{l}

\\
\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + -1\right)}
\end{array}
Derivation
  1. Initial program 57.7%

    \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in maxCos around inf

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
  4. Step-by-step derivation
    1. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
    2. associate--l+N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \left(\frac{1}{maxCos} - \frac{ux}{maxCos}\right)\right)}\right)} \]
    3. div-subN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
    4. lower-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \frac{1 - ux}{maxCos}\right)}\right)} \]
    5. lower-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
    6. lower--.f3257.9

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \frac{\color{blue}{1 - ux}}{maxCos}\right)\right)} \]
  5. Applied rewrites57.9%

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(ux + \frac{1 - ux}{maxCos}\right)\right)}} \]
  6. Taylor expanded in ux around -inf

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
  7. Step-by-step derivation
    1. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
    2. unpow2N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    3. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    4. lower--.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
    5. lower-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux}} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    6. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    7. sub-negN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + \left(\mathsf{neg}\left(2\right)\right)\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    8. metadata-evalN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} + \color{blue}{-2}\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    9. lower-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + -2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    10. associate-*r/N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2 \cdot 1}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    11. metadata-evalN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{\color{blue}{2}}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    12. lower-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    13. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
    14. lower-*.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \color{blue}{\left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
    15. lower-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\color{blue}{\left(1 + -1 \cdot maxCos\right)} \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    16. mul-1-negN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    17. lower-neg.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
    18. sub-negN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{maxCos} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right)} \]
  8. Applied rewrites98.0%

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)}} \]
  9. Step-by-step derivation
    1. lift-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    2. +-commutativeN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(-2 + \frac{2}{maxCos}\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    3. distribute-rgt-inN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{-2 \cdot maxCos + \frac{2}{maxCos} \cdot maxCos}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    4. *-commutativeN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + \frac{2}{maxCos} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    5. lift-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\frac{2}{maxCos}} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    6. div-invN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\left(2 \cdot \frac{1}{maxCos}\right)} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    7. lift-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \left(2 \cdot \color{blue}{\frac{1}{maxCos}}\right) \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    8. associate-*l*N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2 \cdot \left(\frac{1}{maxCos} \cdot maxCos\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    9. lift-/.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{\frac{1}{maxCos}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    10. inv-powN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{{maxCos}^{-1}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    11. pow-plusN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{{maxCos}^{\left(-1 + 1\right)}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    12. metadata-evalN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot {maxCos}^{\color{blue}{0}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    13. metadata-evalN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{1}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    14. metadata-evalN/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    15. lower-+.f32N/A

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
    16. lower-*.f3298.2

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
  10. Applied rewrites98.2%

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
  11. Taylor expanded in maxCos around 0

    \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \color{blue}{1}\right)} \]
  12. Step-by-step derivation
    1. Applied rewrites96.6%

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - \color{blue}{1}\right)} \]
    2. Final simplification96.6%

      \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + -1\right)} \]
    3. Add Preprocessing

    Alternative 3: 95.7% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\\ \mathbf{if}\;uy \cdot 2 \leq 0.0008299999753944576:\\ \;\;\;\;t\_0 \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(ux \cdot \sin t\_0\right) \cdot \sqrt{-1 + \frac{2}{ux}}\\ \end{array} \end{array} \]
    (FPCore (ux uy maxCos)
     :precision binary32
     (let* ((t_0 (* 2.0 (* uy (PI)))))
       (if (<= (* uy 2.0) 0.0008299999753944576)
         (*
          t_0
          (sqrt
           (*
            (* ux ux)
            (+
             (/ (+ 2.0 (* maxCos -2.0)) ux)
             (* maxCos (* (- 1.0 maxCos) (- (/ -1.0 maxCos) -1.0)))))))
         (* (* ux (sin t_0)) (sqrt (+ -1.0 (/ 2.0 ux)))))))
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\\
    \mathbf{if}\;uy \cdot 2 \leq 0.0008299999753944576:\\
    \;\;\;\;t\_0 \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(ux \cdot \sin t\_0\right) \cdot \sqrt{-1 + \frac{2}{ux}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f32 uy #s(literal 2 binary32)) < 8.29999975e-4

      1. Initial program 58.6%

        \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in maxCos around inf

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
      4. Step-by-step derivation
        1. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
        2. associate--l+N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \left(\frac{1}{maxCos} - \frac{ux}{maxCos}\right)\right)}\right)} \]
        3. div-subN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
        4. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \frac{1 - ux}{maxCos}\right)}\right)} \]
        5. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
        6. lower--.f3258.7

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \frac{\color{blue}{1 - ux}}{maxCos}\right)\right)} \]
      5. Applied rewrites58.7%

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(ux + \frac{1 - ux}{maxCos}\right)\right)}} \]
      6. Taylor expanded in ux around -inf

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
      7. Step-by-step derivation
        1. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        2. unpow2N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        3. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        4. lower--.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        5. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux}} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        6. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        7. sub-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + \left(\mathsf{neg}\left(2\right)\right)\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        8. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} + \color{blue}{-2}\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        9. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + -2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        10. associate-*r/N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2 \cdot 1}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        11. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{\color{blue}{2}}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        12. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        13. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
        14. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \color{blue}{\left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
        15. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\color{blue}{\left(1 + -1 \cdot maxCos\right)} \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        16. mul-1-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        17. lower-neg.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        18. sub-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{maxCos} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right)} \]
      8. Applied rewrites97.9%

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)}} \]
      9. Step-by-step derivation
        1. lift-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        2. +-commutativeN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(-2 + \frac{2}{maxCos}\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        3. distribute-rgt-inN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{-2 \cdot maxCos + \frac{2}{maxCos} \cdot maxCos}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        4. *-commutativeN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + \frac{2}{maxCos} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        5. lift-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\frac{2}{maxCos}} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        6. div-invN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\left(2 \cdot \frac{1}{maxCos}\right)} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        7. lift-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \left(2 \cdot \color{blue}{\frac{1}{maxCos}}\right) \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        8. associate-*l*N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2 \cdot \left(\frac{1}{maxCos} \cdot maxCos\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        9. lift-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{\frac{1}{maxCos}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        10. inv-powN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{{maxCos}^{-1}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        11. pow-plusN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{{maxCos}^{\left(-1 + 1\right)}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        12. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot {maxCos}^{\color{blue}{0}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        13. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{1}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        14. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        15. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        16. lower-*.f3298.4

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
      10. Applied rewrites98.4%

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
      11. Taylor expanded in uy around 0

        \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
      12. Step-by-step derivation
        1. lower-*.f32N/A

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        2. lower-*.f32N/A

          \[\leadsto \left(2 \cdot \color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        3. lower-PI.f3297.8

          \[\leadsto \left(2 \cdot \left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
      13. Applied rewrites97.8%

        \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]

      if 8.29999975e-4 < (*.f32 uy #s(literal 2 binary32))

      1. Initial program 55.8%

        \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in maxCos around inf

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
      4. Step-by-step derivation
        1. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
        2. associate--l+N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \left(\frac{1}{maxCos} - \frac{ux}{maxCos}\right)\right)}\right)} \]
        3. div-subN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
        4. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \frac{1 - ux}{maxCos}\right)}\right)} \]
        5. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
        6. lower--.f3256.2

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \frac{\color{blue}{1 - ux}}{maxCos}\right)\right)} \]
      5. Applied rewrites56.2%

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(ux + \frac{1 - ux}{maxCos}\right)\right)}} \]
      6. Taylor expanded in ux around -inf

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
      7. Step-by-step derivation
        1. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        2. unpow2N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        3. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        4. lower--.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        5. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux}} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        6. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        7. sub-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + \left(\mathsf{neg}\left(2\right)\right)\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        8. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} + \color{blue}{-2}\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        9. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + -2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        10. associate-*r/N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2 \cdot 1}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        11. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{\color{blue}{2}}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        12. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        13. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
        14. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \color{blue}{\left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
        15. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\color{blue}{\left(1 + -1 \cdot maxCos\right)} \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        16. mul-1-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        17. lower-neg.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        18. sub-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{maxCos} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right)} \]
      8. Applied rewrites98.2%

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)}} \]
      9. Taylor expanded in maxCos around 0

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{1}\right)} \]
      10. Step-by-step derivation
        1. Applied rewrites97.7%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{1}\right)} \]
        2. Taylor expanded in maxCos around 0

          \[\leadsto \color{blue}{\left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sqrt{2 \cdot \frac{1}{ux} - 1}} \]
        3. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sqrt{2 \cdot \frac{1}{ux} - 1}} \]
          2. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \sqrt{2 \cdot \frac{1}{ux} - 1} \]
          3. lower-sin.f32N/A

            \[\leadsto \left(ux \cdot \color{blue}{\sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \cdot \sqrt{2 \cdot \frac{1}{ux} - 1} \]
          4. lower-*.f32N/A

            \[\leadsto \left(ux \cdot \sin \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \cdot \sqrt{2 \cdot \frac{1}{ux} - 1} \]
          5. lower-*.f32N/A

            \[\leadsto \left(ux \cdot \sin \left(2 \cdot \color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \cdot \sqrt{2 \cdot \frac{1}{ux} - 1} \]
          6. lower-PI.f32N/A

            \[\leadsto \left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \cdot \sqrt{2 \cdot \frac{1}{ux} - 1} \]
          7. lower-sqrt.f32N/A

            \[\leadsto \left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \frac{1}{ux} - 1}} \]
          8. sub-negN/A

            \[\leadsto \left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \frac{1}{ux} + \left(\mathsf{neg}\left(1\right)\right)}} \]
          9. metadata-evalN/A

            \[\leadsto \left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sqrt{2 \cdot \frac{1}{ux} + \color{blue}{-1}} \]
          10. lower-+.f32N/A

            \[\leadsto \left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \frac{1}{ux} + -1}} \]
          11. associate-*r/N/A

            \[\leadsto \left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sqrt{\color{blue}{\frac{2 \cdot 1}{ux}} + -1} \]
          12. metadata-evalN/A

            \[\leadsto \left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sqrt{\frac{\color{blue}{2}}{ux} + -1} \]
          13. lower-/.f3293.9

            \[\leadsto \left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sqrt{\color{blue}{\frac{2}{ux}} + -1} \]
        4. Applied rewrites93.9%

          \[\leadsto \color{blue}{\left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sqrt{\frac{2}{ux} + -1}} \]
      11. Recombined 2 regimes into one program.
      12. Final simplification96.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;uy \cdot 2 \leq 0.0008299999753944576:\\ \;\;\;\;\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(ux \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sqrt{-1 + \frac{2}{ux}}\\ \end{array} \]
      13. Add Preprocessing

      Alternative 4: 95.7% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;uy \cdot 2 \leq 0.0008299999753944576:\\ \;\;\;\;\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(ux \cdot \sqrt{-1 + \frac{2}{ux}}\right)\\ \end{array} \end{array} \]
      (FPCore (ux uy maxCos)
       :precision binary32
       (if (<= (* uy 2.0) 0.0008299999753944576)
         (*
          (* 2.0 (* uy (PI)))
          (sqrt
           (*
            (* ux ux)
            (+
             (/ (+ 2.0 (* maxCos -2.0)) ux)
             (* maxCos (* (- 1.0 maxCos) (- (/ -1.0 maxCos) -1.0)))))))
         (* (sin (* (* uy 2.0) (PI))) (* ux (sqrt (+ -1.0 (/ 2.0 ux)))))))
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;uy \cdot 2 \leq 0.0008299999753944576:\\
      \;\;\;\;\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(ux \cdot \sqrt{-1 + \frac{2}{ux}}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f32 uy #s(literal 2 binary32)) < 8.29999975e-4

        1. Initial program 58.6%

          \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in maxCos around inf

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
        4. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
          2. associate--l+N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \left(\frac{1}{maxCos} - \frac{ux}{maxCos}\right)\right)}\right)} \]
          3. div-subN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
          4. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \frac{1 - ux}{maxCos}\right)}\right)} \]
          5. lower-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
          6. lower--.f3258.7

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \frac{\color{blue}{1 - ux}}{maxCos}\right)\right)} \]
        5. Applied rewrites58.7%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(ux + \frac{1 - ux}{maxCos}\right)\right)}} \]
        6. Taylor expanded in ux around -inf

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        7. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
          2. unpow2N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          3. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          4. lower--.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
          5. lower-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux}} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          6. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          7. sub-negN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + \left(\mathsf{neg}\left(2\right)\right)\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          8. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} + \color{blue}{-2}\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          9. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + -2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          10. associate-*r/N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2 \cdot 1}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          11. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{\color{blue}{2}}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          12. lower-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          13. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
          14. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \color{blue}{\left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
          15. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\color{blue}{\left(1 + -1 \cdot maxCos\right)} \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          16. mul-1-negN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          17. lower-neg.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          18. sub-negN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{maxCos} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right)} \]
        8. Applied rewrites97.9%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)}} \]
        9. Step-by-step derivation
          1. lift-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(-2 + \frac{2}{maxCos}\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          3. distribute-rgt-inN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{-2 \cdot maxCos + \frac{2}{maxCos} \cdot maxCos}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          4. *-commutativeN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + \frac{2}{maxCos} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          5. lift-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\frac{2}{maxCos}} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          6. div-invN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\left(2 \cdot \frac{1}{maxCos}\right)} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          7. lift-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \left(2 \cdot \color{blue}{\frac{1}{maxCos}}\right) \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          8. associate-*l*N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2 \cdot \left(\frac{1}{maxCos} \cdot maxCos\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          9. lift-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{\frac{1}{maxCos}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          10. inv-powN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{{maxCos}^{-1}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          11. pow-plusN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{{maxCos}^{\left(-1 + 1\right)}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          12. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot {maxCos}^{\color{blue}{0}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          13. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{1}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          14. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          15. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          16. lower-*.f3298.4

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        10. Applied rewrites98.4%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        11. Taylor expanded in uy around 0

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        12. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          2. lower-*.f32N/A

            \[\leadsto \left(2 \cdot \color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          3. lower-PI.f3297.8

            \[\leadsto \left(2 \cdot \left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        13. Applied rewrites97.8%

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]

        if 8.29999975e-4 < (*.f32 uy #s(literal 2 binary32))

        1. Initial program 55.8%

          \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in maxCos around inf

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
        4. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
          2. associate--l+N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \left(\frac{1}{maxCos} - \frac{ux}{maxCos}\right)\right)}\right)} \]
          3. div-subN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
          4. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \frac{1 - ux}{maxCos}\right)}\right)} \]
          5. lower-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
          6. lower--.f3256.2

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \frac{\color{blue}{1 - ux}}{maxCos}\right)\right)} \]
        5. Applied rewrites56.2%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(ux + \frac{1 - ux}{maxCos}\right)\right)}} \]
        6. Taylor expanded in ux around -inf

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        7. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
          2. unpow2N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          3. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          4. lower--.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
          5. lower-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux}} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          6. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          7. sub-negN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + \left(\mathsf{neg}\left(2\right)\right)\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          8. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} + \color{blue}{-2}\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          9. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + -2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          10. associate-*r/N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2 \cdot 1}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          11. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{\color{blue}{2}}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          12. lower-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          13. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
          14. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \color{blue}{\left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
          15. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\color{blue}{\left(1 + -1 \cdot maxCos\right)} \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          16. mul-1-negN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          17. lower-neg.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          18. sub-negN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{maxCos} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right)} \]
        8. Applied rewrites98.2%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)}} \]
        9. Taylor expanded in maxCos around 0

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(ux \cdot \sqrt{2 \cdot \frac{1}{ux} - 1}\right)} \]
        10. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(ux \cdot \sqrt{2 \cdot \frac{1}{ux} - 1}\right)} \]
          2. lower-sqrt.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(ux \cdot \color{blue}{\sqrt{2 \cdot \frac{1}{ux} - 1}}\right) \]
          3. sub-negN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(ux \cdot \sqrt{\color{blue}{2 \cdot \frac{1}{ux} + \left(\mathsf{neg}\left(1\right)\right)}}\right) \]
          4. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(ux \cdot \sqrt{2 \cdot \frac{1}{ux} + \color{blue}{-1}}\right) \]
          5. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(ux \cdot \sqrt{\color{blue}{2 \cdot \frac{1}{ux} + -1}}\right) \]
          6. associate-*r/N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(ux \cdot \sqrt{\color{blue}{\frac{2 \cdot 1}{ux}} + -1}\right) \]
          7. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(ux \cdot \sqrt{\frac{\color{blue}{2}}{ux} + -1}\right) \]
          8. lower-/.f3293.8

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(ux \cdot \sqrt{\color{blue}{\frac{2}{ux}} + -1}\right) \]
        11. Applied rewrites93.8%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(ux \cdot \sqrt{\frac{2}{ux} + -1}\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification96.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;uy \cdot 2 \leq 0.0008299999753944576:\\ \;\;\;\;\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(ux \cdot \sqrt{-1 + \frac{2}{ux}}\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 5: 89.5% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\\ \mathbf{if}\;uy \cdot 2 \leq 0.006000000052154064:\\ \;\;\;\;t\_0 \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin t\_0 \cdot \sqrt{ux \cdot \left(2 - maxCos\right)}\\ \end{array} \end{array} \]
      (FPCore (ux uy maxCos)
       :precision binary32
       (let* ((t_0 (* 2.0 (* uy (PI)))))
         (if (<= (* uy 2.0) 0.006000000052154064)
           (*
            t_0
            (sqrt
             (*
              (* ux ux)
              (+
               (/ (+ 2.0 (* maxCos -2.0)) ux)
               (* maxCos (* (- 1.0 maxCos) (- (/ -1.0 maxCos) -1.0)))))))
           (* (sin t_0) (sqrt (* ux (- 2.0 maxCos)))))))
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := 2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\\
      \mathbf{if}\;uy \cdot 2 \leq 0.006000000052154064:\\
      \;\;\;\;t\_0 \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin t\_0 \cdot \sqrt{ux \cdot \left(2 - maxCos\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f32 uy #s(literal 2 binary32)) < 0.00600000005

        1. Initial program 59.5%

          \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in maxCos around inf

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
        4. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
          2. associate--l+N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \left(\frac{1}{maxCos} - \frac{ux}{maxCos}\right)\right)}\right)} \]
          3. div-subN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
          4. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \frac{1 - ux}{maxCos}\right)}\right)} \]
          5. lower-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
          6. lower--.f3259.8

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \frac{\color{blue}{1 - ux}}{maxCos}\right)\right)} \]
        5. Applied rewrites59.8%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(ux + \frac{1 - ux}{maxCos}\right)\right)}} \]
        6. Taylor expanded in ux around -inf

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        7. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
          2. unpow2N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          3. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          4. lower--.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
          5. lower-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux}} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          6. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          7. sub-negN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + \left(\mathsf{neg}\left(2\right)\right)\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          8. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} + \color{blue}{-2}\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          9. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + -2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          10. associate-*r/N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2 \cdot 1}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          11. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{\color{blue}{2}}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          12. lower-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          13. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
          14. lower-*.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \color{blue}{\left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
          15. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\color{blue}{\left(1 + -1 \cdot maxCos\right)} \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          16. mul-1-negN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          17. lower-neg.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
          18. sub-negN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{maxCos} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right)} \]
        8. Applied rewrites98.0%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)}} \]
        9. Step-by-step derivation
          1. lift-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(-2 + \frac{2}{maxCos}\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          3. distribute-rgt-inN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{-2 \cdot maxCos + \frac{2}{maxCos} \cdot maxCos}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          4. *-commutativeN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + \frac{2}{maxCos} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          5. lift-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\frac{2}{maxCos}} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          6. div-invN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\left(2 \cdot \frac{1}{maxCos}\right)} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          7. lift-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \left(2 \cdot \color{blue}{\frac{1}{maxCos}}\right) \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          8. associate-*l*N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2 \cdot \left(\frac{1}{maxCos} \cdot maxCos\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          9. lift-/.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{\frac{1}{maxCos}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          10. inv-powN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{{maxCos}^{-1}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          11. pow-plusN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{{maxCos}^{\left(-1 + 1\right)}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          12. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot {maxCos}^{\color{blue}{0}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          13. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{1}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          14. metadata-evalN/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          15. lower-+.f32N/A

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          16. lower-*.f3298.3

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        10. Applied rewrites98.3%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        11. Taylor expanded in uy around 0

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        12. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          2. lower-*.f32N/A

            \[\leadsto \left(2 \cdot \color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
          3. lower-PI.f3295.9

            \[\leadsto \left(2 \cdot \left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        13. Applied rewrites95.9%

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]

        if 0.00600000005 < (*.f32 uy #s(literal 2 binary32))

        1. Initial program 52.4%

          \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in maxCos around 0

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \color{blue}{\left(1 - ux\right)} \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
        4. Step-by-step derivation
          1. lower--.f3251.4

            \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \color{blue}{\left(1 - ux\right)} \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
        5. Applied rewrites51.4%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \color{blue}{\left(1 - ux\right)} \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
        6. Taylor expanded in ux around 0

          \[\leadsto \color{blue}{\sqrt{ux \cdot \left(2 - maxCos\right)} \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        7. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \color{blue}{\sqrt{ux \cdot \left(2 - maxCos\right)} \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \]
          2. lower-sqrt.f32N/A

            \[\leadsto \color{blue}{\sqrt{ux \cdot \left(2 - maxCos\right)}} \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \]
          3. sub-negN/A

            \[\leadsto \sqrt{ux \cdot \color{blue}{\left(2 + \left(\mathsf{neg}\left(maxCos\right)\right)\right)}} \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \]
          4. mul-1-negN/A

            \[\leadsto \sqrt{ux \cdot \left(2 + \color{blue}{-1 \cdot maxCos}\right)} \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \]
          5. lower-*.f32N/A

            \[\leadsto \sqrt{\color{blue}{ux \cdot \left(2 + -1 \cdot maxCos\right)}} \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \]
          6. mul-1-negN/A

            \[\leadsto \sqrt{ux \cdot \left(2 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right)} \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \]
          7. sub-negN/A

            \[\leadsto \sqrt{ux \cdot \color{blue}{\left(2 - maxCos\right)}} \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \]
          8. lower--.f32N/A

            \[\leadsto \sqrt{ux \cdot \color{blue}{\left(2 - maxCos\right)}} \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \]
          9. lower-sin.f32N/A

            \[\leadsto \sqrt{ux \cdot \left(2 - maxCos\right)} \cdot \color{blue}{\sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \]
          10. lower-*.f32N/A

            \[\leadsto \sqrt{ux \cdot \left(2 - maxCos\right)} \cdot \sin \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \]
          11. lower-*.f32N/A

            \[\leadsto \sqrt{ux \cdot \left(2 - maxCos\right)} \cdot \sin \left(2 \cdot \color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)}\right) \]
          12. lower-PI.f3278.9

            \[\leadsto \sqrt{ux \cdot \left(2 - maxCos\right)} \cdot \sin \left(2 \cdot \left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
        8. Applied rewrites78.9%

          \[\leadsto \color{blue}{\sqrt{ux \cdot \left(2 - maxCos\right)} \cdot \sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification91.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;uy \cdot 2 \leq 0.006000000052154064:\\ \;\;\;\;\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{ux \cdot \left(2 - maxCos\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 6: 81.3% accurate, 1.8× speedup?

      \[\begin{array}{l} \\ \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)} \end{array} \]
      (FPCore (ux uy maxCos)
       :precision binary32
       (*
        (* 2.0 (* uy (PI)))
        (sqrt
         (*
          (* ux ux)
          (+
           (/ (+ 2.0 (* maxCos -2.0)) ux)
           (* maxCos (* (- 1.0 maxCos) (- (/ -1.0 maxCos) -1.0))))))))
      \begin{array}{l}
      
      \\
      \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)}
      \end{array}
      
      Derivation
      1. Initial program 57.7%

        \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in maxCos around inf

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
      4. Step-by-step derivation
        1. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
        2. associate--l+N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \left(\frac{1}{maxCos} - \frac{ux}{maxCos}\right)\right)}\right)} \]
        3. div-subN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
        4. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \frac{1 - ux}{maxCos}\right)}\right)} \]
        5. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
        6. lower--.f3257.9

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \frac{\color{blue}{1 - ux}}{maxCos}\right)\right)} \]
      5. Applied rewrites57.9%

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(ux + \frac{1 - ux}{maxCos}\right)\right)}} \]
      6. Taylor expanded in ux around -inf

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
      7. Step-by-step derivation
        1. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        2. unpow2N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        3. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        4. lower--.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        5. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux}} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        6. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        7. sub-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + \left(\mathsf{neg}\left(2\right)\right)\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        8. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} + \color{blue}{-2}\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        9. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + -2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        10. associate-*r/N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2 \cdot 1}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        11. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{\color{blue}{2}}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        12. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        13. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
        14. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \color{blue}{\left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
        15. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\color{blue}{\left(1 + -1 \cdot maxCos\right)} \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        16. mul-1-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        17. lower-neg.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        18. sub-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{maxCos} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right)} \]
      8. Applied rewrites98.0%

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)}} \]
      9. Step-by-step derivation
        1. lift-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        2. +-commutativeN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(-2 + \frac{2}{maxCos}\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        3. distribute-rgt-inN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{-2 \cdot maxCos + \frac{2}{maxCos} \cdot maxCos}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        4. *-commutativeN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + \frac{2}{maxCos} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        5. lift-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\frac{2}{maxCos}} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        6. div-invN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{\left(2 \cdot \frac{1}{maxCos}\right)} \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        7. lift-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \left(2 \cdot \color{blue}{\frac{1}{maxCos}}\right) \cdot maxCos}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        8. associate-*l*N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2 \cdot \left(\frac{1}{maxCos} \cdot maxCos\right)}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        9. lift-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{\frac{1}{maxCos}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        10. inv-powN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \left(\color{blue}{{maxCos}^{-1}} \cdot maxCos\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        11. pow-plusN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{{maxCos}^{\left(-1 + 1\right)}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        12. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot {maxCos}^{\color{blue}{0}}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        13. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2 \cdot \color{blue}{1}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        14. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + \color{blue}{2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        15. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        16. lower-*.f3298.2

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2} + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
      10. Applied rewrites98.2%

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot -2 + 2}}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
      11. Taylor expanded in uy around 0

        \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
      12. Step-by-step derivation
        1. lower-*.f32N/A

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        2. lower-*.f32N/A

          \[\leadsto \left(2 \cdot \color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
        3. lower-PI.f3283.2

          \[\leadsto \left(2 \cdot \left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
      13. Applied rewrites83.2%

        \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot -2 + 2}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)} \]
      14. Final simplification83.2%

        \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{2 + maxCos \cdot -2}{ux} + maxCos \cdot \left(\left(1 - maxCos\right) \cdot \left(\frac{-1}{maxCos} - -1\right)\right)\right)} \]
      15. Add Preprocessing

      Alternative 7: 80.2% accurate, 2.3× speedup?

      \[\begin{array}{l} \\ \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(-1 + \frac{maxCos \cdot \left(-2 + \frac{2}{maxCos}\right)}{ux}\right)} \end{array} \]
      (FPCore (ux uy maxCos)
       :precision binary32
       (*
        (* 2.0 (* uy (PI)))
        (sqrt (* (* ux ux) (+ -1.0 (/ (* maxCos (+ -2.0 (/ 2.0 maxCos))) ux))))))
      \begin{array}{l}
      
      \\
      \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(-1 + \frac{maxCos \cdot \left(-2 + \frac{2}{maxCos}\right)}{ux}\right)}
      \end{array}
      
      Derivation
      1. Initial program 57.7%

        \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in maxCos around inf

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
      4. Step-by-step derivation
        1. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(\left(ux + \frac{1}{maxCos}\right) - \frac{ux}{maxCos}\right)\right)}} \]
        2. associate--l+N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \left(\frac{1}{maxCos} - \frac{ux}{maxCos}\right)\right)}\right)} \]
        3. div-subN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
        4. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \color{blue}{\left(ux + \frac{1 - ux}{maxCos}\right)}\right)} \]
        5. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \color{blue}{\frac{1 - ux}{maxCos}}\right)\right)} \]
        6. lower--.f3257.9

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(maxCos \cdot \left(ux + \frac{\color{blue}{1 - ux}}{maxCos}\right)\right)} \]
      5. Applied rewrites57.9%

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \color{blue}{\left(maxCos \cdot \left(ux + \frac{1 - ux}{maxCos}\right)\right)}} \]
      6. Taylor expanded in ux around -inf

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
      7. Step-by-step derivation
        1. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        2. unpow2N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        3. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        4. lower--.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)}} \]
        5. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}{ux}} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        6. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} - 2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        7. sub-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + \left(\mathsf{neg}\left(2\right)\right)\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        8. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(2 \cdot \frac{1}{maxCos} + \color{blue}{-2}\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        9. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \color{blue}{\left(2 \cdot \frac{1}{maxCos} + -2\right)}}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        10. associate-*r/N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2 \cdot 1}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        11. metadata-evalN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{\color{blue}{2}}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        12. lower-/.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\color{blue}{\frac{2}{maxCos}} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        13. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{maxCos \cdot \left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
        14. lower-*.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \color{blue}{\left(\left(1 + -1 \cdot maxCos\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)}\right)} \]
        15. lower-+.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\color{blue}{\left(1 + -1 \cdot maxCos\right)} \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        16. mul-1-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        17. lower-neg.f32N/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \color{blue}{\left(\mathsf{neg}\left(maxCos\right)\right)}\right) \cdot \left(\frac{1}{maxCos} - 1\right)\right)\right)} \]
        18. sub-negN/A

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(\mathsf{neg}\left(maxCos\right)\right)\right) \cdot \color{blue}{\left(\frac{1}{maxCos} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right)\right)} \]
      8. Applied rewrites98.0%

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - maxCos \cdot \left(\left(1 + \left(-maxCos\right)\right) \cdot \left(\frac{1}{maxCos} + -1\right)\right)\right)}} \]
      9. Taylor expanded in maxCos around 0

        \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{1}\right)} \]
      10. Step-by-step derivation
        1. Applied rewrites96.3%

          \[\leadsto \sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - \color{blue}{1}\right)} \]
        2. Taylor expanded in uy around 0

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - 1\right)} \]
        3. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - 1\right)} \]
          2. lower-*.f32N/A

            \[\leadsto \left(2 \cdot \color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - 1\right)} \]
          3. lower-PI.f3281.5

            \[\leadsto \left(2 \cdot \left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - 1\right)} \]
        4. Applied rewrites81.5%

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{maxCos \cdot \left(\frac{2}{maxCos} + -2\right)}{ux} - 1\right)} \]
        5. Final simplification81.5%

          \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(-1 + \frac{maxCos \cdot \left(-2 + \frac{2}{maxCos}\right)}{ux}\right)} \]
        6. Add Preprocessing

        Alternative 8: 77.2% accurate, 3.1× speedup?

        \[\begin{array}{l} \\ \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(-1 + \frac{2}{ux}\right)} \end{array} \]
        (FPCore (ux uy maxCos)
         :precision binary32
         (* (* 2.0 (* uy (PI))) (sqrt (* (* ux ux) (+ -1.0 (/ 2.0 ux))))))
        \begin{array}{l}
        
        \\
        \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(-1 + \frac{2}{ux}\right)}
        \end{array}
        
        Derivation
        1. Initial program 57.7%

          \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in uy around 0

          \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right)} \]
        4. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right)} \]
          2. lower-*.f32N/A

            \[\leadsto 2 \cdot \color{blue}{\left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right)} \]
          3. lower-*.f32N/A

            \[\leadsto 2 \cdot \left(\color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)} \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right) \]
          4. lower-PI.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right) \]
          5. lower-sqrt.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}}\right) \]
          6. sub-negN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{1 + \left(\mathsf{neg}\left({\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}\right)\right)}}\right) \]
          7. +-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left({\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}\right)\right) + 1}}\right) \]
          8. unpow2N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(\mathsf{neg}\left(\color{blue}{\left(\left(1 + maxCos \cdot ux\right) - ux\right) \cdot \left(\left(1 + maxCos \cdot ux\right) - ux\right)}\right)\right) + 1}\right) \]
          9. distribute-rgt-neg-inN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(\left(1 + maxCos \cdot ux\right) - ux\right) \cdot \left(\mathsf{neg}\left(\left(\left(1 + maxCos \cdot ux\right) - ux\right)\right)\right)} + 1}\right) \]
          10. lower-fma.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\mathsf{fma}\left(\left(1 + maxCos \cdot ux\right) - ux, \mathsf{neg}\left(\left(\left(1 + maxCos \cdot ux\right) - ux\right)\right), 1\right)}}\right) \]
        5. Applied rewrites31.2%

          \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1 - ux\right), \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right)} \]
        6. Step-by-step derivation
          1. lift--.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(ux \cdot maxCos + \color{blue}{\left(1 - ux\right)}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          2. lift-*.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{ux \cdot maxCos} + \left(1 - ux\right), \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          3. +-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\left(1 - ux\right) + ux \cdot maxCos}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          4. lift-+.f3220.5

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\left(1 - ux\right) + ux \cdot maxCos}, \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right) \]
          5. lift-*.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\left(1 - ux\right) + \color{blue}{ux \cdot maxCos}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          6. *-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\left(1 - ux\right) + \color{blue}{maxCos \cdot ux}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          7. lower-*.f3220.5

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\left(1 - ux\right) + \color{blue}{maxCos \cdot ux}, \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right) \]
        7. Applied rewrites20.5%

          \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\left(1 - ux\right) + maxCos \cdot ux}, \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right) \]
        8. Taylor expanded in maxCos around 0

          \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}\right)} \]
        9. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}} \]
          2. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}} \]
          3. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)} \]
          4. lower-*.f32N/A

            \[\leadsto \left(2 \cdot \color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)} \]
          5. lower-PI.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)} \]
          6. lower-sqrt.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}} \]
          7. +-commutativeN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{\left(1 - ux\right) \cdot \left(ux - 1\right) + 1}} \]
          8. lower-fma.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{\mathsf{fma}\left(1 - ux, ux - 1, 1\right)}} \]
          9. lower--.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{1 - ux}, ux - 1, 1\right)} \]
          10. sub-negN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, \color{blue}{ux + \left(\mathsf{neg}\left(1\right)\right)}, 1\right)} \]
          11. metadata-evalN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, ux + \color{blue}{-1}, 1\right)} \]
          12. lower-+.f3220.4

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, \color{blue}{ux + -1}, 1\right)} \]
        10. Applied rewrites20.4%

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, ux + -1, 1\right)}} \]
        11. Taylor expanded in ux around inf

          \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(2 \cdot \frac{1}{ux} - 1\right)}} \]
        12. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{{ux}^{2} \cdot \left(2 \cdot \frac{1}{ux} - 1\right)}} \]
          2. unpow2N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(2 \cdot \frac{1}{ux} - 1\right)} \]
          3. lower-*.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right)} \cdot \left(2 \cdot \frac{1}{ux} - 1\right)} \]
          4. sub-negN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(2 \cdot \frac{1}{ux} + \left(\mathsf{neg}\left(1\right)\right)\right)}} \]
          5. metadata-evalN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(2 \cdot \frac{1}{ux} + \color{blue}{-1}\right)} \]
          6. lower-+.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \color{blue}{\left(2 \cdot \frac{1}{ux} + -1\right)}} \]
          7. associate-*r/N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{2 \cdot 1}{ux}} + -1\right)} \]
          8. metadata-evalN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\frac{\color{blue}{2}}{ux} + -1\right)} \]
          9. lower-/.f3278.6

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(\color{blue}{\frac{2}{ux}} + -1\right)} \]
        13. Applied rewrites78.6%

          \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{\left(ux \cdot ux\right) \cdot \left(\frac{2}{ux} + -1\right)}} \]
        14. Final simplification78.6%

          \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\left(ux \cdot ux\right) \cdot \left(-1 + \frac{2}{ux}\right)} \]
        15. Add Preprocessing

        Alternative 9: 77.2% accurate, 4.6× speedup?

        \[\begin{array}{l} \\ \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{ux \cdot \left(2 - ux\right)} \end{array} \]
        (FPCore (ux uy maxCos)
         :precision binary32
         (* (* 2.0 (* uy (PI))) (sqrt (* ux (- 2.0 ux)))))
        \begin{array}{l}
        
        \\
        \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{ux \cdot \left(2 - ux\right)}
        \end{array}
        
        Derivation
        1. Initial program 57.7%

          \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in uy around 0

          \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right)} \]
        4. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right)} \]
          2. lower-*.f32N/A

            \[\leadsto 2 \cdot \color{blue}{\left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right)} \]
          3. lower-*.f32N/A

            \[\leadsto 2 \cdot \left(\color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)} \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right) \]
          4. lower-PI.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right) \]
          5. lower-sqrt.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}}\right) \]
          6. sub-negN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{1 + \left(\mathsf{neg}\left({\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}\right)\right)}}\right) \]
          7. +-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left({\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}\right)\right) + 1}}\right) \]
          8. unpow2N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(\mathsf{neg}\left(\color{blue}{\left(\left(1 + maxCos \cdot ux\right) - ux\right) \cdot \left(\left(1 + maxCos \cdot ux\right) - ux\right)}\right)\right) + 1}\right) \]
          9. distribute-rgt-neg-inN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(\left(1 + maxCos \cdot ux\right) - ux\right) \cdot \left(\mathsf{neg}\left(\left(\left(1 + maxCos \cdot ux\right) - ux\right)\right)\right)} + 1}\right) \]
          10. lower-fma.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\mathsf{fma}\left(\left(1 + maxCos \cdot ux\right) - ux, \mathsf{neg}\left(\left(\left(1 + maxCos \cdot ux\right) - ux\right)\right), 1\right)}}\right) \]
        5. Applied rewrites31.2%

          \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1 - ux\right), \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right)} \]
        6. Step-by-step derivation
          1. lift--.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(ux \cdot maxCos + \color{blue}{\left(1 - ux\right)}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          2. lift-*.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{ux \cdot maxCos} + \left(1 - ux\right), \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          3. +-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\left(1 - ux\right) + ux \cdot maxCos}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          4. lift-+.f3220.5

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\left(1 - ux\right) + ux \cdot maxCos}, \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right) \]
          5. lift-*.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\left(1 - ux\right) + \color{blue}{ux \cdot maxCos}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          6. *-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\left(1 - ux\right) + \color{blue}{maxCos \cdot ux}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          7. lower-*.f3220.5

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\left(1 - ux\right) + \color{blue}{maxCos \cdot ux}, \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right) \]
        7. Applied rewrites20.5%

          \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\left(1 - ux\right) + maxCos \cdot ux}, \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right) \]
        8. Taylor expanded in maxCos around 0

          \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}\right)} \]
        9. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}} \]
          2. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}} \]
          3. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)} \]
          4. lower-*.f32N/A

            \[\leadsto \left(2 \cdot \color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)} \]
          5. lower-PI.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)} \]
          6. lower-sqrt.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}} \]
          7. +-commutativeN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{\left(1 - ux\right) \cdot \left(ux - 1\right) + 1}} \]
          8. lower-fma.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{\mathsf{fma}\left(1 - ux, ux - 1, 1\right)}} \]
          9. lower--.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{1 - ux}, ux - 1, 1\right)} \]
          10. sub-negN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, \color{blue}{ux + \left(\mathsf{neg}\left(1\right)\right)}, 1\right)} \]
          11. metadata-evalN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, ux + \color{blue}{-1}, 1\right)} \]
          12. lower-+.f3220.4

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, \color{blue}{ux + -1}, 1\right)} \]
        10. Applied rewrites20.4%

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, ux + -1, 1\right)}} \]
        11. Taylor expanded in ux around 0

          \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{ux \cdot \left(2 + -1 \cdot ux\right)}} \]
        12. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{ux \cdot \left(2 + -1 \cdot ux\right)}} \]
          2. mul-1-negN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{ux \cdot \left(2 + \color{blue}{\left(\mathsf{neg}\left(ux\right)\right)}\right)} \]
          3. unsub-negN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{ux \cdot \color{blue}{\left(2 - ux\right)}} \]
          4. lower--.f3278.6

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{ux \cdot \color{blue}{\left(2 - ux\right)}} \]
        13. Applied rewrites78.6%

          \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{ux \cdot \left(2 - ux\right)}} \]
        14. Add Preprocessing

        Alternative 10: 63.6% accurate, 5.0× speedup?

        \[\begin{array}{l} \\ \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{2 \cdot ux} \end{array} \]
        (FPCore (ux uy maxCos)
         :precision binary32
         (* (* 2.0 (* uy (PI))) (sqrt (* 2.0 ux))))
        \begin{array}{l}
        
        \\
        \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{2 \cdot ux}
        \end{array}
        
        Derivation
        1. Initial program 57.7%

          \[\sin \left(\left(uy \cdot 2\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - \left(\left(1 - ux\right) + ux \cdot maxCos\right) \cdot \left(\left(1 - ux\right) + ux \cdot maxCos\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in uy around 0

          \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right)} \]
        4. Step-by-step derivation
          1. lower-*.f32N/A

            \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right)} \]
          2. lower-*.f32N/A

            \[\leadsto 2 \cdot \color{blue}{\left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right)} \]
          3. lower-*.f32N/A

            \[\leadsto 2 \cdot \left(\color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)} \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right) \]
          4. lower-PI.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}\right) \]
          5. lower-sqrt.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{1 - {\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}}}\right) \]
          6. sub-negN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{1 + \left(\mathsf{neg}\left({\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}\right)\right)}}\right) \]
          7. +-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left({\left(\left(1 + maxCos \cdot ux\right) - ux\right)}^{2}\right)\right) + 1}}\right) \]
          8. unpow2N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\left(\mathsf{neg}\left(\color{blue}{\left(\left(1 + maxCos \cdot ux\right) - ux\right) \cdot \left(\left(1 + maxCos \cdot ux\right) - ux\right)}\right)\right) + 1}\right) \]
          9. distribute-rgt-neg-inN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\left(\left(1 + maxCos \cdot ux\right) - ux\right) \cdot \left(\mathsf{neg}\left(\left(\left(1 + maxCos \cdot ux\right) - ux\right)\right)\right)} + 1}\right) \]
          10. lower-fma.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{\mathsf{fma}\left(\left(1 + maxCos \cdot ux\right) - ux, \mathsf{neg}\left(\left(\left(1 + maxCos \cdot ux\right) - ux\right)\right), 1\right)}}\right) \]
        5. Applied rewrites31.2%

          \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(ux, maxCos, 1 - ux\right), \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right)} \]
        6. Step-by-step derivation
          1. lift--.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(ux \cdot maxCos + \color{blue}{\left(1 - ux\right)}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          2. lift-*.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{ux \cdot maxCos} + \left(1 - ux\right), \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          3. +-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\left(1 - ux\right) + ux \cdot maxCos}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          4. lift-+.f3220.5

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\left(1 - ux\right) + ux \cdot maxCos}, \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right) \]
          5. lift-*.f32N/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\left(1 - ux\right) + \color{blue}{ux \cdot maxCos}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          6. *-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\left(1 - ux\right) + \color{blue}{maxCos \cdot ux}, \mathsf{fma}\left(\mathsf{neg}\left(ux\right), maxCos + -1, -1\right), 1\right)}\right) \]
          7. lower-*.f3220.5

            \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\left(1 - ux\right) + \color{blue}{maxCos \cdot ux}, \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right) \]
        7. Applied rewrites20.5%

          \[\leadsto 2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{\left(1 - ux\right) + maxCos \cdot ux}, \mathsf{fma}\left(-ux, maxCos + -1, -1\right), 1\right)}\right) \]
        8. Taylor expanded in maxCos around 0

          \[\leadsto \color{blue}{2 \cdot \left(\left(uy \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}\right)} \]
        9. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}} \]
          2. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}} \]
          3. lower-*.f32N/A

            \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)} \]
          4. lower-*.f32N/A

            \[\leadsto \left(2 \cdot \color{blue}{\left(uy \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)} \]
          5. lower-PI.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)} \]
          6. lower-sqrt.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\sqrt{1 + \left(1 - ux\right) \cdot \left(ux - 1\right)}} \]
          7. +-commutativeN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{\left(1 - ux\right) \cdot \left(ux - 1\right) + 1}} \]
          8. lower-fma.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{\mathsf{fma}\left(1 - ux, ux - 1, 1\right)}} \]
          9. lower--.f32N/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(\color{blue}{1 - ux}, ux - 1, 1\right)} \]
          10. sub-negN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, \color{blue}{ux + \left(\mathsf{neg}\left(1\right)\right)}, 1\right)} \]
          11. metadata-evalN/A

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, ux + \color{blue}{-1}, 1\right)} \]
          12. lower-+.f3220.4

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, \color{blue}{ux + -1}, 1\right)} \]
        10. Applied rewrites20.4%

          \[\leadsto \color{blue}{\left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\mathsf{fma}\left(1 - ux, ux + -1, 1\right)}} \]
        11. Taylor expanded in ux around 0

          \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{2 \cdot ux}} \]
        12. Step-by-step derivation
          1. lower-*.f3264.1

            \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{2 \cdot ux}} \]
        13. Applied rewrites64.1%

          \[\leadsto \left(2 \cdot \left(uy \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sqrt{\color{blue}{2 \cdot ux}} \]
        14. Add Preprocessing

        Reproduce

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