ab-angle->ABCF B

Percentage Accurate: 54.2% → 65.3%
Time: 10.0s
Alternatives: 16
Speedup: 13.7×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\ \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (PI) (/ angle 180.0))))
   (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}

Sampling outcomes in binary64 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 16 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: 54.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\ \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (PI) (/ angle 180.0))))
   (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}

Alternative 1: 65.3% accurate, 1.6× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\\ t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\ t_2 := \sqrt{\mathsf{PI}\left(\right)}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 1.9 \cdot 10^{-18}:\\ \;\;\;\;\cos \left(t\_2 \cdot \left(t\_2 \cdot \frac{angle\_m}{-180}\right)\right) \cdot t\_0\\ \mathbf{elif}\;b\_m \leq 1.05 \cdot 10^{+226}:\\ \;\;\;\;\cos \left(\frac{t\_1}{-180}\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot t\_1\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0
         (*
          (* (sin (* (* 0.005555555555555556 (PI)) angle_m)) (* (+ a b_m) 2.0))
          (- b_m a)))
        (t_1 (* (PI) angle_m))
        (t_2 (sqrt (PI))))
   (*
    angle_s
    (if (<= b_m 1.9e-18)
      (* (cos (* t_2 (* t_2 (/ angle_m -180.0)))) t_0)
      (if (<= b_m 1.05e+226)
        (* (cos (/ t_1 -180.0)) t_0)
        (*
         (sin (* (PI) (fma -0.005555555555555556 angle_m 0.5)))
         (* (* (* b_m b_m) 2.0) (sin (* 0.005555555555555556 t_1)))))))))
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\\
t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\
t_2 := \sqrt{\mathsf{PI}\left(\right)}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 1.9 \cdot 10^{-18}:\\
\;\;\;\;\cos \left(t\_2 \cdot \left(t\_2 \cdot \frac{angle\_m}{-180}\right)\right) \cdot t\_0\\

\mathbf{elif}\;b\_m \leq 1.05 \cdot 10^{+226}:\\
\;\;\;\;\cos \left(\frac{t\_1}{-180}\right) \cdot t\_0\\

