ab-angle->ABCF B

Percentage Accurate: 53.3% → 65.8%
Time: 11.4s
Alternatives: 28
Speedup: 16.8×

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 28 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: 53.3% 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.8% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;angle\_m \leq 2 \cdot 10^{+155}:\\
\;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(\frac{{t\_0}^{2} - 0.25 \cdot t\_2}{t\_0 - t\_3}\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right)\\

\mathbf{elif}\;angle\_m \leq 1.5 \cdot 10^{+249}:\\
\;\;\;\;\left(\left(\sin t\_3 \cdot \left(t\_1 \cdot 2\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), t\_2, 1\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if angle < 1.9000000000000001e45

    1. Initial program 57.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 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. Applied rewrites59.5%

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

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

          \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
        3. Step-by-step derivation
          1. Applied rewrites59.1%

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

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

              \[\leadsto \left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\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 \left(b - a\right)\right)} \]

            if 1.9000000000000001e45 < angle < 2.00000000000000001e155

            1. Initial program 24.5%

              \[\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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
              3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
              4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
              5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
              6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
              7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
              8. lower-/.f6428.6

                \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
            4. Applied rewrites28.6%

              \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
            5. Taylor expanded in angle around inf

              \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
            6. Step-by-step derivation
              1. Applied rewrites28.5%

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

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

                if 2.00000000000000001e155 < angle < 1.50000000000000008e249

                1. Initial program 53.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                  3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                  4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                  7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                  8. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                5. Taylor expanded in angle around inf

                  \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                6. Step-by-step derivation
                  1. Applied rewrites56.9%

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

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

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

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

                      if 1.50000000000000008e249 < angle

                      1. Initial program 19.5%

                        \[\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 \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}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
                      4. Step-by-step derivation
                        1. Applied rewrites33.6%

                          \[\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}{\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)} \]
                      5. Recombined 4 regimes into one program.
                      6. Final simplification64.9%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 1.9 \cdot 10^{+45}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;angle \leq 2 \cdot 10^{+155}:\\ \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(\frac{{\left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}^{2} - 0.25 \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}{\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle - 0.5 \cdot \mathsf{PI}\left(\right)}\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\\ \mathbf{elif}\;angle \leq 1.5 \cdot 10^{+249}:\\ \;\;\;\;\left(\left(\sin \left(0.5 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\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 \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\ \end{array} \]
                      7. Add Preprocessing

                      Alternative 2: 65.3% accurate, 0.7× speedup?

                      \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := e^{\log b\_m}\\ t_1 := \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1.9 \cdot 10^{+45}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\ \mathbf{elif}\;angle\_m \leq 2.6 \cdot 10^{+235}:\\ \;\;\;\;\left(\left(2 \cdot \mathsf{fma}\left(t\_0, t\_0, \left(-a\_m\right) \cdot a\_m\right)\right) \cdot t\_1\right) \cdot \sin \left(\mathsf{fma}\left(\frac{angle\_m}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot t\_1\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\ \end{array} \end{array} \end{array} \]
                      b_m = (fabs.f64 b)
                      a_m = (fabs.f64 a)
                      angle\_m = (fabs.f64 angle)
                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                      (FPCore (angle_s a_m b_m angle_m)
                       :precision binary64
                       (let* ((t_0 (exp (log b_m))) (t_1 (sin (* (PI) (/ angle_m 180.0)))))
                         (*
                          angle_s
                          (if (<= angle_m 1.9e+45)
                            (*
                             (* 2.0 (cos (* (* -0.005555555555555556 (PI)) angle_m)))
                             (*
                              (* (sin (* (* 0.005555555555555556 (PI)) angle_m)) (+ a_m b_m))
                              (- b_m a_m)))
                            (if (<= angle_m 2.6e+235)
                              (*
                               (* (* 2.0 (fma t_0 t_0 (* (- a_m) a_m))) t_1)
                               (sin (fma (/ angle_m 180.0) (PI) (/ (PI) 2.0))))
                              (*
                               (* (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) t_1)
                               (fma
                                (* -1.54320987654321e-5 (* angle_m angle_m))
                                (* (PI) (PI))
                                1.0)))))))
                      \begin{array}{l}
                      b_m = \left|b\right|
                      \\
                      a_m = \left|a\right|
                      \\
                      angle\_m = \left|angle\right|
                      \\
                      angle\_s = \mathsf{copysign}\left(1, angle\right)
                      
                      \\
                      \begin{array}{l}
                      t_0 := e^{\log b\_m}\\
                      t_1 := \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\\
                      angle\_s \cdot \begin{array}{l}
                      \mathbf{if}\;angle\_m \leq 1.9 \cdot 10^{+45}:\\
                      \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\
                      
                      \mathbf{elif}\;angle\_m \leq 2.6 \cdot 10^{+235}:\\
                      \;\;\;\;\left(\left(2 \cdot \mathsf{fma}\left(t\_0, t\_0, \left(-a\_m\right) \cdot a\_m\right)\right) \cdot t\_1\right) \cdot \sin \left(\mathsf{fma}\left(\frac{angle\_m}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot t\_1\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if angle < 1.9000000000000001e45

                        1. Initial program 57.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 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. Applied rewrites59.5%

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

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

                              \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                            3. Step-by-step derivation
                              1. Applied rewrites59.1%

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

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

                                  \[\leadsto \left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\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 \left(b - a\right)\right)} \]

                                if 1.9000000000000001e45 < angle < 2.5999999999999998e235

                                1. Initial program 33.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                  3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                  4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                  5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                  6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                  7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                  8. lower-/.f6436.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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                4. Applied rewrites36.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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                5. Step-by-step derivation
                                  1. lift--.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \color{blue}{\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
                                  2. lift-pow.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
                                  3. pow2N/A

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

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

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

                                    \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
                                  7. fp-cancel-sub-sign-invN/A

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

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

                                    \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{b}^{2}} + \left(\mathsf{neg}\left(a\right)\right) \cdot a\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
                                  10. pow-to-expN/A

                                    \[\leadsto \left(\left(2 \cdot \left(\color{blue}{e^{\log b \cdot 2}} + \left(\mathsf{neg}\left(a\right)\right) \cdot a\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
                                  11. exp-lft-sqrN/A

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

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

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

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

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

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

                                    \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(e^{\log b}, e^{\log b}, \color{blue}{\left(\mathsf{neg}\left(a\right)\right) \cdot a}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
                                  18. lower-neg.f6416.6

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

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

                                if 2.5999999999999998e235 < angle

                                1. Initial program 24.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 0

                                  \[\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}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites37.5%

                                    \[\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}{\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)} \]
                                5. Recombined 3 regimes into one program.
                                6. Final simplification60.6%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 1.9 \cdot 10^{+45}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;angle \leq 2.6 \cdot 10^{+235}:\\ \;\;\;\;\left(\left(2 \cdot \mathsf{fma}\left(e^{\log b}, e^{\log b}, \left(-a\right) \cdot a\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\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 \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\ \end{array} \]
                                7. Add Preprocessing

                                Alternative 3: 61.9% accurate, 0.7× speedup?

                                \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot a\_m\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;\left(angle\_m \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\_m\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(\left(a\_m \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\\ \end{array} \end{array} \end{array} \]
                                b_m = (fabs.f64 b)
                                a_m = (fabs.f64 a)
                                angle\_m = (fabs.f64 angle)
                                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                (FPCore (angle_s a_m b_m angle_m)
                                 :precision binary64
                                 (let* ((t_0 (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0)))))
                                   (*
                                    angle_s
                                    (if (<= t_0 (- INFINITY))
                                      (* (- b_m a_m) (* (* 0.011111111111111112 angle_m) (* (PI) a_m)))
                                      (if (<= t_0 2e+306)
                                        (*
                                         (* angle_m (* 0.011111111111111112 (PI)))
                                         (* (+ b_m a_m) (- b_m a_m)))
                                        (if (<= t_0 INFINITY)
                                          (* (- b_m a_m) (* (* (* (PI) b_m) angle_m) 0.011111111111111112))
                                          (* (* -0.011111111111111112 a_m) (* (* a_m angle_m) (PI)))))))))
                                \begin{array}{l}
                                b_m = \left|b\right|
                                \\
                                a_m = \left|a\right|
                                \\
                                angle\_m = \left|angle\right|
                                \\
                                angle\_s = \mathsf{copysign}\left(1, angle\right)
                                
                                \\
                                \begin{array}{l}
                                t_0 := 2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\\
                                angle\_s \cdot \begin{array}{l}
                                \mathbf{if}\;t\_0 \leq -\infty:\\
                                \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot a\_m\right)\right)\\
                                
                                \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+306}:\\
                                \;\;\;\;\left(angle\_m \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\\
                                
                                \mathbf{elif}\;t\_0 \leq \infty:\\
                                \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\_m\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(\left(a\_m \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 4 regimes
                                2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -inf.0

                                  1. Initial program 44.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 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. Applied rewrites54.9%

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

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

                                        \[\leadsto \left(b - a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(a \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites81.5%

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

                                        if -inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 2.00000000000000003e306

                                        1. Initial program 57.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 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. Applied rewrites53.3%

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

                                          if 2.00000000000000003e306 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0

                                          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. Applied rewrites54.8%

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

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

                                                \[\leadsto \left(b - a\right) \cdot \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites71.4%

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

                                                if +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                                                1. Initial program 0.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 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. Applied rewrites21.8%

                                                    \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                  2. 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)} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites34.0%

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

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

                                                          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                                                      3. Recombined 4 regimes into one program.
                                                      4. Add Preprocessing

                                                      Alternative 4: 61.9% accurate, 0.7× speedup?

                                                      \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot a\_m\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+144}:\\ \;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 0.011111111111111112\right) \cdot angle\_m\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\_m\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(\left(a\_m \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\\ \end{array} \end{array} \end{array} \]
                                                      b_m = (fabs.f64 b)
                                                      a_m = (fabs.f64 a)
                                                      angle\_m = (fabs.f64 angle)
                                                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                      (FPCore (angle_s a_m b_m angle_m)
                                                       :precision binary64
                                                       (let* ((t_0 (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0)))))
                                                         (*
                                                          angle_s
                                                          (if (<= t_0 (- INFINITY))
                                                            (* (- b_m a_m) (* (* 0.011111111111111112 angle_m) (* (PI) a_m)))
                                                            (if (<= t_0 2e+144)
                                                              (*
                                                               (* (* (* (PI) (+ a_m b_m)) (- b_m a_m)) 0.011111111111111112)
                                                               angle_m)
                                                              (if (<= t_0 INFINITY)
                                                                (* (- b_m a_m) (* (* (* (PI) b_m) angle_m) 0.011111111111111112))
                                                                (* (* -0.011111111111111112 a_m) (* (* a_m angle_m) (PI)))))))))
                                                      \begin{array}{l}
                                                      b_m = \left|b\right|
                                                      \\
                                                      a_m = \left|a\right|
                                                      \\
                                                      angle\_m = \left|angle\right|
                                                      \\
                                                      angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_0 := 2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\\
                                                      angle\_s \cdot \begin{array}{l}
                                                      \mathbf{if}\;t\_0 \leq -\infty:\\
                                                      \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot a\_m\right)\right)\\
                                                      
                                                      \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+144}:\\
                                                      \;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 0.011111111111111112\right) \cdot angle\_m\\
                                                      
                                                      \mathbf{elif}\;t\_0 \leq \infty:\\
                                                      \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\_m\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(\left(a\_m \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 4 regimes
                                                      2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -inf.0

                                                        1. Initial program 44.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 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. Applied rewrites54.9%

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

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

                                                              \[\leadsto \left(b - a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(a \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites81.5%

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

                                                              if -inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 2.00000000000000005e144

                                                              1. Initial program 58.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}{angle \cdot \left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) + {angle}^{2} \cdot \left(2 \cdot \left({angle}^{2} \cdot \left(\frac{1}{22674816000000} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left({b}^{2} - {a}^{2}\right)\right) + \left(\frac{1}{4534963200000} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left({b}^{2} - {a}^{2}\right)\right) + \frac{1}{2267481600000} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right) + 2 \cdot \left(\frac{-1}{11664000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left({b}^{2} - {a}^{2}\right)\right) + \frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)} \]
                                                              4. Applied rewrites52.9%

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right), \mathsf{PI}\left(\right), \mathsf{fma}\left(\left(angle \cdot angle\right) \cdot 2, \left({\mathsf{PI}\left(\right)}^{5} \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 7.056286586845953 \cdot 10^{-13}, \left({\mathsf{PI}\left(\right)}^{3} \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot -2.2862368541380886 \cdot 10^{-7}\right) \cdot \left(angle \cdot angle\right)\right) \cdot angle} \]
                                                              5. Taylor expanded in angle around 0

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

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

                                                                if 2.00000000000000005e144 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0

                                                                1. Initial program 53.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 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. Applied rewrites52.3%

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

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

                                                                      \[\leadsto \left(b - a\right) \cdot \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites65.0%

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

                                                                      if +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                                                                      1. Initial program 0.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 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. Applied rewrites21.8%

                                                                          \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                        2. 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)} \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites34.0%

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

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

                                                                                \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                                                                            3. Recombined 4 regimes into one program.
                                                                            4. Add Preprocessing

                                                                            Alternative 5: 59.6% accurate, 1.0× speedup?

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

                                                                              1. Initial program 55.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 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. Applied rewrites55.7%

                                                                                  \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                2. 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)} \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites54.7%

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

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

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

                                                                                      if 2.00000000000000018e-111 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0

                                                                                      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. Applied rewrites51.7%

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

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

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

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

                                                                                            if +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                                                                                            1. Initial program 0.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 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. Applied rewrites21.8%

                                                                                                \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                              2. 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)} \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites34.0%

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

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

                                                                                                      \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                                                                                                  3. Recombined 3 regimes into one program.
                                                                                                  4. Add Preprocessing

                                                                                                  Alternative 6: 59.6% accurate, 1.0× speedup?

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

                                                                                                    1. Initial program 55.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 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. Applied rewrites55.7%

                                                                                                        \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                      2. 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)} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites54.7%

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

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

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

                                                                                                            if 2.00000000000000018e-111 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0

                                                                                                            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. Applied rewrites51.7%

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

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

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

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

                                                                                                                  if +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                                                                                                                  1. Initial program 0.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 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. Applied rewrites21.8%

                                                                                                                      \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                    2. 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)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. Applied rewrites34.0%

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

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

                                                                                                                            \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                                                                                                                        3. Recombined 3 regimes into one program.
                                                                                                                        4. Add Preprocessing

                                                                                                                        Alternative 7: 56.7% accurate, 1.0× speedup?

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

                                                                                                                          1. Initial program 51.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 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. Applied rewrites52.4%

                                                                                                                              \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                            2. 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)} \]
                                                                                                                            3. Step-by-step derivation
                                                                                                                              1. Applied rewrites50.9%

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

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

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

                                                                                                                                  if -3.99999999999999991e-137 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0

                                                                                                                                  1. Initial program 57.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. Applied rewrites55.0%

                                                                                                                                      \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                    2. 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)} \]
                                                                                                                                    3. Step-by-step derivation
                                                                                                                                      1. Applied rewrites54.8%

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

                                                                                                                                      if +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                                                                                                                                      1. Initial program 0.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 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. Applied rewrites21.8%

                                                                                                                                          \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                        2. 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)} \]
                                                                                                                                        3. Step-by-step derivation
                                                                                                                                          1. Applied rewrites34.0%

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

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

                                                                                                                                                \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                                                                                                                                            3. Recombined 3 regimes into one program.
                                                                                                                                            4. Add Preprocessing

                                                                                                                                            Alternative 8: 65.7% accurate, 1.2× speedup?

                                                                                                                                            \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right), angle\_m, \frac{\mathsf{PI}\left(\right)}{2}\right)\\ t_1 := \left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\\ t_2 := \sqrt{\mathsf{PI}\left(\right)}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 10^{+26}:\\ \;\;\;\;\left(\left(\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\sin t\_1 \cdot 2\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\\ \mathbf{elif}\;angle\_m \leq 8.5 \cdot 10^{+171}:\\ \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(\left(\mathsf{fma}\left(0.005555555555555556, angle\_m, 0.5\right) \cdot t\_2\right) \cdot t\_2\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right)\\ \mathbf{elif}\;angle\_m \leq 2.9 \cdot 10^{+235}:\\ \;\;\;\;\frac{\cos \left(t\_1 - t\_0\right) - \cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \mathsf{PI}\left(\right), t\_0\right)\right)}{2} \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\ \end{array} \end{array} \end{array} \]
                                                                                                                                            b_m = (fabs.f64 b)
                                                                                                                                            a_m = (fabs.f64 a)
                                                                                                                                            angle\_m = (fabs.f64 angle)
                                                                                                                                            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                            (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                             :precision binary64
                                                                                                                                             (let* ((t_0 (fma (* -0.005555555555555556 (PI)) angle_m (/ (PI) 2.0)))
                                                                                                                                                    (t_1 (* (* 0.005555555555555556 (PI)) angle_m))
                                                                                                                                                    (t_2 (sqrt (PI))))
                                                                                                                                               (*
                                                                                                                                                angle_s
                                                                                                                                                (if (<= angle_m 1e+26)
                                                                                                                                                  (*
                                                                                                                                                   (*
                                                                                                                                                    (*
                                                                                                                                                     (sin (* (PI) (fma 0.005555555555555556 angle_m 0.5)))
                                                                                                                                                     (* (sin t_1) 2.0))
                                                                                                                                                    (- b_m a_m))
                                                                                                                                                   (+ a_m b_m))
                                                                                                                                                  (if (<= angle_m 8.5e+171)
                                                                                                                                                    (*
                                                                                                                                                     (* (sin (* (* (PI) angle_m) 0.005555555555555556)) 2.0)
                                                                                                                                                     (*
                                                                                                                                                      (sin (* (* (fma 0.005555555555555556 angle_m 0.5) t_2) t_2))
                                                                                                                                                      (* (- b_m a_m) (+ a_m b_m))))
                                                                                                                                                    (if (<= angle_m 2.9e+235)
                                                                                                                                                      (*
                                                                                                                                                       (/
                                                                                                                                                        (-
                                                                                                                                                         (cos (- t_1 t_0))
                                                                                                                                                         (cos (fma (* 0.005555555555555556 angle_m) (PI) t_0)))
                                                                                                                                                        2.0)
                                                                                                                                                       (* (* (+ a_m b_m) (- b_m a_m)) 2.0))
                                                                                                                                                      (*
                                                                                                                                                       (*
                                                                                                                                                        (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0)))
                                                                                                                                                        (sin (* (PI) (/ angle_m 180.0))))
                                                                                                                                                       (fma
                                                                                                                                                        (* -1.54320987654321e-5 (* angle_m angle_m))
                                                                                                                                                        (* (PI) (PI))
                                                                                                                                                        1.0))))))))
                                                                                                                                            \begin{array}{l}
                                                                                                                                            b_m = \left|b\right|
                                                                                                                                            \\
                                                                                                                                            a_m = \left|a\right|
                                                                                                                                            \\
                                                                                                                                            angle\_m = \left|angle\right|
                                                                                                                                            \\
                                                                                                                                            angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                                                                            
                                                                                                                                            \\
                                                                                                                                            \begin{array}{l}
                                                                                                                                            t_0 := \mathsf{fma}\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right), angle\_m, \frac{\mathsf{PI}\left(\right)}{2}\right)\\
                                                                                                                                            t_1 := \left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\\
                                                                                                                                            t_2 := \sqrt{\mathsf{PI}\left(\right)}\\
                                                                                                                                            angle\_s \cdot \begin{array}{l}
                                                                                                                                            \mathbf{if}\;angle\_m \leq 10^{+26}:\\
                                                                                                                                            \;\;\;\;\left(\left(\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(0.005555555555555556, angle\_m, 0.5\right)\right) \cdot \left(\sin t\_1 \cdot 2\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\\
                                                                                                                                            
                                                                                                                                            \mathbf{elif}\;angle\_m \leq 8.5 \cdot 10^{+171}:\\
                                                                                                                                            \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(\left(\mathsf{fma}\left(0.005555555555555556, angle\_m, 0.5\right) \cdot t\_2\right) \cdot t\_2\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right)\\
                                                                                                                                            
                                                                                                                                            \mathbf{elif}\;angle\_m \leq 2.9 \cdot 10^{+235}:\\
                                                                                                                                            \;\;\;\;\frac{\cos \left(t\_1 - t\_0\right) - \cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \mathsf{PI}\left(\right), t\_0\right)\right)}{2} \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right)\\
                                                                                                                                            
                                                                                                                                            \mathbf{else}:\\
                                                                                                                                            \;\;\;\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            \end{array}
                                                                                                                                            \end{array}
                                                                                                                                            \end{array}
                                                                                                                                            
                                                                                                                                            Derivation
                                                                                                                                            1. Split input into 4 regimes
                                                                                                                                            2. if angle < 1.00000000000000005e26

                                                                                                                                              1. Initial program 58.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                8. lower-/.f6458.2

                                                                                                                                                  \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                              4. Applied rewrites58.2%

                                                                                                                                                \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                              5. Taylor expanded in angle around inf

                                                                                                                                                \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                              6. Step-by-step derivation
                                                                                                                                                1. Applied rewrites60.6%

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

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

                                                                                                                                                  if 1.00000000000000005e26 < angle < 8.4999999999999995e171

                                                                                                                                                  1. Initial program 24.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                    3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                    4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                    5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                    6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                    7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                    8. lower-/.f6428.4

                                                                                                                                                      \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                                  4. Applied rewrites28.4%

                                                                                                                                                    \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                  5. Taylor expanded in angle around inf

                                                                                                                                                    \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                                  6. Step-by-step derivation
                                                                                                                                                    1. Applied rewrites28.8%

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

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

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

                                                                                                                                                        if 8.4999999999999995e171 < angle < 2.90000000000000021e235

                                                                                                                                                        1. Initial program 50.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 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. Applied rewrites50.8%

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

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

                                                                                                                                                              \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                              1. Applied rewrites42.0%

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

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

                                                                                                                                                                if 2.90000000000000021e235 < angle

                                                                                                                                                                1. Initial program 24.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 0

                                                                                                                                                                  \[\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}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
                                                                                                                                                                4. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites37.5%

                                                                                                                                                                    \[\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}{\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)} \]
                                                                                                                                                                5. Recombined 4 regimes into one program.
                                                                                                                                                                6. Final simplification66.6%

                                                                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 10^{+26}:\\ \;\;\;\;\left(\left(\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(0.005555555555555556, angle, 0.5\right)\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{elif}\;angle \leq 8.5 \cdot 10^{+171}:\\ \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(\left(\mathsf{fma}\left(0.005555555555555556, angle, 0.5\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\\ \mathbf{elif}\;angle \leq 2.9 \cdot 10^{+235}:\\ \;\;\;\;\frac{\cos \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle - \mathsf{fma}\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right), angle, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) - \cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \mathsf{PI}\left(\right), \mathsf{fma}\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right), angle, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right)}{2} \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;\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 \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\ \end{array} \]
                                                                                                                                                                7. Add Preprocessing

                                                                                                                                                                Alternative 9: 67.0% accurate, 1.4× speedup?

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

                                                                                                                                                                  1. Initial program 58.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                    3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                    4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                    5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                    6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                    7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                                    8. lower-/.f6458.2

                                                                                                                                                                      \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                                                  4. Applied rewrites58.2%

                                                                                                                                                                    \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                  5. Taylor expanded in angle around inf

                                                                                                                                                                    \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                                                  6. Step-by-step derivation
                                                                                                                                                                    1. Applied rewrites60.6%

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

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

                                                                                                                                                                      if 1.00000000000000005e26 < angle < 8.4999999999999995e171

                                                                                                                                                                      1. Initial program 24.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                        3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                        4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                        5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                        6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                        7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                                        8. lower-/.f6428.4

                                                                                                                                                                          \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                                                      4. Applied rewrites28.4%

                                                                                                                                                                        \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                      5. Taylor expanded in angle around inf

                                                                                                                                                                        \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                                                      6. Step-by-step derivation
                                                                                                                                                                        1. Applied rewrites28.8%

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

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

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

                                                                                                                                                                            if 8.4999999999999995e171 < angle

                                                                                                                                                                            1. Initial program 35.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 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. Applied rewrites28.9%

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

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

                                                                                                                                                                                  \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                  1. Applied rewrites35.7%

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

                                                                                                                                                                                      \[\leadsto \frac{\cos \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle - \mathsf{fma}\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right), angle, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) - \cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \mathsf{PI}\left(\right), \mathsf{fma}\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right), angle, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right)}{2} \cdot \left(\color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right)} \cdot 2\right) \]
                                                                                                                                                                                  3. Recombined 3 regimes into one program.
                                                                                                                                                                                  4. Final simplification65.6%

                                                                                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 10^{+26}:\\ \;\;\;\;\left(\left(\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(0.005555555555555556, angle, 0.5\right)\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{elif}\;angle \leq 8.5 \cdot 10^{+171}:\\ \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(\left(\mathsf{fma}\left(0.005555555555555556, angle, 0.5\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle - \mathsf{fma}\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right), angle, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) - \cos \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \mathsf{PI}\left(\right), \mathsf{fma}\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right), angle, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right)}{2} \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 2\right)\\ \end{array} \]
                                                                                                                                                                                  5. Add Preprocessing

                                                                                                                                                                                  Alternative 10: 67.3% accurate, 1.6× speedup?

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

                                                                                                                                                                                    1. Initial program 58.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                      3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                      4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                      5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                      6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                      7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                                                      8. lower-/.f6458.2

                                                                                                                                                                                        \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                                                                    4. Applied rewrites58.2%

                                                                                                                                                                                      \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                    5. Taylor expanded in angle around inf

                                                                                                                                                                                      \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                                                                    6. Step-by-step derivation
                                                                                                                                                                                      1. Applied rewrites60.6%

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

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

                                                                                                                                                                                        if 1.00000000000000005e26 < angle

                                                                                                                                                                                        1. Initial program 29.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                          3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                          4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                          5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                          6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                          7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                                                          8. lower-/.f6430.5

                                                                                                                                                                                            \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                                                                        4. Applied rewrites30.5%

                                                                                                                                                                                          \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                        5. Taylor expanded in angle around inf

                                                                                                                                                                                          \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                                                                        6. Step-by-step derivation
                                                                                                                                                                                          1. Applied rewrites30.2%

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

                                                                                                                                                                                              \[\leadsto \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(\frac{{\left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}^{2} - 0.25 \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}{\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle - 0.5 \cdot \mathsf{PI}\left(\right)}\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \left(a + b\right)\right)\right) \]
                                                                                                                                                                                            2. Step-by-step derivation
                                                                                                                                                                                              1. Applied rewrites31.4%

                                                                                                                                                                                                \[\leadsto \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(\left(\mathsf{fma}\left(0.005555555555555556, angle, 0.5\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \left(a + b\right)\right)\right) \]
                                                                                                                                                                                            3. Recombined 2 regimes into one program.
                                                                                                                                                                                            4. Final simplification64.6%

                                                                                                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 10^{+26}:\\ \;\;\;\;\left(\left(\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(0.005555555555555556, angle, 0.5\right)\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(\left(\mathsf{fma}\left(0.005555555555555556, angle, 0.5\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\\ \end{array} \]
                                                                                                                                                                                            5. Add Preprocessing

                                                                                                                                                                                            Alternative 11: 67.2% accurate, 1.7× speedup?

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

                                                                                                                                                                                              1. Initial program 55.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. Applied rewrites57.1%

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

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

                                                                                                                                                                                                    \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                                                    1. Applied rewrites57.9%

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

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

                                                                                                                                                                                                        \[\leadsto \left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\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 \left(b - a\right)\right)} \]

                                                                                                                                                                                                      if 2.6000000000000001e107 < angle < 9.6000000000000004e207

                                                                                                                                                                                                      1. Initial program 31.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                                        3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                                        4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                                        5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                                        6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                                        7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                                                                        8. lower-/.f6442.4

                                                                                                                                                                                                          \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                                                                                      4. Applied rewrites42.4%

                                                                                                                                                                                                        \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                                      5. Taylor expanded in angle around inf

                                                                                                                                                                                                        \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                                                                                      6. Step-by-step derivation
                                                                                                                                                                                                        1. Applied rewrites42.5%

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

                                                                                                                                                                                                        if 9.6000000000000004e207 < angle

                                                                                                                                                                                                        1. Initial program 29.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. Applied rewrites18.2%

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

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

                                                                                                                                                                                                              \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                                                              1. Applied rewrites34.8%

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

                                                                                                                                                                                                                  \[\leadsto \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \sin \left(\mathsf{fma}\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right), angle, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot 2\right) \]
                                                                                                                                                                                                              3. Recombined 3 regimes into one program.
                                                                                                                                                                                                              4. Final simplification65.2%

                                                                                                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 2.6 \cdot 10^{+107}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;angle \leq 9.6 \cdot 10^{+207}:\\ \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \mathsf{PI}\left(\right), \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \sin \left(\mathsf{fma}\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right), angle, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 2\right)\\ \end{array} \]
                                                                                                                                                                                                              5. Add Preprocessing

                                                                                                                                                                                                              Alternative 12: 67.3% accurate, 1.7× speedup?

                                                                                                                                                                                                              \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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}\;angle\_m \leq 8 \cdot 10^{+111} \lor \neg \left(angle\_m \leq 5 \cdot 10^{+262}\right):\\ \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right) \cdot \left(\left(t\_0 \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 \cdot 1\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right)\\ \end{array} \end{array} \end{array} \]
                                                                                                                                                                                                              b_m = (fabs.f64 b)
                                                                                                                                                                                                              a_m = (fabs.f64 a)
                                                                                                                                                                                                              angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                              angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                              (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                               :precision binary64
                                                                                                                                                                                                               (let* ((t_0 (sin (* (* 0.005555555555555556 (PI)) angle_m))))
                                                                                                                                                                                                                 (*
                                                                                                                                                                                                                  angle_s
                                                                                                                                                                                                                  (if (or (<= angle_m 8e+111) (not (<= angle_m 5e+262)))
                                                                                                                                                                                                                    (*
                                                                                                                                                                                                                     (* 2.0 (cos (* (* -0.005555555555555556 (PI)) angle_m)))
                                                                                                                                                                                                                     (* (* t_0 (+ a_m b_m)) (- b_m a_m)))
                                                                                                                                                                                                                    (* (* t_0 1.0) (* (* (+ a_m b_m) (- b_m a_m)) 2.0))))))
                                                                                                                                                                                                              \begin{array}{l}
                                                                                                                                                                                                              b_m = \left|b\right|
                                                                                                                                                                                                              \\
                                                                                                                                                                                                              a_m = \left|a\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}\;angle\_m \leq 8 \cdot 10^{+111} \lor \neg \left(angle\_m \leq 5 \cdot 10^{+262}\right):\\
                                                                                                                                                                                                              \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right) \cdot \left(\left(t\_0 \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\
                                                                                                                                                                                                              
                                                                                                                                                                                                              \mathbf{else}:\\
                                                                                                                                                                                                              \;\;\;\;\left(t\_0 \cdot 1\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right)\\
                                                                                                                                                                                                              
                                                                                                                                                                                                              
                                                                                                                                                                                                              \end{array}
                                                                                                                                                                                                              \end{array}
                                                                                                                                                                                                              \end{array}
                                                                                                                                                                                                              
                                                                                                                                                                                                              Derivation
                                                                                                                                                                                                              1. Split input into 2 regimes
                                                                                                                                                                                                              2. if angle < 7.99999999999999965e111 or 5.00000000000000008e262 < angle

                                                                                                                                                                                                                1. Initial program 53.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. Applied rewrites54.6%

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

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

                                                                                                                                                                                                                      \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                                                                      1. Applied rewrites56.2%

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

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

                                                                                                                                                                                                                          \[\leadsto \left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\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 \left(b - a\right)\right)} \]

                                                                                                                                                                                                                        if 7.99999999999999965e111 < angle < 5.00000000000000008e262

                                                                                                                                                                                                                        1. Initial program 34.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 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. Applied rewrites32.1%

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

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

                                                                                                                                                                                                                              \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                                                                              1. Applied rewrites31.9%

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

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

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

                                                                                                                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 8 \cdot 10^{+111} \lor \neg \left(angle \leq 5 \cdot 10^{+262}\right):\\ \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 1\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 2\right)\\ \end{array} \]
                                                                                                                                                                                                                              6. Add Preprocessing

                                                                                                                                                                                                                              Alternative 13: 67.0% accurate, 1.7× speedup?

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

                                                                                                                                                                                                                                1. Initial program 57.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 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. Applied rewrites59.5%

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

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

                                                                                                                                                                                                                                      \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                                                                                      1. Applied rewrites59.1%

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

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

                                                                                                                                                                                                                                          \[\leadsto \left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\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 \left(b - a\right)\right)} \]

                                                                                                                                                                                                                                        if 1.9000000000000001e45 < angle

                                                                                                                                                                                                                                        1. Initial program 30.5%

                                                                                                                                                                                                                                          \[\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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                                                                          3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                                                                          4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                                                                          5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                                                                          6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                                                                          7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                                                                                                          8. lower-/.f6431.7

                                                                                                                                                                                                                                            \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                                                                                                                        4. Applied rewrites31.7%

                                                                                                                                                                                                                                          \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                                                                        5. Taylor expanded in angle around inf

                                                                                                                                                                                                                                          \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                                                                                                                        6. Step-by-step derivation
                                                                                                                                                                                                                                          1. Applied rewrites31.2%

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

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

                                                                                                                                                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 1.9 \cdot 10^{+45}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \mathsf{PI}\left(\right), \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\\ \end{array} \]
                                                                                                                                                                                                                                          5. Add Preprocessing

                                                                                                                                                                                                                                          Alternative 14: 67.0% accurate, 1.8× speedup?

                                                                                                                                                                                                                                          \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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}\;angle\_m \leq 1.9 \cdot 10^{+45}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right) \cdot \left(\left(t\_0 \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(t\_0 \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
                                                                                                                                                                                                                                          b_m = (fabs.f64 b)
                                                                                                                                                                                                                                          a_m = (fabs.f64 a)
                                                                                                                                                                                                                                          angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                          angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                          (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                           :precision binary64
                                                                                                                                                                                                                                           (let* ((t_0 (sin (* (* 0.005555555555555556 (PI)) angle_m))))
                                                                                                                                                                                                                                             (*
                                                                                                                                                                                                                                              angle_s
                                                                                                                                                                                                                                              (if (<= angle_m 1.9e+45)
                                                                                                                                                                                                                                                (*
                                                                                                                                                                                                                                                 (* 2.0 (cos (* (* -0.005555555555555556 (PI)) angle_m)))
                                                                                                                                                                                                                                                 (* (* t_0 (+ a_m b_m)) (- b_m a_m)))
                                                                                                                                                                                                                                                (*
                                                                                                                                                                                                                                                 (* (sin (* (* (PI) angle_m) 0.005555555555555556)) 2.0)
                                                                                                                                                                                                                                                 (* t_0 (* (- b_m a_m) (+ a_m b_m))))))))
                                                                                                                                                                                                                                          \begin{array}{l}
                                                                                                                                                                                                                                          b_m = \left|b\right|
                                                                                                                                                                                                                                          \\
                                                                                                                                                                                                                                          a_m = \left|a\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}\;angle\_m \leq 1.9 \cdot 10^{+45}:\\
                                                                                                                                                                                                                                          \;\;\;\;\left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right) \cdot \left(\left(t\_0 \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          \mathbf{else}:\\
                                                                                                                                                                                                                                          \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(t\_0 \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right)\\
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          \end{array}
                                                                                                                                                                                                                                          \end{array}
                                                                                                                                                                                                                                          \end{array}
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          Derivation
                                                                                                                                                                                                                                          1. Split input into 2 regimes
                                                                                                                                                                                                                                          2. if angle < 1.9000000000000001e45

                                                                                                                                                                                                                                            1. Initial program 57.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 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. Applied rewrites59.5%

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

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

                                                                                                                                                                                                                                                  \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                                                                  1. Applied rewrites59.1%

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

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

                                                                                                                                                                                                                                                      \[\leadsto \left(2 \cdot \cos \left(\left(-0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\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 \left(b - a\right)\right)} \]

                                                                                                                                                                                                                                                    if 1.9000000000000001e45 < angle

                                                                                                                                                                                                                                                    1. Initial program 30.5%

                                                                                                                                                                                                                                                      \[\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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                                                                                      3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                                                                                      4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                                                                                      5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                                                                                      6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                                                                                      7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                                                                                                                      8. lower-/.f6431.7

                                                                                                                                                                                                                                                        \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                                                                                                                                    4. Applied rewrites31.7%

                                                                                                                                                                                                                                                      \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                                                                                    5. Taylor expanded in angle around inf

                                                                                                                                                                                                                                                      \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                                                                                                                                    6. Step-by-step derivation
                                                                                                                                                                                                                                                      1. Applied rewrites31.2%

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

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

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

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

                                                                                                                                                                                                                                                      Alternative 15: 65.3% accurate, 1.8× speedup?

                                                                                                                                                                                                                                                      \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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}\;angle\_m \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\left(\left(\sin \left(0.5 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(t\_0 \cdot 2\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right)\\ \end{array} \end{array} \end{array} \]
                                                                                                                                                                                                                                                      b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                      a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                      angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                      (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                       :precision binary64
                                                                                                                                                                                                                                                       (let* ((t_0 (sin (* (* 0.005555555555555556 (PI)) angle_m))))
                                                                                                                                                                                                                                                         (*
                                                                                                                                                                                                                                                          angle_s
                                                                                                                                                                                                                                                          (if (<= angle_m 5e+262)
                                                                                                                                                                                                                                                            (* (* (* (sin (* 0.5 (PI))) (* t_0 2.0)) (- b_m a_m)) (+ a_m b_m))
                                                                                                                                                                                                                                                            (*
                                                                                                                                                                                                                                                             (*
                                                                                                                                                                                                                                                              t_0
                                                                                                                                                                                                                                                              (fma (* -1.54320987654321e-5 (* angle_m angle_m)) (* (PI) (PI)) 1.0))
                                                                                                                                                                                                                                                             (* (* (+ a_m b_m) (- b_m a_m)) 2.0))))))
                                                                                                                                                                                                                                                      \begin{array}{l}
                                                                                                                                                                                                                                                      b_m = \left|b\right|
                                                                                                                                                                                                                                                      \\
                                                                                                                                                                                                                                                      a_m = \left|a\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}\;angle\_m \leq 5 \cdot 10^{+262}:\\
                                                                                                                                                                                                                                                      \;\;\;\;\left(\left(\sin \left(0.5 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(t\_0 \cdot 2\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\\
                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                      \mathbf{else}:\\
                                                                                                                                                                                                                                                      \;\;\;\;\left(t\_0 \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right)\\
                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                      \end{array}
                                                                                                                                                                                                                                                      \end{array}
                                                                                                                                                                                                                                                      \end{array}
                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                      Derivation
                                                                                                                                                                                                                                                      1. Split input into 2 regimes
                                                                                                                                                                                                                                                      2. if angle < 5.00000000000000008e262

                                                                                                                                                                                                                                                        1. Initial program 52.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                                                                                          3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                                                                                          4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                                                                                          5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                                                                                          6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                                                                                          7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                                                                                                                          8. lower-/.f6453.0

                                                                                                                                                                                                                                                            \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                                                                                                                                        4. Applied rewrites53.0%

                                                                                                                                                                                                                                                          \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                                                                                        5. Taylor expanded in angle around inf

                                                                                                                                                                                                                                                          \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                                                                                                                                        6. Step-by-step derivation
                                                                                                                                                                                                                                                          1. Applied rewrites54.9%

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

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

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

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

                                                                                                                                                                                                                                                              if 5.00000000000000008e262 < angle

                                                                                                                                                                                                                                                              1. Initial program 24.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 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. Applied rewrites10.3%

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

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

                                                                                                                                                                                                                                                                    \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                                                                                                                    1. Applied rewrites34.2%

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

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

                                                                                                                                                                                                                                                                        \[\leadsto \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\right) \cdot \left(\left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot 2\right) \]
                                                                                                                                                                                                                                                                    4. Recombined 2 regimes into one program.
                                                                                                                                                                                                                                                                    5. Final simplification63.5%

                                                                                                                                                                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\left(\left(\sin \left(0.5 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 2\right)\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 2\right)\\ \end{array} \]
                                                                                                                                                                                                                                                                    6. Add Preprocessing

                                                                                                                                                                                                                                                                    Alternative 16: 65.5% accurate, 1.8× speedup?

                                                                                                                                                                                                                                                                    \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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 75000000000000:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(0.5 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right)\\ \end{array} \end{array} \]
                                                                                                                                                                                                                                                                    b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                    a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                    angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                    (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                     :precision binary64
                                                                                                                                                                                                                                                                     (*
                                                                                                                                                                                                                                                                      angle_s
                                                                                                                                                                                                                                                                      (if (<= angle_m 75000000000000.0)
                                                                                                                                                                                                                                                                        (* (- b_m a_m) (* (* (PI) 0.011111111111111112) (* angle_m (+ a_m b_m))))
                                                                                                                                                                                                                                                                        (*
                                                                                                                                                                                                                                                                         (* (sin (* (* (PI) angle_m) 0.005555555555555556)) 2.0)
                                                                                                                                                                                                                                                                         (* (sin (* 0.5 (PI))) (* (- b_m a_m) (+ a_m b_m)))))))
                                                                                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                                                                                    b_m = \left|b\right|
                                                                                                                                                                                                                                                                    \\
                                                                                                                                                                                                                                                                    a_m = \left|a\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 75000000000000:\\
                                                                                                                                                                                                                                                                    \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    \mathbf{else}:\\
                                                                                                                                                                                                                                                                    \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(\sin \left(0.5 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right)\\
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                    Derivation
                                                                                                                                                                                                                                                                    1. Split input into 2 regimes
                                                                                                                                                                                                                                                                    2. if angle < 7.5e13

                                                                                                                                                                                                                                                                      1. Initial program 59.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 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. Applied rewrites61.2%

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

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

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

                                                                                                                                                                                                                                                                            if 7.5e13 < angle

                                                                                                                                                                                                                                                                            1. Initial program 28.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. 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. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                                                                                                              3. 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(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                                                                                                                                                                                                                                                                              4. 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(\color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                                                                                                              5. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                                                                                                                                                                                                                                                                              6. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                                                                                                              7. 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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
                                                                                                                                                                                                                                                                              8. lower-/.f6430.1

                                                                                                                                                                                                                                                                                \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
                                                                                                                                                                                                                                                                            4. Applied rewrites30.1%

                                                                                                                                                                                                                                                                              \[\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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
                                                                                                                                                                                                                                                                            5. Taylor expanded in angle around inf

                                                                                                                                                                                                                                                                              \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\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} - {a}^{2}\right)\right)\right)} \]
                                                                                                                                                                                                                                                                            6. Step-by-step derivation
                                                                                                                                                                                                                                                                              1. Applied rewrites29.8%

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

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

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

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

                                                                                                                                                                                                                                                                              Alternative 17: 65.2% accurate, 2.7× speedup?

                                                                                                                                                                                                                                                                              \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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)\\ t_1 := \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 75000000000000:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\ \mathbf{elif}\;angle\_m \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\left(t\_0 \cdot 1\right) \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\right) \cdot t\_1\\ \end{array} \end{array} \end{array} \]
                                                                                                                                                                                                                                                                              b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                              a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                              angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                              angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                              (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                               :precision binary64
                                                                                                                                                                                                                                                                               (let* ((t_0 (sin (* (* 0.005555555555555556 (PI)) angle_m)))
                                                                                                                                                                                                                                                                                      (t_1 (* (* (+ a_m b_m) (- b_m a_m)) 2.0)))
                                                                                                                                                                                                                                                                                 (*
                                                                                                                                                                                                                                                                                  angle_s
                                                                                                                                                                                                                                                                                  (if (<= angle_m 75000000000000.0)
                                                                                                                                                                                                                                                                                    (* (- b_m a_m) (* (* (PI) 0.011111111111111112) (* angle_m (+ a_m b_m))))
                                                                                                                                                                                                                                                                                    (if (<= angle_m 5e+262)
                                                                                                                                                                                                                                                                                      (* (* t_0 1.0) t_1)
                                                                                                                                                                                                                                                                                      (*
                                                                                                                                                                                                                                                                                       (*
                                                                                                                                                                                                                                                                                        t_0
                                                                                                                                                                                                                                                                                        (fma (* -1.54320987654321e-5 (* angle_m angle_m)) (* (PI) (PI)) 1.0))
                                                                                                                                                                                                                                                                                       t_1))))))
                                                                                                                                                                                                                                                                              \begin{array}{l}
                                                                                                                                                                                                                                                                              b_m = \left|b\right|
                                                                                                                                                                                                                                                                              \\
                                                                                                                                                                                                                                                                              a_m = \left|a\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)\\
                                                                                                                                                                                                                                                                              t_1 := \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\\
                                                                                                                                                                                                                                                                              angle\_s \cdot \begin{array}{l}
                                                                                                                                                                                                                                                                              \mathbf{if}\;angle\_m \leq 75000000000000:\\
                                                                                                                                                                                                                                                                              \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\
                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                              \mathbf{elif}\;angle\_m \leq 5 \cdot 10^{+262}:\\
                                                                                                                                                                                                                                                                              \;\;\;\;\left(t\_0 \cdot 1\right) \cdot t\_1\\
                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                              \mathbf{else}:\\
                                                                                                                                                                                                                                                                              \;\;\;\;\left(t\_0 \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\right) \cdot t\_1\\
                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                              \end{array}
                                                                                                                                                                                                                                                                              \end{array}
                                                                                                                                                                                                                                                                              \end{array}
                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                              Derivation
                                                                                                                                                                                                                                                                              1. Split input into 3 regimes
                                                                                                                                                                                                                                                                              2. if angle < 7.5e13

                                                                                                                                                                                                                                                                                1. Initial program 59.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 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. Applied rewrites61.2%

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

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

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

                                                                                                                                                                                                                                                                                      if 7.5e13 < angle < 5.00000000000000008e262

                                                                                                                                                                                                                                                                                      1. Initial program 29.5%

                                                                                                                                                                                                                                                                                        \[\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. Applied rewrites28.5%

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

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

                                                                                                                                                                                                                                                                                            \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                                                                                                                            1. Applied rewrites33.8%

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

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

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

                                                                                                                                                                                                                                                                                              if 5.00000000000000008e262 < angle

                                                                                                                                                                                                                                                                                              1. Initial program 24.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 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. Applied rewrites10.3%

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

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

                                                                                                                                                                                                                                                                                                    \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                    1. Applied rewrites34.2%

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

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

                                                                                                                                                                                                                                                                                                        \[\leadsto \left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\right) \cdot \left(\left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot 2\right) \]
                                                                                                                                                                                                                                                                                                    4. Recombined 3 regimes into one program.
                                                                                                                                                                                                                                                                                                    5. Final simplification63.5%

                                                                                                                                                                                                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 75000000000000:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle \cdot \left(a + b\right)\right)\right)\\ \mathbf{elif}\;angle \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 1\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 2\right)\\ \end{array} \]
                                                                                                                                                                                                                                                                                                    6. Add Preprocessing

                                                                                                                                                                                                                                                                                                    Alternative 18: 65.5% accurate, 2.8× speedup?

                                                                                                                                                                                                                                                                                                    \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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 75000000000000:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\ \mathbf{elif}\;angle\_m \leq 5.7 \cdot 10^{+268}:\\ \;\;\;\;\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 1\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(angle\_m \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\\ \end{array} \end{array} \]
                                                                                                                                                                                                                                                                                                    b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                                                    a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                                                    angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                                                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                                                    (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                                                     :precision binary64
                                                                                                                                                                                                                                                                                                     (*
                                                                                                                                                                                                                                                                                                      angle_s
                                                                                                                                                                                                                                                                                                      (if (<= angle_m 75000000000000.0)
                                                                                                                                                                                                                                                                                                        (* (- b_m a_m) (* (* (PI) 0.011111111111111112) (* angle_m (+ a_m b_m))))
                                                                                                                                                                                                                                                                                                        (if (<= angle_m 5.7e+268)
                                                                                                                                                                                                                                                                                                          (*
                                                                                                                                                                                                                                                                                                           (* (sin (* (* 0.005555555555555556 (PI)) angle_m)) 1.0)
                                                                                                                                                                                                                                                                                                           (* (* (+ a_m b_m) (- b_m a_m)) 2.0))
                                                                                                                                                                                                                                                                                                          (*
                                                                                                                                                                                                                                                                                                           (*
                                                                                                                                                                                                                                                                                                            (* angle_m (* 0.011111111111111112 (PI)))
                                                                                                                                                                                                                                                                                                            (* (+ b_m a_m) (- b_m a_m)))
                                                                                                                                                                                                                                                                                                           (cos (* (PI) (/ angle_m 180.0))))))))
                                                                                                                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                                                                                                                    b_m = \left|b\right|
                                                                                                                                                                                                                                                                                                    \\
                                                                                                                                                                                                                                                                                                    a_m = \left|a\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 75000000000000:\\
                                                                                                                                                                                                                                                                                                    \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\
                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                    \mathbf{elif}\;angle\_m \leq 5.7 \cdot 10^{+268}:\\
                                                                                                                                                                                                                                                                                                    \;\;\;\;\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 1\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right)\\
                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                    \mathbf{else}:\\
                                                                                                                                                                                                                                                                                                    \;\;\;\;\left(\left(angle\_m \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\\
                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                    Derivation
                                                                                                                                                                                                                                                                                                    1. Split input into 3 regimes
                                                                                                                                                                                                                                                                                                    2. if angle < 7.5e13

                                                                                                                                                                                                                                                                                                      1. Initial program 59.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 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. Applied rewrites61.2%

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

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

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

                                                                                                                                                                                                                                                                                                            if 7.5e13 < angle < 5.7e268

                                                                                                                                                                                                                                                                                                            1. Initial program 29.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 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. Applied rewrites28.1%

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

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

                                                                                                                                                                                                                                                                                                                  \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                  1. Applied rewrites33.6%

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

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

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

                                                                                                                                                                                                                                                                                                                    if 5.7e268 < angle

                                                                                                                                                                                                                                                                                                                    1. Initial program 24.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}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                                                                                                                                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                      1. Applied rewrites29.2%

                                                                                                                                                                                                                                                                                                                        \[\leadsto \color{blue}{\left(\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                                                                                                                                                                                                                                                                    5. Recombined 3 regimes into one program.
                                                                                                                                                                                                                                                                                                                    6. Final simplification64.0%

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

                                                                                                                                                                                                                                                                                                                    Alternative 19: 65.7% accurate, 3.2× speedup?

                                                                                                                                                                                                                                                                                                                    \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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 75000000000000:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 1\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right)\\ \end{array} \end{array} \]
                                                                                                                                                                                                                                                                                                                    b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                                                                    a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                                                                    angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                                                                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                                                                    (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                                                                     :precision binary64
                                                                                                                                                                                                                                                                                                                     (*
                                                                                                                                                                                                                                                                                                                      angle_s
                                                                                                                                                                                                                                                                                                                      (if (<= angle_m 75000000000000.0)
                                                                                                                                                                                                                                                                                                                        (* (- b_m a_m) (* (* (PI) 0.011111111111111112) (* angle_m (+ a_m b_m))))
                                                                                                                                                                                                                                                                                                                        (*
                                                                                                                                                                                                                                                                                                                         (* (sin (* (* 0.005555555555555556 (PI)) angle_m)) 1.0)
                                                                                                                                                                                                                                                                                                                         (* (* (+ a_m b_m) (- b_m a_m)) 2.0)))))
                                                                                                                                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                                                                                                                                    b_m = \left|b\right|
                                                                                                                                                                                                                                                                                                                    \\
                                                                                                                                                                                                                                                                                                                    a_m = \left|a\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 75000000000000:\\
                                                                                                                                                                                                                                                                                                                    \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\
                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                    \mathbf{else}:\\
                                                                                                                                                                                                                                                                                                                    \;\;\;\;\left(\sin \left(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 1\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right)\\
                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                    Derivation
                                                                                                                                                                                                                                                                                                                    1. Split input into 2 regimes
                                                                                                                                                                                                                                                                                                                    2. if angle < 7.5e13

                                                                                                                                                                                                                                                                                                                      1. Initial program 59.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 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. Applied rewrites61.2%

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

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

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

                                                                                                                                                                                                                                                                                                                            if 7.5e13 < angle

                                                                                                                                                                                                                                                                                                                            1. Initial program 28.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. Applied rewrites25.2%

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

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

                                                                                                                                                                                                                                                                                                                                  \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \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)} \]
                                                                                                                                                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                                  1. Applied rewrites33.9%

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

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

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

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

                                                                                                                                                                                                                                                                                                                                  Alternative 20: 61.9% accurate, 7.7× speedup?

                                                                                                                                                                                                                                                                                                                                  \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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 9.6 \cdot 10^{+207}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\_m\right)\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\ \end{array} \end{array} \]
                                                                                                                                                                                                                                                                                                                                  b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                                                                                  a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                                                                                  angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                                                                                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                                                                                  (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                                                                                   :precision binary64
                                                                                                                                                                                                                                                                                                                                   (*
                                                                                                                                                                                                                                                                                                                                    angle_s
                                                                                                                                                                                                                                                                                                                                    (if (<= angle_m 9.6e+207)
                                                                                                                                                                                                                                                                                                                                      (* (- b_m a_m) (* (* (PI) 0.011111111111111112) (* angle_m (+ a_m b_m))))
                                                                                                                                                                                                                                                                                                                                      (*
                                                                                                                                                                                                                                                                                                                                       (* (* 0.011111111111111112 angle_m) (* (* (+ a_m b_m) (PI)) (- b_m a_m)))
                                                                                                                                                                                                                                                                                                                                       (fma (* -1.54320987654321e-5 (* angle_m angle_m)) (* (PI) (PI)) 1.0)))))
                                                                                                                                                                                                                                                                                                                                  \begin{array}{l}
                                                                                                                                                                                                                                                                                                                                  b_m = \left|b\right|
                                                                                                                                                                                                                                                                                                                                  \\
                                                                                                                                                                                                                                                                                                                                  a_m = \left|a\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 9.6 \cdot 10^{+207}:\\
                                                                                                                                                                                                                                                                                                                                  \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  \mathbf{else}:\\
                                                                                                                                                                                                                                                                                                                                  \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m - a\_m\right)\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  \end{array}
                                                                                                                                                                                                                                                                                                                                  \end{array}
                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                  Derivation
                                                                                                                                                                                                                                                                                                                                  1. Split input into 2 regimes
                                                                                                                                                                                                                                                                                                                                  2. if angle < 9.6000000000000004e207

                                                                                                                                                                                                                                                                                                                                    1. Initial program 53.5%

                                                                                                                                                                                                                                                                                                                                      \[\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. Applied rewrites55.4%

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

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

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

                                                                                                                                                                                                                                                                                                                                          if 9.6000000000000004e207 < angle

                                                                                                                                                                                                                                                                                                                                          1. Initial program 29.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 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. Applied rewrites32.0%

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

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

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

                                                                                                                                                                                                                                                                                                                                                \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)} \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right) \]
                                                                                                                                                                                                                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                                                1. Applied rewrites30.7%

                                                                                                                                                                                                                                                                                                                                                  \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right)\right)} \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right) \]
                                                                                                                                                                                                                                                                                                                                              4. Recombined 2 regimes into one program.
                                                                                                                                                                                                                                                                                                                                              5. Final simplification62.7%

                                                                                                                                                                                                                                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 9.6 \cdot 10^{+207}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle \cdot \left(a + b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\ \end{array} \]
                                                                                                                                                                                                                                                                                                                                              6. Add Preprocessing

                                                                                                                                                                                                                                                                                                                                              Alternative 21: 61.8% accurate, 8.5× speedup?

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

                                                                                                                                                                                                                                                                                                                                                1. Initial program 52.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 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. Applied rewrites52.1%

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

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

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

                                                                                                                                                                                                                                                                                                                                                      if 2.50000000000000016e259 < b

                                                                                                                                                                                                                                                                                                                                                      1. Initial program 33.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 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. Applied rewrites55.6%

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

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

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

                                                                                                                                                                                                                                                                                                                                                            \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right) \]
                                                                                                                                                                                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                                                            1. Applied rewrites77.8%

                                                                                                                                                                                                                                                                                                                                                              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot \color{blue}{0.011111111111111112}\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right) \]
                                                                                                                                                                                                                                                                                                                                                          4. Recombined 2 regimes into one program.
                                                                                                                                                                                                                                                                                                                                                          5. Final simplification61.6%

                                                                                                                                                                                                                                                                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.5 \cdot 10^{+259}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle \cdot \left(a + b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right), 1\right)\\ \end{array} \]
                                                                                                                                                                                                                                                                                                                                                          6. Add Preprocessing

                                                                                                                                                                                                                                                                                                                                                          Alternative 22: 62.0% accurate, 16.8× speedup?

                                                                                                                                                                                                                                                                                                                                                          \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\right) \end{array} \]
                                                                                                                                                                                                                                                                                                                                                          b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                                                                                                          a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                                                                                                          angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                                                                                                          angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                                                                                                          (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                                                                                                           :precision binary64
                                                                                                                                                                                                                                                                                                                                                           (*
                                                                                                                                                                                                                                                                                                                                                            angle_s
                                                                                                                                                                                                                                                                                                                                                            (* (- b_m a_m) (* (* (PI) 0.011111111111111112) (* angle_m (+ a_m b_m))))))
                                                                                                                                                                                                                                                                                                                                                          \begin{array}{l}
                                                                                                                                                                                                                                                                                                                                                          b_m = \left|b\right|
                                                                                                                                                                                                                                                                                                                                                          \\
                                                                                                                                                                                                                                                                                                                                                          a_m = \left|a\right|
                                                                                                                                                                                                                                                                                                                                                          \\
                                                                                                                                                                                                                                                                                                                                                          angle\_m = \left|angle\right|
                                                                                                                                                                                                                                                                                                                                                          \\
                                                                                                                                                                                                                                                                                                                                                          angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                          \\
                                                                                                                                                                                                                                                                                                                                                          angle\_s \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(a\_m + b\_m\right)\right)\right)\right)
                                                                                                                                                                                                                                                                                                                                                          \end{array}
                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                          Derivation
                                                                                                                                                                                                                                                                                                                                                          1. Initial program 51.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 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. Applied rewrites51.9%

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

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

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

                                                                                                                                                                                                                                                                                                                                                                Alternative 23: 61.9% accurate, 16.8× speedup?

                                                                                                                                                                                                                                                                                                                                                                \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a\_m + b\_m\right)\right)\right)\right) \end{array} \]
                                                                                                                                                                                                                                                                                                                                                                b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                                                                                                                a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                                                                                                                angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                                                                                                                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                                                                                                                (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                                                                                                                 :precision binary64
                                                                                                                                                                                                                                                                                                                                                                 (*
                                                                                                                                                                                                                                                                                                                                                                  angle_s
                                                                                                                                                                                                                                                                                                                                                                  (* (- b_m a_m) (* (* 0.011111111111111112 angle_m) (* (PI) (+ a_m b_m))))))
                                                                                                                                                                                                                                                                                                                                                                \begin{array}{l}
                                                                                                                                                                                                                                                                                                                                                                b_m = \left|b\right|
                                                                                                                                                                                                                                                                                                                                                                \\
                                                                                                                                                                                                                                                                                                                                                                a_m = \left|a\right|
                                                                                                                                                                                                                                                                                                                                                                \\
                                                                                                                                                                                                                                                                                                                                                                angle\_m = \left|angle\right|
                                                                                                                                                                                                                                                                                                                                                                \\
                                                                                                                                                                                                                                                                                                                                                                angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                \\
                                                                                                                                                                                                                                                                                                                                                                angle\_s \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a\_m + b\_m\right)\right)\right)\right)
                                                                                                                                                                                                                                                                                                                                                                \end{array}
                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                Derivation
                                                                                                                                                                                                                                                                                                                                                                1. Initial program 51.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 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. Applied rewrites51.9%

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

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

                                                                                                                                                                                                                                                                                                                                                                    Alternative 24: 62.0% accurate, 16.8× speedup?

                                                                                                                                                                                                                                                                                                                                                                    \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\right) \end{array} \]
                                                                                                                                                                                                                                                                                                                                                                    b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                                                                                                                    a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                                                                                                                    angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                                                                                                                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                                                                                                                    (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                                                                                                                     :precision binary64
                                                                                                                                                                                                                                                                                                                                                                     (*
                                                                                                                                                                                                                                                                                                                                                                      angle_s
                                                                                                                                                                                                                                                                                                                                                                      (* (+ a_m b_m) (* (- b_m a_m) (* (* 0.011111111111111112 (PI)) angle_m)))))
                                                                                                                                                                                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                                                                                                                                                                                    b_m = \left|b\right|
                                                                                                                                                                                                                                                                                                                                                                    \\
                                                                                                                                                                                                                                                                                                                                                                    a_m = \left|a\right|
                                                                                                                                                                                                                                                                                                                                                                    \\
                                                                                                                                                                                                                                                                                                                                                                    angle\_m = \left|angle\right|
                                                                                                                                                                                                                                                                                                                                                                    \\
                                                                                                                                                                                                                                                                                                                                                                    angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                    \\
                                                                                                                                                                                                                                                                                                                                                                    angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\right)
                                                                                                                                                                                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                    Derivation
                                                                                                                                                                                                                                                                                                                                                                    1. Initial program 51.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 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. Applied rewrites51.9%

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

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

                                                                                                                                                                                                                                                                                                                                                                        Alternative 25: 61.9% accurate, 16.8× speedup?

                                                                                                                                                                                                                                                                                                                                                                        \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\left(\left(\left(b\_m - a\_m\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \mathsf{PI}\left(\right)\right) \end{array} \]
                                                                                                                                                                                                                                                                                                                                                                        b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                                                                                                                        a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                                                                                                                        angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                                                                                                                        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                                                                                                                        (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                                                                                                                         :precision binary64
                                                                                                                                                                                                                                                                                                                                                                         (*
                                                                                                                                                                                                                                                                                                                                                                          angle_s
                                                                                                                                                                                                                                                                                                                                                                          (* (* (* (* (- b_m a_m) angle_m) 0.011111111111111112) (+ a_m b_m)) (PI))))
                                                                                                                                                                                                                                                                                                                                                                        \begin{array}{l}
                                                                                                                                                                                                                                                                                                                                                                        b_m = \left|b\right|
                                                                                                                                                                                                                                                                                                                                                                        \\
                                                                                                                                                                                                                                                                                                                                                                        a_m = \left|a\right|
                                                                                                                                                                                                                                                                                                                                                                        \\
                                                                                                                                                                                                                                                                                                                                                                        angle\_m = \left|angle\right|
                                                                                                                                                                                                                                                                                                                                                                        \\
                                                                                                                                                                                                                                                                                                                                                                        angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                        \\
                                                                                                                                                                                                                                                                                                                                                                        angle\_s \cdot \left(\left(\left(\left(\left(b\_m - a\_m\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \mathsf{PI}\left(\right)\right)
                                                                                                                                                                                                                                                                                                                                                                        \end{array}
                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                        Derivation
                                                                                                                                                                                                                                                                                                                                                                        1. Initial program 51.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 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. Applied rewrites51.9%

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

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

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

                                                                                                                                                                                                                                                                                                                                                                              Alternative 26: 38.3% accurate, 21.6× speedup?

                                                                                                                                                                                                                                                                                                                                                                              \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\mathsf{PI}\left(\right) \cdot a\_m\right) \cdot \left(angle\_m \cdot \left(-0.011111111111111112 \cdot a\_m\right)\right)\right) \end{array} \]
                                                                                                                                                                                                                                                                                                                                                                              b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                                                                                                                              a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                                                                                                                              angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                                                                                                                              angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                                                                                                                              (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                                                                                                                               :precision binary64
                                                                                                                                                                                                                                                                                                                                                                               (* angle_s (* (* (PI) a_m) (* angle_m (* -0.011111111111111112 a_m)))))
                                                                                                                                                                                                                                                                                                                                                                              \begin{array}{l}
                                                                                                                                                                                                                                                                                                                                                                              b_m = \left|b\right|
                                                                                                                                                                                                                                                                                                                                                                              \\
                                                                                                                                                                                                                                                                                                                                                                              a_m = \left|a\right|
                                                                                                                                                                                                                                                                                                                                                                              \\
                                                                                                                                                                                                                                                                                                                                                                              angle\_m = \left|angle\right|
                                                                                                                                                                                                                                                                                                                                                                              \\
                                                                                                                                                                                                                                                                                                                                                                              angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                              \\
                                                                                                                                                                                                                                                                                                                                                                              angle\_s \cdot \left(\left(\mathsf{PI}\left(\right) \cdot a\_m\right) \cdot \left(angle\_m \cdot \left(-0.011111111111111112 \cdot a\_m\right)\right)\right)
                                                                                                                                                                                                                                                                                                                                                                              \end{array}
                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                              Derivation
                                                                                                                                                                                                                                                                                                                                                                              1. Initial program 51.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 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. Applied rewrites51.9%

                                                                                                                                                                                                                                                                                                                                                                                  \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                                                                                                                                                                                                                                                                2. 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)} \]
                                                                                                                                                                                                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                                                                                  1. Applied rewrites33.2%

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

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

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

                                                                                                                                                                                                                                                                                                                                                                                      Alternative 27: 38.3% accurate, 21.6× speedup?

                                                                                                                                                                                                                                                                                                                                                                                      \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(\left(a\_m \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right) \end{array} \]
                                                                                                                                                                                                                                                                                                                                                                                      b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                                                                                                                                      a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                                                                                                                                      angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                                                                                                                                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                                                                                                                                      (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                                                                                                                                       :precision binary64
                                                                                                                                                                                                                                                                                                                                                                                       (* angle_s (* (* -0.011111111111111112 a_m) (* (* a_m angle_m) (PI)))))
                                                                                                                                                                                                                                                                                                                                                                                      \begin{array}{l}
                                                                                                                                                                                                                                                                                                                                                                                      b_m = \left|b\right|
                                                                                                                                                                                                                                                                                                                                                                                      \\
                                                                                                                                                                                                                                                                                                                                                                                      a_m = \left|a\right|
                                                                                                                                                                                                                                                                                                                                                                                      \\
                                                                                                                                                                                                                                                                                                                                                                                      angle\_m = \left|angle\right|
                                                                                                                                                                                                                                                                                                                                                                                      \\
                                                                                                                                                                                                                                                                                                                                                                                      angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                      \\
                                                                                                                                                                                                                                                                                                                                                                                      angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(\left(a\_m \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right)
                                                                                                                                                                                                                                                                                                                                                                                      \end{array}
                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                      Derivation
                                                                                                                                                                                                                                                                                                                                                                                      1. Initial program 51.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 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. Applied rewrites51.9%

                                                                                                                                                                                                                                                                                                                                                                                          \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                                                                                                                                                                                                                                                                        2. 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)} \]
                                                                                                                                                                                                                                                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                                                                                          1. Applied rewrites33.2%

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

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

                                                                                                                                                                                                                                                                                                                                                                                                \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                                                                                                                                                                                                                                                                                                                                                                                              2. Add Preprocessing

                                                                                                                                                                                                                                                                                                                                                                                              Alternative 28: 38.3% accurate, 21.6× speedup?

                                                                                                                                                                                                                                                                                                                                                                                              \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right)\right) \end{array} \]
                                                                                                                                                                                                                                                                                                                                                                                              b_m = (fabs.f64 b)
                                                                                                                                                                                                                                                                                                                                                                                              a_m = (fabs.f64 a)
                                                                                                                                                                                                                                                                                                                                                                                              angle\_m = (fabs.f64 angle)
                                                                                                                                                                                                                                                                                                                                                                                              angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                                                                                                                                                                                                                                                                                                                              (FPCore (angle_s a_m b_m angle_m)
                                                                                                                                                                                                                                                                                                                                                                                               :precision binary64
                                                                                                                                                                                                                                                                                                                                                                                               (* angle_s (* (* -0.011111111111111112 a_m) (* a_m (* (PI) angle_m)))))
                                                                                                                                                                                                                                                                                                                                                                                              \begin{array}{l}
                                                                                                                                                                                                                                                                                                                                                                                              b_m = \left|b\right|
                                                                                                                                                                                                                                                                                                                                                                                              \\
                                                                                                                                                                                                                                                                                                                                                                                              a_m = \left|a\right|
                                                                                                                                                                                                                                                                                                                                                                                              \\
                                                                                                                                                                                                                                                                                                                                                                                              angle\_m = \left|angle\right|
                                                                                                                                                                                                                                                                                                                                                                                              \\
                                                                                                                                                                                                                                                                                                                                                                                              angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                              \\
                                                                                                                                                                                                                                                                                                                                                                                              angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right)\right)
                                                                                                                                                                                                                                                                                                                                                                                              \end{array}
                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                              Derivation
                                                                                                                                                                                                                                                                                                                                                                                              1. Initial program 51.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 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. Applied rewrites51.9%

                                                                                                                                                                                                                                                                                                                                                                                                  \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                                                                                                                                                                                                                                                                                2. 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)} \]
                                                                                                                                                                                                                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                                                                                                                                                                                                                  1. Applied rewrites33.2%

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

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

                                                                                                                                                                                                                                                                                                                                                                                                    Reproduce

                                                                                                                                                                                                                                                                                                                                                                                                    ?
                                                                                                                                                                                                                                                                                                                                                                                                    herbie shell --seed 2025019 
                                                                                                                                                                                                                                                                                                                                                                                                    (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)))))