\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot t\_1\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 1.8999999999999999e-18

    1. Initial program 53.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around inf

      \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      5. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      6. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      7. difference-of-squaresN/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      9. lower-+.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      10. lower--.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      11. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      12. associate-*r*N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      13. lower-sin.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      16. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      17. lower-PI.f6456.2

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    5. Applied rewrites56.2%

      \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
      3. lower-*.f6456.2

        \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
    7. Applied rewrites67.3%

      \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]
    8. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \cos \color{blue}{\left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto \cos \left(\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot angle}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \cos \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{-180}\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      4. lift-PI.f64N/A

        \[\leadsto \cos \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{angle}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      5. add-sqr-sqrtN/A

        \[\leadsto \cos \left(\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \frac{angle}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \cos \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \frac{angle}{-180}\right)\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      7. lower-*.f64N/A

        \[\leadsto \cos \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \frac{angle}{-180}\right)\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      8. lift-PI.f64N/A

        \[\leadsto \cos \left(\sqrt{\color{blue}{\mathsf{PI}\left(\right)}} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \frac{angle}{-180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      9. lower-sqrt.f64N/A

        \[\leadsto \cos \left(\color{blue}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \frac{angle}{-180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      10. lower-*.f64N/A

        \[\leadsto \cos \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \frac{angle}{-180}\right)}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      11. lift-PI.f64N/A

        \[\leadsto \cos \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(\sqrt{\color{blue}{\mathsf{PI}\left(\right)}} \cdot \frac{angle}{-180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      12. lower-sqrt.f64N/A

        \[\leadsto \cos \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(\color{blue}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \frac{angle}{-180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      13. lower-/.f6468.7

        \[\leadsto \cos \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \color{blue}{\frac{angle}{-180}}\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
    9. Applied rewrites68.7%

      \[\leadsto \cos \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \frac{angle}{-180}\right)\right)} \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]

    if 1.8999999999999999e-18 < b < 1.04999999999999997e226

    1. Initial program 51.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around inf

      \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      5. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      6. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      7. difference-of-squaresN/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      9. lower-+.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      10. lower--.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      11. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      12. associate-*r*N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      13. lower-sin.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      16. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      17. lower-PI.f6453.8

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    5. Applied rewrites53.8%

      \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
      3. lower-*.f6453.8

        \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
    7. Applied rewrites71.5%

      \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]

    if 1.04999999999999997e226 < b

    1. Initial program 50.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-cos.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. cos-neg-revN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      3. sin-+PI/2-revN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
      4. lower-sin.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
      5. lift-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \color{blue}{\left(\mathsf{fma}\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
      8. lower-neg.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\color{blue}{-\mathsf{PI}\left(\right)}, \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
      9. lift-PI.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
      10. lower-/.f6443.8

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
    4. Applied rewrites43.8%

      \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
    5. Taylor expanded in a around 0

      \[\leadsto \color{blue}{2 \cdot \left({b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. count-2-revN/A

        \[\leadsto \color{blue}{{b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) + {b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)} + {b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) + \color{blue}{\left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      4. distribute-rgt-outN/A

        \[\leadsto \color{blue}{\sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + {b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
      5. count-2-revN/A

        \[\leadsto \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \color{blue}{\sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
    7. Applied rewrites56.3%

      \[\leadsto \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle, 0.5\right)\right) \cdot \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 2: 65.3% accurate, 1.6× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\\ t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\ t_2 := \sqrt{\mathsf{PI}\left(\right)}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 2 \cdot 10^{-42}:\\ \;\;\;\;\cos \left(t\_2 \cdot \left(angle\_m \cdot \frac{t\_2}{-180}\right)\right) \cdot t\_0\\ \mathbf{elif}\;b\_m \leq 1.05 \cdot 10^{+226}:\\ \;\;\;\;\cos \left(\frac{t\_1}{-180}\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot t\_1\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0
         (*
          (* (sin (* (* 0.005555555555555556 (PI)) angle_m)) (* (+ a b_m) 2.0))
          (- b_m a)))
        (t_1 (* (PI) angle_m))
        (t_2 (sqrt (PI))))
   (*
    angle_s
    (if (<= b_m 2e-42)
      (* (cos (* t_2 (* angle_m (/ t_2 -180.0)))) t_0)
      (if (<= b_m 1.05e+226)
        (* (cos (/ t_1 -180.0)) t_0)
        (*
         (sin (* (PI) (fma -0.005555555555555556 angle_m 0.5)))
         (* (* (* b_m b_m) 2.0) (sin (* 0.005555555555555556 t_1)))))))))
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\\
t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\
t_2 := \sqrt{\mathsf{PI}\left(\right)}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 2 \cdot 10^{-42}:\\
\;\;\;\;\cos \left(t\_2 \cdot \left(angle\_m \cdot \frac{t\_2}{-180}\right)\right) \cdot t\_0\\

\mathbf{elif}\;b\_m \leq 1.05 \cdot 10^{+226}:\\
\;\;\;\;\cos \left(\frac{t\_1}{-180}\right) \cdot t\_0\\

\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot t\_1\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 2.00000000000000008e-42

    1. Initial program 52.8%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around inf

      \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      5. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      6. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      7. difference-of-squaresN/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      9. lower-+.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      10. lower--.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      11. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      12. associate-*r*N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      13. lower-sin.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      16. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      17. lower-PI.f6455.2

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    5. Applied rewrites55.2%

      \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
      3. lower-*.f6455.2

        \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
    7. Applied rewrites66.3%

      \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \cos \left(\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot angle}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \cos \left(\frac{\color{blue}{angle \cdot \mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      3. lift-PI.f64N/A

        \[\leadsto \cos \left(\frac{angle \cdot \color{blue}{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      4. add-sqr-sqrtN/A

        \[\leadsto \cos \left(\frac{angle \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      6. lower-*.f64N/A

        \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      7. lower-*.f64N/A

        \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      8. lift-PI.f64N/A

        \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      9. lower-sqrt.f64N/A

        \[\leadsto \cos \left(\frac{\left(angle \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      10. lift-PI.f64N/A

        \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      11. lower-sqrt.f6469.0

        \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
    9. Applied rewrites69.0%

      \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
    10. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \cos \color{blue}{\left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \cos \color{blue}{\left(\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{-180}\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto \cos \left(\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \cos \left(\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot angle\right)} \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \cos \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(angle \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{-180}\right)\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      7. lower-*.f64N/A

        \[\leadsto \cos \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(angle \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{-180}\right)\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \cos \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \color{blue}{\left(angle \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{-180}\right)}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      9. lower-/.f6469.0

        \[\leadsto \cos \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(angle \cdot \color{blue}{\frac{\sqrt{\mathsf{PI}\left(\right)}}{-180}}\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
    11. Applied rewrites69.0%

      \[\leadsto \cos \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(angle \cdot \frac{\sqrt{\mathsf{PI}\left(\right)}}{-180}\right)\right)} \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]

    if 2.00000000000000008e-42 < b < 1.04999999999999997e226

    1. Initial program 54.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around inf

      \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      5. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      6. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      7. difference-of-squaresN/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      9. lower-+.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      10. lower--.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      11. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      12. associate-*r*N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      13. lower-sin.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      16. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      17. lower-PI.f6457.0

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    5. Applied rewrites57.0%

      \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
      3. lower-*.f6457.0

        \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
    7. Applied rewrites73.8%

      \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]

    if 1.04999999999999997e226 < b

    1. Initial program 50.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-cos.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. cos-neg-revN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
      3. sin-+PI/2-revN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
      4. lower-sin.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
      5. lift-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \color{blue}{\left(\mathsf{fma}\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
      8. lower-neg.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\color{blue}{-\mathsf{PI}\left(\right)}, \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
      9. lift-PI.f64N/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
      10. lower-/.f6443.8

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
    4. Applied rewrites43.8%

      \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
    5. Taylor expanded in a around 0

      \[\leadsto \color{blue}{2 \cdot \left({b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. count-2-revN/A

        \[\leadsto \color{blue}{{b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) + {b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)} + {b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) + \color{blue}{\left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)} \]
      4. distribute-rgt-outN/A

        \[\leadsto \color{blue}{\sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + {b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
      5. count-2-revN/A

        \[\leadsto \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \color{blue}{\sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
    7. Applied rewrites56.3%

      \[\leadsto \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle, 0.5\right)\right) \cdot \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 66.6% accurate, 1.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 3.1 \cdot 10^{+34}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(\frac{angle\_m}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(t\_0 \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(\left(t\_0 \cdot \left(a + b\_m\right)\right) \cdot 2\right)\right) \cdot 1\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (sin (* (* 0.005555555555555556 (PI)) angle_m))))
   (*
    angle_s
    (if (<= a 3.1e+34)
      (*
       (sin (fma (/ angle_m 180.0) (PI) (/ (PI) 2.0)))
       (* (* t_0 (* (+ a b_m) 2.0)) (- b_m a)))
      (* (* (- b_m a) (* (* t_0 (+ a b_m)) 2.0)) 1.0)))))
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 3.1 \cdot 10^{+34}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\frac{angle\_m}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(t\_0 \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(\left(t\_0 \cdot \left(a + b\_m\right)\right) \cdot 2\right)\right) \cdot 1\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.09999999999999977e34

    1. Initial program 54.7%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around inf

      \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      5. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      6. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      7. difference-of-squaresN/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      9. lower-+.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      10. lower--.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      11. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      12. associate-*r*N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      13. lower-sin.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      16. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      17. lower-PI.f6458.3

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    5. Applied rewrites58.3%

      \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
      3. lower-*.f6458.3

        \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
    7. Applied rewrites67.1%

      \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]
    8. Step-by-step derivation
      1. lift-cos.f64N/A

        \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      2. cos-neg-revN/A

        \[\leadsto \color{blue}{\cos \left(\mathsf{neg}\left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right)\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      3. lift-/.f64N/A

        \[\leadsto \cos \left(\mathsf{neg}\left(\color{blue}{\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto \cos \left(\mathsf{neg}\left(\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot angle}}{-180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      5. associate-/l*N/A

        \[\leadsto \cos \left(\mathsf{neg}\left(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{-180}}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \cos \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{neg}\left(\frac{angle}{-180}\right)\right)\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      7. distribute-frac-neg2N/A

        \[\leadsto \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{angle}{\mathsf{neg}\left(-180\right)}}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{\color{blue}{180}}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      9. lift-/.f64N/A

        \[\leadsto \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{angle}{180}}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \cos \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      11. sin-+PI/2-revN/A

        \[\leadsto \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      12. lower-sin.f64N/A

        \[\leadsto \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      13. lift-PI.f64N/A

        \[\leadsto \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      14. lift-/.f64N/A

        \[\leadsto \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      15. lift-*.f64N/A

        \[\leadsto \sin \left(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \sin \left(\color{blue}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
      17. lower-fma.f6465.9

        \[\leadsto \sin \color{blue}{\left(\mathsf{fma}\left(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
    9. Applied rewrites65.9%

      \[\leadsto \color{blue}{\sin \left(\mathsf{fma}\left(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]

    if 3.09999999999999977e34 < a

    1. Initial program 47.8%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around inf

      \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      5. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      6. unpow2N/A

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      7. difference-of-squaresN/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      9. lower-+.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      10. lower--.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      11. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      12. associate-*r*N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      13. lower-sin.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      14. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      16. lower-*.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      17. lower-PI.f6450.4

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    5. Applied rewrites50.4%

      \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    6. Taylor expanded in angle around 0

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
    7. Step-by-step derivation
      1. Applied rewrites55.8%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
      2. Step-by-step derivation
        1. Applied rewrites71.9%

          \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot 2\right)}\right) \cdot 1 \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 4: 65.5% accurate, 1.7× speedup?

      \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 1.05 \cdot 10^{+226}:\\ \;\;\;\;\cos \left(\frac{t\_0}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot t\_0\right)\right)\\ \end{array} \end{array} \end{array} \]
      b_m = (fabs.f64 b)
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b_m angle_m)
       :precision binary64
       (let* ((t_0 (* (PI) angle_m)))
         (*
          angle_s
          (if (<= b_m 1.05e+226)
            (*
             (cos (/ t_0 -180.0))
             (*
              (* (sin (* (* 0.005555555555555556 (PI)) angle_m)) (* (+ a b_m) 2.0))
              (- b_m a)))
            (*
             (sin (* (PI) (fma -0.005555555555555556 angle_m 0.5)))
             (* (* (* b_m b_m) 2.0) (sin (* 0.005555555555555556 t_0))))))))
      \begin{array}{l}
      b_m = \left|b\right|
      \\
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;b\_m \leq 1.05 \cdot 10^{+226}:\\
      \;\;\;\;\cos \left(\frac{t\_0}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot t\_0\right)\right)\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 1.04999999999999997e226

        1. Initial program 53.3%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in angle around inf

          \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          2. associate-*r*N/A

            \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          3. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          5. unpow2N/A

            \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          6. unpow2N/A

            \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          7. difference-of-squaresN/A

            \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          8. lower-*.f64N/A

            \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          9. lower-+.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          10. lower--.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          11. *-commutativeN/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          12. associate-*r*N/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          13. lower-sin.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          14. lower-*.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          15. *-commutativeN/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          16. lower-*.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          17. lower-PI.f6455.7

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        5. Applied rewrites55.7%

          \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
          2. *-commutativeN/A

            \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
          3. lower-*.f6455.7

            \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
        7. Applied rewrites68.2%

          \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]

        if 1.04999999999999997e226 < b

        1. Initial program 50.1%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-cos.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
          2. cos-neg-revN/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
          3. sin-+PI/2-revN/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
          4. lower-sin.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
          5. lift-*.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
          6. distribute-lft-neg-inN/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
          7. lower-fma.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \color{blue}{\left(\mathsf{fma}\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
          8. lower-neg.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\color{blue}{-\mathsf{PI}\left(\right)}, \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
          9. lift-PI.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
          10. lower-/.f6443.8

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
        4. Applied rewrites43.8%

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
        5. Taylor expanded in a around 0

          \[\leadsto \color{blue}{2 \cdot \left({b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
        6. Step-by-step derivation
          1. count-2-revN/A

            \[\leadsto \color{blue}{{b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) + {b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
          2. associate-*r*N/A

            \[\leadsto \color{blue}{\left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)} + {b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) \]
          3. associate-*r*N/A

            \[\leadsto \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) + \color{blue}{\left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)} \]
          4. distribute-rgt-outN/A

            \[\leadsto \color{blue}{\sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + {b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
          5. count-2-revN/A

            \[\leadsto \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
          6. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
        7. Applied rewrites56.3%

          \[\leadsto \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle, 0.5\right)\right) \cdot \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 5: 65.1% accurate, 1.8× speedup?

      \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 1.05 \cdot 10^{+226}:\\ \;\;\;\;\cos \left(t\_0 \cdot -0.005555555555555556\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot t\_0\right)\right)\\ \end{array} \end{array} \end{array} \]
      b_m = (fabs.f64 b)
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b_m angle_m)
       :precision binary64
       (let* ((t_0 (* (PI) angle_m)))
         (*
          angle_s
          (if (<= b_m 1.05e+226)
            (*
             (cos (* t_0 -0.005555555555555556))
             (*
              (* (sin (* (* 0.005555555555555556 (PI)) angle_m)) (* (+ a b_m) 2.0))
              (- b_m a)))
            (*
             (sin (* (PI) (fma -0.005555555555555556 angle_m 0.5)))
             (* (* (* b_m b_m) 2.0) (sin (* 0.005555555555555556 t_0))))))))
      \begin{array}{l}
      b_m = \left|b\right|
      \\
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;b\_m \leq 1.05 \cdot 10^{+226}:\\
      \;\;\;\;\cos \left(t\_0 \cdot -0.005555555555555556\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot t\_0\right)\right)\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 1.04999999999999997e226

        1. Initial program 53.3%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in angle around inf

          \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          2. associate-*r*N/A

            \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          3. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          5. unpow2N/A

            \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          6. unpow2N/A

            \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          7. difference-of-squaresN/A

            \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          8. lower-*.f64N/A

            \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          9. lower-+.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          10. lower--.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          11. *-commutativeN/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          12. associate-*r*N/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          13. lower-sin.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          14. lower-*.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          15. *-commutativeN/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          16. lower-*.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          17. lower-PI.f6455.7

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        5. Applied rewrites55.7%

          \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
          2. *-commutativeN/A

            \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
          3. lower-*.f6455.7

            \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
        7. Applied rewrites68.2%

          \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]
        8. Taylor expanded in angle around 0

          \[\leadsto \cos \color{blue}{\left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
        9. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \cos \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{-1}{180}\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
          2. lower-*.f64N/A

            \[\leadsto \cos \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{-1}{180}\right)} \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \cos \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{-1}{180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
          4. lower-*.f64N/A

            \[\leadsto \cos \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{-1}{180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
          5. lower-PI.f6468.1

            \[\leadsto \cos \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot angle\right) \cdot -0.005555555555555556\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
        10. Applied rewrites68.1%

          \[\leadsto \cos \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot -0.005555555555555556\right)} \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]

        if 1.04999999999999997e226 < b

        1. Initial program 50.1%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-cos.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
          2. cos-neg-revN/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
          3. sin-+PI/2-revN/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
          4. lower-sin.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
          5. lift-*.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
          6. distribute-lft-neg-inN/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
          7. lower-fma.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \color{blue}{\left(\mathsf{fma}\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
          8. lower-neg.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\color{blue}{-\mathsf{PI}\left(\right)}, \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
          9. lift-PI.f64N/A

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
          10. lower-/.f6443.8

            \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
        4. Applied rewrites43.8%

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
        5. Taylor expanded in a around 0

          \[\leadsto \color{blue}{2 \cdot \left({b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
        6. Step-by-step derivation
          1. count-2-revN/A

            \[\leadsto \color{blue}{{b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) + {b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
          2. associate-*r*N/A

            \[\leadsto \color{blue}{\left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)} + {b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) \]
          3. associate-*r*N/A

            \[\leadsto \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) + \color{blue}{\left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)} \]
          4. distribute-rgt-outN/A

            \[\leadsto \color{blue}{\sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + {b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
          5. count-2-revN/A

            \[\leadsto \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
          6. lower-*.f64N/A

            \[\leadsto \color{blue}{\sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
        7. Applied rewrites56.3%

          \[\leadsto \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle, 0.5\right)\right) \cdot \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 6: 53.3% accurate, 1.8× speedup?

      \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 5.3 \cdot 10^{-107}:\\ \;\;\;\;\left(\left(t\_0 \cdot b\_m\right) \cdot \left(b\_m \cdot 2\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(\left(t\_0 \cdot \left(a + b\_m\right)\right) \cdot 2\right)\right) \cdot 1\\ \end{array} \end{array} \end{array} \]
      b_m = (fabs.f64 b)
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b_m angle_m)
       :precision binary64
       (let* ((t_0 (sin (* (* 0.005555555555555556 (PI)) angle_m))))
         (*
          angle_s
          (if (<= a 5.3e-107)
            (* (* (* t_0 b_m) (* b_m 2.0)) (cos (* (PI) (/ angle_m 180.0))))
            (* (* (- b_m a) (* (* t_0 (+ a b_m)) 2.0)) 1.0)))))
      \begin{array}{l}
      b_m = \left|b\right|
      \\
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;a \leq 5.3 \cdot 10^{-107}:\\
      \;\;\;\;\left(\left(t\_0 \cdot b\_m\right) \cdot \left(b\_m \cdot 2\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(\left(t\_0 \cdot \left(a + b\_m\right)\right) \cdot 2\right)\right) \cdot 1\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < 5.3e-107

        1. Initial program 54.0%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in a around 0

          \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \color{blue}{\left(\left(2 \cdot {b}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(\left(2 \cdot {b}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          3. *-commutativeN/A

            \[\leadsto \left(\color{blue}{\left({b}^{2} \cdot 2\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\color{blue}{\left({b}^{2} \cdot 2\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          5. unpow2N/A

            \[\leadsto \left(\left(\color{blue}{\left(b \cdot b\right)} \cdot 2\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          6. lower-*.f64N/A

            \[\leadsto \left(\left(\color{blue}{\left(b \cdot b\right)} \cdot 2\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          7. *-commutativeN/A

            \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          8. associate-*r*N/A

            \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          9. lower-sin.f64N/A

            \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          10. lower-*.f64N/A

            \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          11. *-commutativeN/A

            \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          12. lower-*.f64N/A

            \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          13. lower-PI.f6444.5

            \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        5. Applied rewrites44.5%

          \[\leadsto \color{blue}{\left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        6. Step-by-step derivation
          1. Applied rewrites46.7%

            \[\leadsto \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot b\right) \cdot \color{blue}{\left(b \cdot 2\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]

          if 5.3e-107 < a

          1. Initial program 51.4%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around inf

            \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            2. associate-*r*N/A

              \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            3. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            4. lower-*.f64N/A

              \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            5. unpow2N/A

              \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            6. unpow2N/A

              \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            7. difference-of-squaresN/A

              \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            8. lower-*.f64N/A

              \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            9. lower-+.f64N/A

              \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            10. lower--.f64N/A

              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            11. *-commutativeN/A

              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            12. associate-*r*N/A

              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            13. lower-sin.f64N/A

              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            14. lower-*.f64N/A

              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            15. *-commutativeN/A

              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            16. lower-*.f64N/A

              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            17. lower-PI.f6453.0

              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          5. Applied rewrites53.0%

            \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          6. Taylor expanded in angle around 0

            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
          7. Step-by-step derivation
            1. Applied rewrites54.5%

              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
            2. Step-by-step derivation
              1. Applied rewrites68.0%

                \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot 2\right)}\right) \cdot 1 \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 7: 50.0% accurate, 1.8× speedup?

            \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sqrt{\mathsf{PI}\left(\right)}\\ t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 1.6 \cdot 10^{-160}:\\ \;\;\;\;\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot t\_1\right)\right)\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-33}:\\ \;\;\;\;\cos \left(\frac{\left(angle\_m \cdot t\_0\right) \cdot t\_0}{-180}\right) \cdot \left(\left(\left(t\_1 \cdot 0.005555555555555556\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a + b\_m\right)\right) \cdot 2\right)\right) \cdot 1\\ \end{array} \end{array} \end{array} \]
            b_m = (fabs.f64 b)
            angle\_m = (fabs.f64 angle)
            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
            (FPCore (angle_s a b_m angle_m)
             :precision binary64
             (let* ((t_0 (sqrt (PI))) (t_1 (* (PI) angle_m)))
               (*
                angle_s
                (if (<= a 1.6e-160)
                  (*
                   (sin (* (PI) (fma -0.005555555555555556 angle_m 0.5)))
                   (* (* (* b_m b_m) 2.0) (sin (* 0.005555555555555556 t_1))))
                  (if (<= a 4.9e-33)
                    (*
                     (cos (/ (* (* angle_m t_0) t_0) -180.0))
                     (* (* (* t_1 0.005555555555555556) (* (+ a b_m) 2.0)) (- b_m a)))
                    (*
                     (*
                      (- b_m a)
                      (*
                       (* (sin (* (* 0.005555555555555556 (PI)) angle_m)) (+ a b_m))
                       2.0))
                     1.0))))))
            \begin{array}{l}
            b_m = \left|b\right|
            \\
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            \begin{array}{l}
            t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
            t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;a \leq 1.6 \cdot 10^{-160}:\\
            \;\;\;\;\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot t\_1\right)\right)\\
            
            \mathbf{elif}\;a \leq 4.9 \cdot 10^{-33}:\\
            \;\;\;\;\cos \left(\frac{\left(angle\_m \cdot t\_0\right) \cdot t\_0}{-180}\right) \cdot \left(\left(\left(t\_1 \cdot 0.005555555555555556\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a + b\_m\right)\right) \cdot 2\right)\right) \cdot 1\\
            
            
            \end{array}
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if a < 1.60000000000000004e-160

              1. Initial program 53.9%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-cos.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                2. cos-neg-revN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
                3. sin-+PI/2-revN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                4. lower-sin.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                6. distribute-lft-neg-inN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                7. lower-fma.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \color{blue}{\left(\mathsf{fma}\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                8. lower-neg.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\color{blue}{-\mathsf{PI}\left(\right)}, \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
                9. lift-PI.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                10. lower-/.f6456.9

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
              4. Applied rewrites56.9%

                \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
              5. Taylor expanded in a around 0

                \[\leadsto \color{blue}{2 \cdot \left({b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
              6. Step-by-step derivation
                1. count-2-revN/A

                  \[\leadsto \color{blue}{{b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) + {b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                2. associate-*r*N/A

                  \[\leadsto \color{blue}{\left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)} + {b}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) \]
                3. associate-*r*N/A

                  \[\leadsto \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) + \color{blue}{\left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)} \]
                4. distribute-rgt-outN/A

                  \[\leadsto \color{blue}{\sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + {b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
                5. count-2-revN/A

                  \[\leadsto \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
                6. lower-*.f64N/A

                  \[\leadsto \color{blue}{\sin \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
              7. Applied rewrites46.3%

                \[\leadsto \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(-0.005555555555555556, angle, 0.5\right)\right) \cdot \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\right)} \]

              if 1.60000000000000004e-160 < a < 4.8999999999999998e-33

              1. Initial program 58.8%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around inf

                \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                2. associate-*r*N/A

                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                3. lower-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                5. unpow2N/A

                  \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                6. unpow2N/A

                  \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                7. difference-of-squaresN/A

                  \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                8. lower-*.f64N/A

                  \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                9. lower-+.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                10. lower--.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                11. *-commutativeN/A

                  \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                12. associate-*r*N/A

                  \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                13. lower-sin.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                14. lower-*.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                15. *-commutativeN/A

                  \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                16. lower-*.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                17. lower-PI.f6458.7

                  \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              5. Applied rewrites58.7%

                \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                2. *-commutativeN/A

                  \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
                3. lower-*.f6458.7

                  \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
              7. Applied rewrites65.2%

                \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]
              8. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \cos \left(\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot angle}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                2. *-commutativeN/A

                  \[\leadsto \cos \left(\frac{\color{blue}{angle \cdot \mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                3. lift-PI.f64N/A

                  \[\leadsto \cos \left(\frac{angle \cdot \color{blue}{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                4. add-sqr-sqrtN/A

                  \[\leadsto \cos \left(\frac{angle \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                5. associate-*r*N/A

                  \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                7. lower-*.f64N/A

                  \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                8. lift-PI.f64N/A

                  \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                9. lower-sqrt.f64N/A

                  \[\leadsto \cos \left(\frac{\left(angle \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                10. lift-PI.f64N/A

                  \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                11. lower-sqrt.f6461.9

                  \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
              9. Applied rewrites61.9%

                \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
              10. Taylor expanded in angle around 0

                \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
              11. Step-by-step derivation
                1. Applied rewrites60.7%

                  \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]

                if 4.8999999999999998e-33 < a

                1. Initial program 48.9%

                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in angle around inf

                  \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  2. associate-*r*N/A

                    \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  3. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  4. lower-*.f64N/A

                    \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  5. unpow2N/A

                    \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  6. unpow2N/A

                    \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  7. difference-of-squaresN/A

                    \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  8. lower-*.f64N/A

                    \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  9. lower-+.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  10. lower--.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  11. *-commutativeN/A

                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  12. associate-*r*N/A

                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  13. lower-sin.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  14. lower-*.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  15. *-commutativeN/A

                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  16. lower-*.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  17. lower-PI.f6451.0

                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                5. Applied rewrites51.0%

                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                6. Taylor expanded in angle around 0

                  \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                7. Step-by-step derivation
                  1. Applied rewrites55.6%

                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                  2. Step-by-step derivation
                    1. Applied rewrites70.7%

                      \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot 2\right)}\right) \cdot 1 \]
                  3. Recombined 3 regimes into one program.
                  4. Add Preprocessing

                  Alternative 8: 57.5% accurate, 1.9× speedup?

                  \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -2 \cdot 10^{-262}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
                  b_m = (fabs.f64 b)
                  angle\_m = (fabs.f64 angle)
                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                  (FPCore (angle_s a b_m angle_m)
                   :precision binary64
                   (*
                    angle_s
                    (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -2e-262)
                      (* (* -0.011111111111111112 a) (* a (* angle_m (PI))))
                      (* (* (* (PI) (* b_m b_m)) angle_m) 0.011111111111111112))))
                  \begin{array}{l}
                  b_m = \left|b\right|
                  \\
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \begin{array}{l}
                  \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -2 \cdot 10^{-262}:\\
                  \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -2.00000000000000002e-262

                    1. Initial program 50.9%

                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                    2. Add Preprocessing
                    3. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    4. Step-by-step derivation
                      1. associate-*r*N/A

                        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                      2. associate-*r*N/A

                        \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                      3. lower-*.f64N/A

                        \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                      4. lower-*.f64N/A

                        \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                      5. lower-*.f64N/A

                        \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                      6. lower-PI.f64N/A

                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                      7. unpow2N/A

                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                      9. difference-of-squaresN/A

                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                      10. lower-*.f64N/A

                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                      11. lower-+.f64N/A

                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                      12. lower--.f6451.1

                        \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                    5. Applied rewrites51.1%

                      \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                    6. Taylor expanded in a around inf

                      \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                    7. Step-by-step derivation
                      1. Applied rewrites49.6%

                        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
                      2. Step-by-step derivation
                        1. Applied rewrites63.4%

                          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]

                        if -2.00000000000000002e-262 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                        1. Initial program 54.8%

                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                        2. Add Preprocessing
                        3. Taylor expanded in angle around 0

                          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                        4. Step-by-step derivation
                          1. associate-*r*N/A

                            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                          2. associate-*r*N/A

                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                          3. lower-*.f64N/A

                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                          4. lower-*.f64N/A

                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                          5. lower-*.f64N/A

                            \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                          6. lower-PI.f64N/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                          7. unpow2N/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                          8. unpow2N/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                          9. difference-of-squaresN/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                          10. lower-*.f64N/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                          11. lower-+.f64N/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                          12. lower--.f6455.7

                            \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                        5. Applied rewrites55.7%

                          \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                        6. Taylor expanded in a around 0

                          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                        7. Step-by-step derivation
                          1. Applied rewrites58.9%

                            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot \color{blue}{0.011111111111111112} \]
                        8. Recombined 2 regimes into one program.
                        9. Final simplification60.8%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -2 \cdot 10^{-262}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 9: 64.0% accurate, 2.4× speedup?

                        \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sqrt{\mathsf{PI}\left(\right)}\\ t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 5.4 \cdot 10^{+23}:\\ \;\;\;\;\cos \left(\frac{t\_1}{-180}\right) \cdot \left(\left(\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right)\\ \mathbf{elif}\;angle\_m \leq 5.4 \cdot 10^{+212}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \sin \left(t\_0 \cdot \left(t\_0 \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\frac{\left(angle\_m \cdot t\_0\right) \cdot t\_0}{-180}\right) \cdot \left(\left(\left(t\_1 \cdot 0.005555555555555556\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\right)\\ \end{array} \end{array} \end{array} \]
                        b_m = (fabs.f64 b)
                        angle\_m = (fabs.f64 angle)
                        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                        (FPCore (angle_s a b_m angle_m)
                         :precision binary64
                         (let* ((t_0 (sqrt (PI))) (t_1 (* (PI) angle_m)))
                           (*
                            angle_s
                            (if (<= angle_m 5.4e+23)
                              (*
                               (cos (/ t_1 -180.0))
                               (* (* (* (* (+ a b_m) (PI)) angle_m) 0.011111111111111112) (- b_m a)))
                              (if (<= angle_m 5.4e+212)
                                (*
                                 (*
                                  (* 2.0 (* (+ b_m a) (- b_m a)))
                                  (sin (* t_0 (* t_0 (* 0.005555555555555556 angle_m)))))
                                 1.0)
                                (*
                                 (cos (/ (* (* angle_m t_0) t_0) -180.0))
                                 (* (* (* t_1 0.005555555555555556) (* (+ a b_m) 2.0)) (- b_m a))))))))
                        \begin{array}{l}
                        b_m = \left|b\right|
                        \\
                        angle\_m = \left|angle\right|
                        \\
                        angle\_s = \mathsf{copysign}\left(1, angle\right)
                        
                        \\
                        \begin{array}{l}
                        t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
                        t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\
                        angle\_s \cdot \begin{array}{l}
                        \mathbf{if}\;angle\_m \leq 5.4 \cdot 10^{+23}:\\
                        \;\;\;\;\cos \left(\frac{t\_1}{-180}\right) \cdot \left(\left(\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right)\\
                        
                        \mathbf{elif}\;angle\_m \leq 5.4 \cdot 10^{+212}:\\
                        \;\;\;\;\left(\left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \sin \left(t\_0 \cdot \left(t\_0 \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)\right) \cdot 1\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\cos \left(\frac{\left(angle\_m \cdot t\_0\right) \cdot t\_0}{-180}\right) \cdot \left(\left(\left(t\_1 \cdot 0.005555555555555556\right) \cdot \left(\left(a + b\_m\right) \cdot 2\right)\right) \cdot \left(b\_m - a\right)\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if angle < 5.3999999999999997e23

                          1. Initial program 58.2%

                            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          2. Add Preprocessing
                          3. Taylor expanded in angle around inf

                            \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          4. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            2. associate-*r*N/A

                              \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            3. lower-*.f64N/A

                              \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            4. lower-*.f64N/A

                              \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            5. unpow2N/A

                              \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            6. unpow2N/A

                              \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            7. difference-of-squaresN/A

                              \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            8. lower-*.f64N/A

                              \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            9. lower-+.f64N/A

                              \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            10. lower--.f64N/A

                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            11. *-commutativeN/A

                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            12. associate-*r*N/A

                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            13. lower-sin.f64N/A

                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            14. lower-*.f64N/A

                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            15. *-commutativeN/A

                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            16. lower-*.f64N/A

                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            17. lower-PI.f6461.9

                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          5. Applied rewrites61.9%

                            \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          6. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                            2. *-commutativeN/A

                              \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
                            3. lower-*.f6461.9

                              \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
                          7. Applied rewrites75.8%

                            \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]
                          8. Taylor expanded in angle around 0

                            \[\leadsto \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right)\right) \cdot \left(\color{blue}{b} - a\right)\right) \]
                          9. Step-by-step derivation
                            1. Applied rewrites70.9%

                              \[\leadsto \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(\color{blue}{b} - a\right)\right) \]

                            if 5.3999999999999997e23 < angle < 5.4e212

                            1. Initial program 39.2%

                              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in angle around inf

                              \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            4. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              2. associate-*r*N/A

                                \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              3. lower-*.f64N/A

                                \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              4. lower-*.f64N/A

                                \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              5. unpow2N/A

                                \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              6. unpow2N/A

                                \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              7. difference-of-squaresN/A

                                \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              8. lower-*.f64N/A

                                \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              9. lower-+.f64N/A

                                \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              10. lower--.f64N/A

                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              11. *-commutativeN/A

                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              12. associate-*r*N/A

                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              13. lower-sin.f64N/A

                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              14. lower-*.f64N/A

                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              15. *-commutativeN/A

                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              16. lower-*.f64N/A

                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              17. lower-PI.f6441.7

                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            5. Applied rewrites41.7%

                              \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            6. Taylor expanded in angle around 0

                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                            7. Step-by-step derivation
                              1. Applied rewrites53.6%

                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                              2. Step-by-step derivation
                                1. Applied rewrites61.9%

                                  \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \cdot 1 \]

                                if 5.4e212 < angle

                                1. Initial program 24.6%

                                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                2. Add Preprocessing
                                3. Taylor expanded in angle around inf

                                  \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                4. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  2. associate-*r*N/A

                                    \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  3. lower-*.f64N/A

                                    \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  4. lower-*.f64N/A

                                    \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  5. unpow2N/A

                                    \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  6. unpow2N/A

                                    \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  7. difference-of-squaresN/A

                                    \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  8. lower-*.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  9. lower-+.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  10. lower--.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  11. *-commutativeN/A

                                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  12. associate-*r*N/A

                                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  13. lower-sin.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  14. lower-*.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  15. *-commutativeN/A

                                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  16. lower-*.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  17. lower-PI.f6425.4

                                    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                5. Applied rewrites25.4%

                                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                6. Step-by-step derivation
                                  1. lift-*.f64N/A

                                    \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                                  2. *-commutativeN/A

                                    \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
                                  3. lower-*.f6425.4

                                    \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
                                7. Applied rewrites26.2%

                                  \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]
                                8. Step-by-step derivation
                                  1. lift-*.f64N/A

                                    \[\leadsto \cos \left(\frac{\color{blue}{\mathsf{PI}\left(\right) \cdot angle}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                  2. *-commutativeN/A

                                    \[\leadsto \cos \left(\frac{\color{blue}{angle \cdot \mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                  3. lift-PI.f64N/A

                                    \[\leadsto \cos \left(\frac{angle \cdot \color{blue}{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                  4. add-sqr-sqrtN/A

                                    \[\leadsto \cos \left(\frac{angle \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                  5. associate-*r*N/A

                                    \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                  6. lower-*.f64N/A

                                    \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                  7. lower-*.f64N/A

                                    \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                  8. lift-PI.f64N/A

                                    \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                  9. lower-sqrt.f64N/A

                                    \[\leadsto \cos \left(\frac{\left(angle \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                  10. lift-PI.f64N/A

                                    \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                  11. lower-sqrt.f6457.1

                                    \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                9. Applied rewrites57.1%

                                  \[\leadsto \cos \left(\frac{\color{blue}{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                10. Taylor expanded in angle around 0

                                  \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                11. Step-by-step derivation
                                  1. Applied rewrites34.8%

                                    \[\leadsto \cos \left(\frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}{-180}\right) \cdot \left(\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \]
                                12. Recombined 3 regimes into one program.
                                13. Add Preprocessing

                                Alternative 10: 64.7% accurate, 2.6× speedup?

                                \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sqrt{\mathsf{PI}\left(\right)}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 5.4 \cdot 10^{+23}:\\ \;\;\;\;\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle\_m}{-180}\right) \cdot \left(\left(\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right)\\ \mathbf{elif}\;angle\_m \leq 7.2 \cdot 10^{+205}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \sin \left(t\_0 \cdot \left(t\_0 \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;angle\_m \cdot \left(0.011111111111111112 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
                                b_m = (fabs.f64 b)
                                angle\_m = (fabs.f64 angle)
                                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                (FPCore (angle_s a b_m angle_m)
                                 :precision binary64
                                 (let* ((t_0 (sqrt (PI))))
                                   (*
                                    angle_s
                                    (if (<= angle_m 5.4e+23)
                                      (*
                                       (cos (/ (* (PI) angle_m) -180.0))
                                       (* (* (* (* (+ a b_m) (PI)) angle_m) 0.011111111111111112) (- b_m a)))
                                      (if (<= angle_m 7.2e+205)
                                        (*
                                         (*
                                          (* 2.0 (* (+ b_m a) (- b_m a)))
                                          (sin (* t_0 (* t_0 (* 0.005555555555555556 angle_m)))))
                                         1.0)
                                        (*
                                         angle_m
                                         (* 0.011111111111111112 (* (* (PI) (- b_m a)) (+ a b_m)))))))))
                                \begin{array}{l}
                                b_m = \left|b\right|
                                \\
                                angle\_m = \left|angle\right|
                                \\
                                angle\_s = \mathsf{copysign}\left(1, angle\right)
                                
                                \\
                                \begin{array}{l}
                                t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
                                angle\_s \cdot \begin{array}{l}
                                \mathbf{if}\;angle\_m \leq 5.4 \cdot 10^{+23}:\\
                                \;\;\;\;\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle\_m}{-180}\right) \cdot \left(\left(\left(\left(\left(a + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right)\\
                                
                                \mathbf{elif}\;angle\_m \leq 7.2 \cdot 10^{+205}:\\
                                \;\;\;\;\left(\left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \sin \left(t\_0 \cdot \left(t\_0 \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)\right) \cdot 1\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;angle\_m \cdot \left(0.011111111111111112 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if angle < 5.3999999999999997e23

                                  1. Initial program 58.2%

                                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in angle around inf

                                    \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  4. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    2. associate-*r*N/A

                                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    3. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    4. lower-*.f64N/A

                                      \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    5. unpow2N/A

                                      \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    6. unpow2N/A

                                      \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    7. difference-of-squaresN/A

                                      \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    8. lower-*.f64N/A

                                      \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    9. lower-+.f64N/A

                                      \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    10. lower--.f64N/A

                                      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    11. *-commutativeN/A

                                      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    12. associate-*r*N/A

                                      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    13. lower-sin.f64N/A

                                      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    14. lower-*.f64N/A

                                      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    15. *-commutativeN/A

                                      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    16. lower-*.f64N/A

                                      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    17. lower-PI.f6461.9

                                      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  5. Applied rewrites61.9%

                                    \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  6. Step-by-step derivation
                                    1. lift-*.f64N/A

                                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                                    2. *-commutativeN/A

                                      \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right)} \]
                                    3. lower-*.f6461.9

                                      \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \]
                                  7. Applied rewrites75.8%

                                    \[\leadsto \color{blue}{\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(a + b\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right)} \]
                                  8. Taylor expanded in angle around 0

                                    \[\leadsto \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right)\right) \cdot \left(\color{blue}{b} - a\right)\right) \]
                                  9. Step-by-step derivation
                                    1. Applied rewrites70.9%

                                      \[\leadsto \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(\color{blue}{b} - a\right)\right) \]

                                    if 5.3999999999999997e23 < angle < 7.20000000000000003e205

                                    1. Initial program 34.7%

                                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in angle around inf

                                      \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    4. Step-by-step derivation
                                      1. *-commutativeN/A

                                        \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      2. associate-*r*N/A

                                        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      4. lower-*.f64N/A

                                        \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      5. unpow2N/A

                                        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      6. unpow2N/A

                                        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      7. difference-of-squaresN/A

                                        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      8. lower-*.f64N/A

                                        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      9. lower-+.f64N/A

                                        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      10. lower--.f64N/A

                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      11. *-commutativeN/A

                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      12. associate-*r*N/A

                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      13. lower-sin.f64N/A

                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      14. lower-*.f64N/A

                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      15. *-commutativeN/A

                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      16. lower-*.f64N/A

                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                      17. lower-PI.f6437.5

                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    5. Applied rewrites37.5%

                                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    6. Taylor expanded in angle around 0

                                      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites47.8%

                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites60.3%

                                          \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \cdot 1 \]

                                        if 7.20000000000000003e205 < angle

                                        1. Initial program 33.8%

                                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in angle around 0

                                          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                        4. Step-by-step derivation
                                          1. associate-*r*N/A

                                            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                          2. associate-*r*N/A

                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                          3. lower-*.f64N/A

                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                          4. lower-*.f64N/A

                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                          5. lower-*.f64N/A

                                            \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                          6. lower-PI.f64N/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                          7. unpow2N/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                          8. unpow2N/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                          9. difference-of-squaresN/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                          10. lower-*.f64N/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                          11. lower-+.f64N/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                          12. lower--.f6455.6

                                            \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                        5. Applied rewrites55.6%

                                          \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites55.6%

                                            \[\leadsto angle \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\right)} \]
                                        7. Recombined 3 regimes into one program.
                                        8. Final simplification68.2%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 5.4 \cdot 10^{+23}:\\ \;\;\;\;\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;angle \leq 7.2 \cdot 10^{+205}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\right)\\ \end{array} \]
                                        9. Add Preprocessing

                                        Alternative 11: 62.3% accurate, 3.2× speedup?

                                        \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1.85 \cdot 10^{+88}:\\ \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\_m\right)\right)\\ \mathbf{elif}\;angle\_m \leq 2.2 \cdot 10^{+208}:\\ \;\;\;\;\left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;angle\_m \cdot \left(0.011111111111111112 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right)\right)\\ \end{array} \end{array} \]
                                        b_m = (fabs.f64 b)
                                        angle\_m = (fabs.f64 angle)
                                        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                        (FPCore (angle_s a b_m angle_m)
                                         :precision binary64
                                         (*
                                          angle_s
                                          (if (<= angle_m 1.85e+88)
                                            (* (- b_m a) (* (* (* 0.011111111111111112 angle_m) (PI)) (+ a b_m)))
                                            (if (<= angle_m 2.2e+208)
                                              (*
                                               (* (* -2.0 (* a a)) (sin (* (* (PI) 0.005555555555555556) angle_m)))
                                               1.0)
                                              (* angle_m (* 0.011111111111111112 (* (* (PI) (- b_m a)) (+ a b_m))))))))
                                        \begin{array}{l}
                                        b_m = \left|b\right|
                                        \\
                                        angle\_m = \left|angle\right|
                                        \\
                                        angle\_s = \mathsf{copysign}\left(1, angle\right)
                                        
                                        \\
                                        angle\_s \cdot \begin{array}{l}
                                        \mathbf{if}\;angle\_m \leq 1.85 \cdot 10^{+88}:\\
                                        \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\_m\right)\right)\\
                                        
                                        \mathbf{elif}\;angle\_m \leq 2.2 \cdot 10^{+208}:\\
                                        \;\;\;\;\left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right) \cdot 1\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;angle\_m \cdot \left(0.011111111111111112 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right)\right)\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if angle < 1.84999999999999997e88

                                          1. Initial program 56.8%

                                            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in angle around 0

                                            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                          4. Step-by-step derivation
                                            1. associate-*r*N/A

                                              \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                            2. associate-*r*N/A

                                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                            3. lower-*.f64N/A

                                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                            4. lower-*.f64N/A

                                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                            5. lower-*.f64N/A

                                              \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                            6. lower-PI.f64N/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                            7. unpow2N/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                            8. unpow2N/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                            9. difference-of-squaresN/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                            10. lower-*.f64N/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                            11. lower-+.f64N/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                            12. lower--.f6458.0

                                              \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                          5. Applied rewrites58.0%

                                            \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                          6. Step-by-step derivation
                                            1. Applied rewrites69.6%

                                              \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right)} \]

                                            if 1.84999999999999997e88 < angle < 2.20000000000000014e208

                                            1. Initial program 41.7%

                                              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                            2. Add Preprocessing
                                            3. Taylor expanded in angle around inf

                                              \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                            4. Step-by-step derivation
                                              1. *-commutativeN/A

                                                \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              2. associate-*r*N/A

                                                \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              3. lower-*.f64N/A

                                                \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              4. lower-*.f64N/A

                                                \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              5. unpow2N/A

                                                \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              6. unpow2N/A

                                                \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              7. difference-of-squaresN/A

                                                \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              8. lower-*.f64N/A

                                                \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              9. lower-+.f64N/A

                                                \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              10. lower--.f64N/A

                                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              11. *-commutativeN/A

                                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              12. associate-*r*N/A

                                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              13. lower-sin.f64N/A

                                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              14. lower-*.f64N/A

                                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              15. *-commutativeN/A

                                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              16. lower-*.f64N/A

                                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              17. lower-PI.f6446.2

                                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                            5. Applied rewrites46.2%

                                              \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                            6. Taylor expanded in angle around 0

                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites56.2%

                                                \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                                              2. Taylor expanded in a around inf

                                                \[\leadsto \left(\left(-2 \cdot {a}^{2}\right) \cdot \sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)}\right) \cdot 1 \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites43.1%

                                                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)}\right) \cdot 1 \]

                                                if 2.20000000000000014e208 < angle

                                                1. Initial program 30.6%

                                                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in angle around 0

                                                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                4. Step-by-step derivation
                                                  1. associate-*r*N/A

                                                    \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                  2. associate-*r*N/A

                                                    \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                  3. lower-*.f64N/A

                                                    \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                  4. lower-*.f64N/A

                                                    \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                  5. lower-*.f64N/A

                                                    \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                  6. lower-PI.f64N/A

                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                  7. unpow2N/A

                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                  8. unpow2N/A

                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                  9. difference-of-squaresN/A

                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                  10. lower-*.f64N/A

                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                  11. lower-+.f64N/A

                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                  12. lower--.f6453.5

                                                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                5. Applied rewrites53.5%

                                                  \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                6. Step-by-step derivation
                                                  1. Applied rewrites53.5%

                                                    \[\leadsto angle \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\right)} \]
                                                7. Recombined 3 regimes into one program.
                                                8. Final simplification65.7%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 1.85 \cdot 10^{+88}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right)\\ \mathbf{elif}\;angle \leq 2.2 \cdot 10^{+208}:\\ \;\;\;\;\left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\right)\\ \end{array} \]
                                                9. Add Preprocessing

                                                Alternative 12: 65.1% accurate, 3.2× speedup?

                                                \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1.15 \cdot 10^{+88}:\\ \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right) \cdot 1\\ \end{array} \end{array} \]
                                                b_m = (fabs.f64 b)
                                                angle\_m = (fabs.f64 angle)
                                                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                (FPCore (angle_s a b_m angle_m)
                                                 :precision binary64
                                                 (*
                                                  angle_s
                                                  (if (<= angle_m 1.15e+88)
                                                    (* (- b_m a) (* (* (* 0.011111111111111112 angle_m) (PI)) (+ a b_m)))
                                                    (*
                                                     (*
                                                      (* 2.0 (* (+ b_m a) (- b_m a)))
                                                      (sin (* (* (PI) 0.005555555555555556) angle_m)))
                                                     1.0))))
                                                \begin{array}{l}
                                                b_m = \left|b\right|
                                                \\
                                                angle\_m = \left|angle\right|
                                                \\
                                                angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                
                                                \\
                                                angle\_s \cdot \begin{array}{l}
                                                \mathbf{if}\;angle\_m \leq 1.15 \cdot 10^{+88}:\\
                                                \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\_m\right)\right)\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\left(\left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right) \cdot 1\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if angle < 1.1500000000000001e88

                                                  1. Initial program 56.8%

                                                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                  2. Add Preprocessing
                                                  3. Taylor expanded in angle around 0

                                                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                  4. Step-by-step derivation
                                                    1. associate-*r*N/A

                                                      \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                    2. associate-*r*N/A

                                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                    3. lower-*.f64N/A

                                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                    4. lower-*.f64N/A

                                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                    5. lower-*.f64N/A

                                                      \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                    6. lower-PI.f64N/A

                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                    7. unpow2N/A

                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                    8. unpow2N/A

                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                    9. difference-of-squaresN/A

                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                    10. lower-*.f64N/A

                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                    11. lower-+.f64N/A

                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                    12. lower--.f6458.0

                                                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                  5. Applied rewrites58.0%

                                                    \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites69.6%

                                                      \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right)} \]

                                                    if 1.1500000000000001e88 < angle

                                                    1. Initial program 36.7%

                                                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in angle around inf

                                                      \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                    4. Step-by-step derivation
                                                      1. *-commutativeN/A

                                                        \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      2. associate-*r*N/A

                                                        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      3. lower-*.f64N/A

                                                        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      4. lower-*.f64N/A

                                                        \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      5. unpow2N/A

                                                        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      6. unpow2N/A

                                                        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      7. difference-of-squaresN/A

                                                        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      8. lower-*.f64N/A

                                                        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      9. lower-+.f64N/A

                                                        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      10. lower--.f64N/A

                                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      11. *-commutativeN/A

                                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      12. associate-*r*N/A

                                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      13. lower-sin.f64N/A

                                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      14. lower-*.f64N/A

                                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      15. *-commutativeN/A

                                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      16. lower-*.f64N/A

                                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      17. lower-PI.f6439.4

                                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                    5. Applied rewrites39.4%

                                                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                    6. Taylor expanded in angle around 0

                                                      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites51.9%

                                                        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                                                    8. Recombined 2 regimes into one program.
                                                    9. Final simplification66.4%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 1.15 \cdot 10^{+88}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot 1\\ \end{array} \]
                                                    10. Add Preprocessing

                                                    Alternative 13: 65.2% accurate, 3.2× speedup?

                                                    \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1.15 \cdot 10^{+88}:\\ \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 1\\ \end{array} \end{array} \]
                                                    b_m = (fabs.f64 b)
                                                    angle\_m = (fabs.f64 angle)
                                                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                    (FPCore (angle_s a b_m angle_m)
                                                     :precision binary64
                                                     (*
                                                      angle_s
                                                      (if (<= angle_m 1.15e+88)
                                                        (* (- b_m a) (* (* (* 0.011111111111111112 angle_m) (PI)) (+ a b_m)))
                                                        (*
                                                         (*
                                                          (* 2.0 (* (+ b_m a) (- b_m a)))
                                                          (sin (* (* 0.005555555555555556 angle_m) (PI))))
                                                         1.0))))
                                                    \begin{array}{l}
                                                    b_m = \left|b\right|
                                                    \\
                                                    angle\_m = \left|angle\right|
                                                    \\
                                                    angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                    
                                                    \\
                                                    angle\_s \cdot \begin{array}{l}
                                                    \mathbf{if}\;angle\_m \leq 1.15 \cdot 10^{+88}:\\
                                                    \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\_m\right)\right)\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\left(\left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 1\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if angle < 1.1500000000000001e88

                                                      1. Initial program 56.8%

                                                        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in angle around 0

                                                        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                      4. Step-by-step derivation
                                                        1. associate-*r*N/A

                                                          \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                        2. associate-*r*N/A

                                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                        3. lower-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                        4. lower-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                        5. lower-*.f64N/A

                                                          \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                        6. lower-PI.f64N/A

                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                        7. unpow2N/A

                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                        8. unpow2N/A

                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                        9. difference-of-squaresN/A

                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                        10. lower-*.f64N/A

                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                        11. lower-+.f64N/A

                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                        12. lower--.f6458.0

                                                          \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                      5. Applied rewrites58.0%

                                                        \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                      6. Step-by-step derivation
                                                        1. Applied rewrites69.6%

                                                          \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right)} \]

                                                        if 1.1500000000000001e88 < angle

                                                        1. Initial program 36.7%

                                                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                        2. Add Preprocessing
                                                        3. Taylor expanded in angle around inf

                                                          \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                        4. Step-by-step derivation
                                                          1. *-commutativeN/A

                                                            \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          2. associate-*r*N/A

                                                            \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          3. lower-*.f64N/A

                                                            \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          4. lower-*.f64N/A

                                                            \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          5. unpow2N/A

                                                            \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          6. unpow2N/A

                                                            \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          7. difference-of-squaresN/A

                                                            \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          8. lower-*.f64N/A

                                                            \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          9. lower-+.f64N/A

                                                            \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          10. lower--.f64N/A

                                                            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          11. *-commutativeN/A

                                                            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          12. associate-*r*N/A

                                                            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          13. lower-sin.f64N/A

                                                            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          14. lower-*.f64N/A

                                                            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          15. *-commutativeN/A

                                                            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          16. lower-*.f64N/A

                                                            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          17. lower-PI.f6439.4

                                                            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                        5. Applied rewrites39.4%

                                                          \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                        6. Taylor expanded in angle around 0

                                                          \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites51.9%

                                                            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                                                          2. Step-by-step derivation
                                                            1. Applied rewrites49.8%

                                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 1 \]
                                                          3. Recombined 2 regimes into one program.
                                                          4. Final simplification66.1%

                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 1.15 \cdot 10^{+88}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 1\\ \end{array} \]
                                                          5. Add Preprocessing

                                                          Alternative 14: 65.8% accurate, 3.3× speedup?

                                                          \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\left(b\_m - a\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a + b\_m\right)\right) \cdot 2\right)\right) \cdot 1\right) \end{array} \]
                                                          b_m = (fabs.f64 b)
                                                          angle\_m = (fabs.f64 angle)
                                                          angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                          (FPCore (angle_s a b_m angle_m)
                                                           :precision binary64
                                                           (*
                                                            angle_s
                                                            (*
                                                             (*
                                                              (- b_m a)
                                                              (* (* (sin (* (* 0.005555555555555556 (PI)) angle_m)) (+ a b_m)) 2.0))
                                                             1.0)))
                                                          \begin{array}{l}
                                                          b_m = \left|b\right|
                                                          \\
                                                          angle\_m = \left|angle\right|
                                                          \\
                                                          angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                          
                                                          \\
                                                          angle\_s \cdot \left(\left(\left(b\_m - a\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a + b\_m\right)\right) \cdot 2\right)\right) \cdot 1\right)
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Initial program 53.1%

                                                            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in angle around inf

                                                            \[\leadsto \color{blue}{\left(2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          4. Step-by-step derivation
                                                            1. *-commutativeN/A

                                                              \[\leadsto \left(2 \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            2. associate-*r*N/A

                                                              \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            3. lower-*.f64N/A

                                                              \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            4. lower-*.f64N/A

                                                              \[\leadsto \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            5. unpow2N/A

                                                              \[\leadsto \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            6. unpow2N/A

                                                              \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            7. difference-of-squaresN/A

                                                              \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            8. lower-*.f64N/A

                                                              \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            9. lower-+.f64N/A

                                                              \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            10. lower--.f64N/A

                                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            11. *-commutativeN/A

                                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            12. associate-*r*N/A

                                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            13. lower-sin.f64N/A

                                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sin \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            14. lower-*.f64N/A

                                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            15. *-commutativeN/A

                                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            16. lower-*.f64N/A

                                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                            17. lower-PI.f6456.5

                                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          5. Applied rewrites56.5%

                                                            \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          6. Taylor expanded in angle around 0

                                                            \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites55.9%

                                                              \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \color{blue}{1} \]
                                                            2. Step-by-step derivation
                                                              1. Applied rewrites65.8%

                                                                \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot 2\right)}\right) \cdot 1 \]
                                                              2. Add Preprocessing

                                                              Alternative 15: 58.7% accurate, 13.7× speedup?

                                                              \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 3.45 \cdot 10^{-161}:\\ \;\;\;\;\left(\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot 0.011111111111111112\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\_m\right)\right)\\ \end{array} \end{array} \]
                                                              b_m = (fabs.f64 b)
                                                              angle\_m = (fabs.f64 angle)
                                                              angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                              (FPCore (angle_s a b_m angle_m)
                                                               :precision binary64
                                                               (*
                                                                angle_s
                                                                (if (<= a 3.45e-161)
                                                                  (* (* (* (- b_m a) (+ a b_m)) 0.011111111111111112) (* (PI) angle_m))
                                                                  (* (- b_m a) (* (* (* 0.011111111111111112 angle_m) (PI)) (+ a b_m))))))
                                                              \begin{array}{l}
                                                              b_m = \left|b\right|
                                                              \\
                                                              angle\_m = \left|angle\right|
                                                              \\
                                                              angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                              
                                                              \\
                                                              angle\_s \cdot \begin{array}{l}
                                                              \mathbf{if}\;a \leq 3.45 \cdot 10^{-161}:\\
                                                              \;\;\;\;\left(\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot 0.011111111111111112\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\_m\right)\right)\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if a < 3.45000000000000001e-161

                                                                1. Initial program 53.9%

                                                                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in angle around 0

                                                                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                4. Step-by-step derivation
                                                                  1. associate-*r*N/A

                                                                    \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                  2. associate-*r*N/A

                                                                    \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                  3. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                  4. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  5. lower-*.f64N/A

                                                                    \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  6. lower-PI.f64N/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  7. unpow2N/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                  8. unpow2N/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                  9. difference-of-squaresN/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                  10. lower-*.f64N/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                  11. lower-+.f64N/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                  12. lower--.f6455.3

                                                                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                5. Applied rewrites55.3%

                                                                  \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                6. Step-by-step derivation
                                                                  1. Applied rewrites55.8%

                                                                    \[\leadsto \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]

                                                                  if 3.45000000000000001e-161 < a

                                                                  1. Initial program 51.9%

                                                                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in angle around 0

                                                                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                  4. Step-by-step derivation
                                                                    1. associate-*r*N/A

                                                                      \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                    2. associate-*r*N/A

                                                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                    3. lower-*.f64N/A

                                                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                    4. lower-*.f64N/A

                                                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                    5. lower-*.f64N/A

                                                                      \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                    6. lower-PI.f64N/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                    7. unpow2N/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                    8. unpow2N/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                    9. difference-of-squaresN/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                    10. lower-*.f64N/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                    11. lower-+.f64N/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                    12. lower--.f6451.1

                                                                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                  5. Applied rewrites51.1%

                                                                    \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                  6. Step-by-step derivation
                                                                    1. Applied rewrites63.6%

                                                                      \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right)} \]
                                                                  7. Recombined 2 regimes into one program.
                                                                  8. Final simplification58.8%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.45 \cdot 10^{-161}:\\ \;\;\;\;\left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right)\\ \end{array} \]
                                                                  9. Add Preprocessing

                                                                  Alternative 16: 38.2% accurate, 21.6× speedup?

                                                                  \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right) \end{array} \]
                                                                  b_m = (fabs.f64 b)
                                                                  angle\_m = (fabs.f64 angle)
                                                                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                  (FPCore (angle_s a b_m angle_m)
                                                                   :precision binary64
                                                                   (* angle_s (* (* -0.011111111111111112 a) (* a (* angle_m (PI))))))
                                                                  \begin{array}{l}
                                                                  b_m = \left|b\right|
                                                                  \\
                                                                  angle\_m = \left|angle\right|
                                                                  \\
                                                                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                  
                                                                  \\
                                                                  angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right)
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Initial program 53.1%

                                                                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in angle around 0

                                                                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                  4. Step-by-step derivation
                                                                    1. associate-*r*N/A

                                                                      \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                    2. associate-*r*N/A

                                                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                    3. lower-*.f64N/A

                                                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                    4. lower-*.f64N/A

                                                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                    5. lower-*.f64N/A

                                                                      \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                    6. lower-PI.f64N/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                    7. unpow2N/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                    8. unpow2N/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                    9. difference-of-squaresN/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                    10. lower-*.f64N/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                    11. lower-+.f64N/A

                                                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                    12. lower--.f6453.7

                                                                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                  5. Applied rewrites53.7%

                                                                    \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                  6. Taylor expanded in a around inf

                                                                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites32.1%

                                                                      \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
                                                                    2. Step-by-step derivation
                                                                      1. Applied rewrites37.2%

                                                                        \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                                                                      2. Final simplification37.2%

                                                                        \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                                                                      3. Add Preprocessing

                                                                      Reproduce

                                                                      ?
                                                                      herbie shell --seed 2025005 
                                                                      (FPCore (a b angle)
                                                                        :name "ab-angle->ABCF B"
                                                                        :precision binary64
                                                                        (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (PI) (/ angle 180.0)))) (cos (* (PI) (/ angle 180.0)))))