ab-angle->ABCF B

Percentage Accurate: 54.0% → 67.1%
Time: 7.7s
Alternatives: 18
Speedup: 13.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 54.0% 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: 67.1% 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 := \mathsf{PI}\left(\right) \cdot angle\_m\\ t_1 := \frac{\mathsf{PI}\left(\right)}{2}\\ t_2 := \sin \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right)\\ t_3 := \left(a\_m + b\_m\right) \cdot 2\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a\_m \leq 5.8 \cdot 10^{+15}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(t\_3 \cdot \left(\sin \left(t\_0 \cdot 0.005555555555555556\right) \cdot \cos \left(-0.005555555555555556 \cdot t\_0\right)\right)\right)\\ \mathbf{elif}\;a\_m \leq 1.45 \cdot 10^{+254}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(t\_3 \cdot \left(\sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), 0.005555555555555556 \cdot angle\_m, t\_1\right)\right) \cdot t\_2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(t\_3 \cdot \left(\sin \left(\mathsf{fma}\left(\mathsf{PI}\left(\right), 0.005555555555555556 \cdot angle\_m, t\_1\right)\right) \cdot t\_2\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 (* (PI) angle_m))
        (t_1 (/ (PI) 2.0))
        (t_2 (sin (* (/ angle_m 180.0) (PI))))
        (t_3 (* (+ a_m b_m) 2.0)))
   (*
    angle_s
    (if (<= a_m 5.8e+15)
      (*
       (- b_m a_m)
       (*
        t_3
        (*
         (sin (* t_0 0.005555555555555556))
         (cos (* -0.005555555555555556 t_0)))))
      (if (<= a_m 1.45e+254)
        (*
         (- b_m a_m)
         (*
          t_3
          (* (sin (fma (- (PI)) (* 0.005555555555555556 angle_m) t_1)) t_2)))
        (*
         (- b_m a_m)
         (*
          t_3
          (* (sin (fma (PI) (* 0.005555555555555556 angle_m) t_1)) t_2))))))))
\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{PI}\left(\right) \cdot angle\_m\\
t_1 := \frac{\mathsf{PI}\left(\right)}{2}\\
t_2 := \sin \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right)\\
t_3 := \left(a\_m + b\_m\right) \cdot 2\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 5.8 \cdot 10^{+15}:\\
\;\;\;\;\left(b\_m - a\_m\right) \cdot \left(t\_3 \cdot \left(\sin \left(t\_0 \cdot 0.005555555555555556\right) \cdot \cos \left(-0.005555555555555556 \cdot t\_0\right)\right)\right)\\

\mathbf{elif}\;a\_m \leq 1.45 \cdot 10^{+254}:\\
\;\;\;\;\left(b\_m - a\_m\right) \cdot \left(t\_3 \cdot \left(\sin \left(\mathsf{fma}\left(-\mathsf{PI}\left(\right), 0.005555555555555556 \cdot angle\_m, t\_1\right)\right) \cdot t\_2\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 5.8e15

    1. Initial program 53.1%

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

      \[\leadsto \left(\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 \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
    4. Step-by-step derivation
      1. Applied rewrites53.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

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

          \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
        3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 5.8e15 < a < 1.45e254

        1. Initial program 36.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 \left(\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 \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
        4. Step-by-step derivation
          1. Applied rewrites35.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
          2. Step-by-step derivation
            1. lift-*.f64N/A

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

              \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
            3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.45e254 < a

          1. Initial program 25.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 \left(\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 \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
          4. Step-by-step derivation
            1. Applied rewrites25.3%

              \[\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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
            2. Step-by-step derivation
              1. lift-*.f64N/A

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

                \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
              3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 2: 58.3% 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^{-303}:\\ \;\;\;\;\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(a\_m \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\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-303)
                (* (* (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 (* (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)
          
          \\
          \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^{-303}:\\
          \;\;\;\;\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(a\_m \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\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)))) < -1.99999999999999986e-303

            1. Initial program 46.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 rewrites47.3%

                \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
              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 rewrites47.3%

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

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

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

                    if -1.99999999999999986e-303 < (*.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.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 rewrites58.8%

                        \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                      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 rewrites58.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 rewrites69.6%

                            \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                          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 rewrites69.1%

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

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

                            Alternative 3: 67.4% 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 := \mathsf{PI}\left(\right) \cdot angle\_m\\ t_1 := \left(a\_m + b\_m\right) \cdot 2\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 3.3 \cdot 10^{+243}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(t\_1 \cdot \left(\sin \left(t\_0 \cdot 0.005555555555555556\right) \cdot \cos \left(-0.005555555555555556 \cdot t\_0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(t\_1 \cdot \left(1 \cdot \sin \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\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 (* (PI) angle_m)) (t_1 (* (+ a_m b_m) 2.0)))
                               (*
                                angle_s
                                (if (<= angle_m 3.3e+243)
                                  (*
                                   (- b_m a_m)
                                   (*
                                    t_1
                                    (*
                                     (sin (* t_0 0.005555555555555556))
                                     (cos (* -0.005555555555555556 t_0)))))
                                  (* (- b_m a_m) (* t_1 (* 1.0 (sin (* (/ angle_m 180.0) (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 := \mathsf{PI}\left(\right) \cdot angle\_m\\
                            t_1 := \left(a\_m + b\_m\right) \cdot 2\\
                            angle\_s \cdot \begin{array}{l}
                            \mathbf{if}\;angle\_m \leq 3.3 \cdot 10^{+243}:\\
                            \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(t\_1 \cdot \left(\sin \left(t\_0 \cdot 0.005555555555555556\right) \cdot \cos \left(-0.005555555555555556 \cdot t\_0\right)\right)\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(t\_1 \cdot \left(1 \cdot \sin \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if angle < 3.29999999999999994e243

                              1. Initial program 50.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 \left(\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 \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                              4. Step-by-step derivation
                                1. Applied rewrites51.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                2. Step-by-step derivation
                                  1. lift-*.f64N/A

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

                                    \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
                                  3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 3.29999999999999994e243 < angle

                                  1. Initial program 19.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 \left(\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 \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                  4. Step-by-step derivation
                                    1. Applied rewrites11.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                    2. Step-by-step derivation
                                      1. lift-*.f64N/A

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

                                        \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
                                      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 4: 58.8% accurate, 1.9× 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}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -2 \cdot 10^{-303}:\\ \;\;\;\;\left(\mathsf{PI}\left(\right) \cdot a\_m\right) \cdot \left(angle\_m \cdot \left(-0.011111111111111112 \cdot a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m \cdot \left(b\_m - a\_m\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 (<= (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) -2e-303)
                                        (* (* (PI) a_m) (* angle_m (* -0.011111111111111112 a_m)))
                                        (* (* (* 0.011111111111111112 angle_m) (PI)) (* b_m (- b_m 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 \begin{array}{l}
                                    \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -2 \cdot 10^{-303}:\\
                                    \;\;\;\;\left(\mathsf{PI}\left(\right) \cdot a\_m\right) \cdot \left(angle\_m \cdot \left(-0.011111111111111112 \cdot a\_m\right)\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b\_m \cdot \left(b\_m - a\_m\right)\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -1.99999999999999986e-303

                                      1. Initial program 46.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 rewrites47.3%

                                          \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                        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 rewrites47.3%

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

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

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

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

                                              1. Initial program 50.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 rewrites60.1%

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

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

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

                                                Alternative 5: 66.5% accurate, 3.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) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 6.8 \cdot 10^{+149}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot 2\right) \cdot \left(1 \cdot \sin \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m - a\_m\right) \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right)\right)\right) \cdot \cos \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\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 6.8e+149)
                                                    (*
                                                     (- b_m a_m)
                                                     (* (* (+ a_m b_m) 2.0) (* 1.0 (sin (* (/ angle_m 180.0) (PI))))))
                                                    (*
                                                     (* (- b_m a_m) (* (+ a_m b_m) (* (PI) (* 0.011111111111111112 angle_m))))
                                                     (cos (* (* angle_m (PI)) 0.005555555555555556))))))
                                                \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 6.8 \cdot 10^{+149}:\\
                                                \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot 2\right) \cdot \left(1 \cdot \sin \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\left(\left(b\_m - a\_m\right) \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right)\right)\right) \cdot \cos \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right)\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if b < 6.7999999999999997e149

                                                  1. Initial program 50.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 \left(\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 \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                  4. Step-by-step derivation
                                                    1. Applied rewrites51.3%

                                                      \[\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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                    2. Step-by-step derivation
                                                      1. lift-*.f64N/A

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

                                                        \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if 6.7999999999999997e149 < b

                                                      1. Initial program 39.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}{\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 rewrites66.8%

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

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

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

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

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

                                                          Alternative 6: 63.6% accurate, 3.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) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 4.9 \cdot 10^{-101}:\\ \;\;\;\;\left(\left(-2 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m - a\_m\right) \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right)\right)\right) \cdot \cos \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\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 4.9e-101)
                                                              (* (* (* -2.0 (* a_m a_m)) (sin (* (PI) (/ angle_m 180.0)))) 1.0)
                                                              (*
                                                               (* (- b_m a_m) (* (+ a_m b_m) (* (PI) (* 0.011111111111111112 angle_m))))
                                                               (cos (* (* angle_m (PI)) 0.005555555555555556))))))
                                                          \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 4.9 \cdot 10^{-101}:\\
                                                          \;\;\;\;\left(\left(-2 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right) \cdot 1\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\left(\left(b\_m - a\_m\right) \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right)\right)\right) \cdot \cos \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right)\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if b < 4.9e-101

                                                            1. Initial program 47.0%

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

                                                              \[\leadsto \left(\color{blue}{\left(-2 \cdot {a}^{2}\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) \]
                                                            4. Step-by-step derivation
                                                              1. Applied rewrites35.5%

                                                                \[\leadsto \left(\color{blue}{\left(-2 \cdot \left(a \cdot a\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. Taylor expanded in angle around 0

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

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

                                                                if 4.9e-101 < b

                                                                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}{\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 rewrites58.7%

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

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

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

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

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

                                                                    Alternative 7: 64.8% accurate, 3.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) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 7.8 \cdot 10^{+45}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot 2\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right) \cdot \cos \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\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 7.8e+45)
                                                                        (*
                                                                         (- b_m a_m)
                                                                         (* (* (+ a_m b_m) 2.0) (* (* (PI) angle_m) 0.005555555555555556)))
                                                                        (*
                                                                         (* (* (* 0.011111111111111112 angle_m) (PI)) (* (+ b_m a_m) (- b_m a_m)))
                                                                         (cos (* (* angle_m (PI)) 0.005555555555555556))))))
                                                                    \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 7.8 \cdot 10^{+45}:\\
                                                                    \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot 2\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right)\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right) \cdot \cos \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right)\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 2 regimes
                                                                    2. if angle < 7.7999999999999999e45

                                                                      1. Initial program 56.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 \left(\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 \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                                      4. Step-by-step derivation
                                                                        1. Applied rewrites56.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                                        2. Step-by-step derivation
                                                                          1. lift-*.f64N/A

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

                                                                            \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                                          3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if 7.7999999999999999e45 < angle

                                                                          1. Initial program 27.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 rewrites34.5%

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

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

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

                                                                            Alternative 8: 63.6% 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}\;b\_m \leq 10^{-157}:\\ \;\;\;\;\left(\left(-2 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(\left(a\_m + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\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 1e-157)
                                                                                (* (* (* -2.0 (* a_m a_m)) (sin (* (PI) (/ angle_m 180.0)))) 1.0)
                                                                                (*
                                                                                 (- b_m a_m)
                                                                                 (* (* (* (+ a_m b_m) (PI)) angle_m) 0.011111111111111112)))))
                                                                            \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 10^{-157}:\\
                                                                            \;\;\;\;\left(\left(-2 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right) \cdot 1\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(\left(a\_m + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 2 regimes
                                                                            2. if b < 9.99999999999999943e-158

                                                                              1. Initial program 45.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 inf

                                                                                \[\leadsto \left(\color{blue}{\left(-2 \cdot {a}^{2}\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) \]
                                                                              4. Step-by-step derivation
                                                                                1. Applied rewrites32.9%

                                                                                  \[\leadsto \left(\color{blue}{\left(-2 \cdot \left(a \cdot a\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. Taylor expanded in angle around 0

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

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

                                                                                  if 9.99999999999999943e-158 < b

                                                                                  1. Initial program 54.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 \left(\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 \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                                                  4. Step-by-step derivation
                                                                                    1. Applied rewrites51.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                                                    2. Step-by-step derivation
                                                                                      1. lift-*.f64N/A

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

                                                                                        \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                                                      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    Alternative 9: 64.1% accurate, 7.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 := \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 4.9 \cdot 10^{+58}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot 2\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right)\\ \mathbf{elif}\;angle\_m \leq 2.2 \cdot 10^{+150}:\\ \;\;\;\;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)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \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.011111111111111112 angle_m) (PI))
                                                                                              (* (+ b_m a_m) (- b_m a_m)))))
                                                                                       (*
                                                                                        angle_s
                                                                                        (if (<= angle_m 4.9e+58)
                                                                                          (*
                                                                                           (- b_m a_m)
                                                                                           (* (* (+ a_m b_m) 2.0) (* (* (PI) angle_m) 0.005555555555555556)))
                                                                                          (if (<= angle_m 2.2e+150)
                                                                                            (*
                                                                                             t_0
                                                                                             (fma (* -1.54320987654321e-5 (* angle_m angle_m)) (* (PI) (PI)) 1.0))
                                                                                            t_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(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\\
                                                                                    angle\_s \cdot \begin{array}{l}
                                                                                    \mathbf{if}\;angle\_m \leq 4.9 \cdot 10^{+58}:\\
                                                                                    \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot 2\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right)\\
                                                                                    
                                                                                    \mathbf{elif}\;angle\_m \leq 2.2 \cdot 10^{+150}:\\
                                                                                    \;\;\;\;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)\\
                                                                                    
                                                                                    \mathbf{else}:\\
                                                                                    \;\;\;\;t\_0\\
                                                                                    
                                                                                    
                                                                                    \end{array}
                                                                                    \end{array}
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Split input into 3 regimes
                                                                                    2. if angle < 4.90000000000000018e58

                                                                                      1. Initial program 55.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                                                      4. Step-by-step derivation
                                                                                        1. Applied rewrites56.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                                                        2. Step-by-step derivation
                                                                                          1. lift-*.f64N/A

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

                                                                                            \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                                                          3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                          if 4.90000000000000018e58 < angle < 2.19999999999999999e150

                                                                                          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. 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 rewrites27.4%

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

                                                                                              \[\leadsto \left(\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\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 rewrites44.8%

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

                                                                                              if 2.19999999999999999e150 < angle

                                                                                              1. Initial program 26.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 rewrites35.7%

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

                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 4.9 \cdot 10^{+58}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 2\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right)\\ \mathbf{elif}\;angle \leq 2.2 \cdot 10^{+150}:\\ \;\;\;\;\left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\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)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\ \end{array} \]
                                                                                              7. Add Preprocessing

                                                                                              Alternative 10: 64.6% accurate, 8.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 0.00096:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot 2\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{\left(b\_m - a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)}{b\_m - a\_m}\\ \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 0.00096)
                                                                                                  (*
                                                                                                   (- b_m a_m)
                                                                                                   (* (* (+ a_m b_m) 2.0) (* (* (PI) angle_m) 0.005555555555555556)))
                                                                                                  (*
                                                                                                   (* (* 0.011111111111111112 angle_m) (PI))
                                                                                                   (/ (* (- b_m a_m) (* (- b_m a_m) (+ a_m b_m))) (- b_m 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 \begin{array}{l}
                                                                                              \mathbf{if}\;angle\_m \leq 0.00096:\\
                                                                                              \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot 2\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right)\\
                                                                                              
                                                                                              \mathbf{else}:\\
                                                                                              \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{\left(b\_m - a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)}{b\_m - a\_m}\\
                                                                                              
                                                                                              
                                                                                              \end{array}
                                                                                              \end{array}
                                                                                              
                                                                                              Derivation
                                                                                              1. Split input into 2 regimes
                                                                                              2. if angle < 9.60000000000000024e-4

                                                                                                1. Initial program 56.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 \left(\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 \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. Applied rewrites57.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                                                                  2. Step-by-step derivation
                                                                                                    1. lift-*.f64N/A

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

                                                                                                      \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                                                                    3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                    if 9.60000000000000024e-4 < angle

                                                                                                    1. Initial program 28.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 rewrites34.3%

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

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

                                                                                                      Alternative 11: 64.2% accurate, 11.9× 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 6.5 \cdot 10^{-51}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot 2\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\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 6.5e-51)
                                                                                                          (*
                                                                                                           (- b_m a_m)
                                                                                                           (* (* (+ a_m b_m) 2.0) (* (* (PI) angle_m) 0.005555555555555556)))
                                                                                                          (*
                                                                                                           (* (* (PI) (- b_m a_m)) (+ a_m b_m))
                                                                                                           (* 0.011111111111111112 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 \begin{array}{l}
                                                                                                      \mathbf{if}\;angle\_m \leq 6.5 \cdot 10^{-51}:\\
                                                                                                      \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(a\_m + b\_m\right) \cdot 2\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right)\\
                                                                                                      
                                                                                                      \mathbf{else}:\\
                                                                                                      \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\\
                                                                                                      
                                                                                                      
                                                                                                      \end{array}
                                                                                                      \end{array}
                                                                                                      
                                                                                                      Derivation
                                                                                                      1. Split input into 2 regimes
                                                                                                      2. if angle < 6.5000000000000003e-51

                                                                                                        1. Initial program 55.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                                                                        4. Step-by-step derivation
                                                                                                          1. Applied rewrites55.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                                                                          2. Step-by-step derivation
                                                                                                            1. lift-*.f64N/A

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

                                                                                                              \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                                                                            3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                            if 6.5000000000000003e-51 < angle

                                                                                                            1. Initial program 35.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 rewrites41.4%

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

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

                                                                                                              Alternative 12: 64.2% accurate, 13.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 6 \cdot 10^{-51}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(\left(a\_m + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\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 6e-51)
                                                                                                                  (* (- b_m a_m) (* (* (* (+ a_m b_m) (PI)) angle_m) 0.011111111111111112))
                                                                                                                  (*
                                                                                                                   (* (* (PI) (- b_m a_m)) (+ a_m b_m))
                                                                                                                   (* 0.011111111111111112 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 \begin{array}{l}
                                                                                                              \mathbf{if}\;angle\_m \leq 6 \cdot 10^{-51}:\\
                                                                                                              \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(\left(\left(a\_m + b\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
                                                                                                              
                                                                                                              \mathbf{else}:\\
                                                                                                              \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\\
                                                                                                              
                                                                                                              
                                                                                                              \end{array}
                                                                                                              \end{array}
                                                                                                              
                                                                                                              Derivation
                                                                                                              1. Split input into 2 regimes
                                                                                                              2. if angle < 6.00000000000000005e-51

                                                                                                                1. Initial program 55.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. Applied rewrites55.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 \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                                                                                  2. Step-by-step derivation
                                                                                                                    1. lift-*.f64N/A

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

                                                                                                                      \[\leadsto \color{blue}{\left(\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 \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                                                                                    3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                    if 6.00000000000000005e-51 < angle

                                                                                                                    1. Initial program 35.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 rewrites41.4%

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

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

                                                                                                                      Alternative 13: 64.2% accurate, 13.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 1.85 \cdot 10^{-51}:\\ \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\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 1.85e-51)
                                                                                                                          (* (- b_m a_m) (* (+ a_m b_m) (* (PI) (* 0.011111111111111112 angle_m))))
                                                                                                                          (*
                                                                                                                           (* (* (PI) (- b_m a_m)) (+ a_m b_m))
                                                                                                                           (* 0.011111111111111112 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 \begin{array}{l}
                                                                                                                      \mathbf{if}\;angle\_m \leq 1.85 \cdot 10^{-51}:\\
                                                                                                                      \;\;\;\;\left(b\_m - a\_m\right) \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right)\right)\\
                                                                                                                      
                                                                                                                      \mathbf{else}:\\
                                                                                                                      \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\\
                                                                                                                      
                                                                                                                      
                                                                                                                      \end{array}
                                                                                                                      \end{array}
                                                                                                                      
                                                                                                                      Derivation
                                                                                                                      1. Split input into 2 regimes
                                                                                                                      2. if angle < 1.84999999999999987e-51

                                                                                                                        1. Initial program 55.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 rewrites59.9%

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

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

                                                                                                                            if 1.84999999999999987e-51 < angle

                                                                                                                            1. Initial program 35.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 rewrites41.4%

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

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

                                                                                                                              Alternative 14: 58.3% accurate, 13.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}\;a\_m \leq 1.05 \cdot 10^{+155}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{PI}\left(\right) \cdot a\_m\right) \cdot \left(angle\_m \cdot \left(-0.011111111111111112 \cdot a\_m\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 (<= a_m 1.05e+155)
                                                                                                                                  (* (* (* (PI) (- b_m a_m)) (+ a_m b_m)) (* 0.011111111111111112 angle_m))
                                                                                                                                  (* (* (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 \begin{array}{l}
                                                                                                                              \mathbf{if}\;a\_m \leq 1.05 \cdot 10^{+155}:\\
                                                                                                                              \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\\
                                                                                                                              
                                                                                                                              \mathbf{else}:\\
                                                                                                                              \;\;\;\;\left(\mathsf{PI}\left(\right) \cdot a\_m\right) \cdot \left(angle\_m \cdot \left(-0.011111111111111112 \cdot a\_m\right)\right)\\
                                                                                                                              
                                                                                                                              
                                                                                                                              \end{array}
                                                                                                                              \end{array}
                                                                                                                              
                                                                                                                              Derivation
                                                                                                                              1. Split input into 2 regimes
                                                                                                                              2. if a < 1.05e155

                                                                                                                                1. Initial program 50.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 rewrites52.2%

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

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

                                                                                                                                    if 1.05e155 < a

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

                                                                                                                                        \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                      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 rewrites59.1%

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

                                                                                                                                            \[\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 rewrites78.8%

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

                                                                                                                                          Alternative 15: 58.4% accurate, 13.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}\;a\_m \leq 1.05 \cdot 10^{+155}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{PI}\left(\right) \cdot a\_m\right) \cdot \left(angle\_m \cdot \left(-0.011111111111111112 \cdot a\_m\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 (<= a_m 1.05e+155)
                                                                                                                                              (* (* (* 0.011111111111111112 angle_m) (PI)) (* (+ b_m a_m) (- b_m a_m)))
                                                                                                                                              (* (* (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 \begin{array}{l}
                                                                                                                                          \mathbf{if}\;a\_m \leq 1.05 \cdot 10^{+155}:\\
                                                                                                                                          \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\\
                                                                                                                                          
                                                                                                                                          \mathbf{else}:\\
                                                                                                                                          \;\;\;\;\left(\mathsf{PI}\left(\right) \cdot a\_m\right) \cdot \left(angle\_m \cdot \left(-0.011111111111111112 \cdot a\_m\right)\right)\\
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          \end{array}
                                                                                                                                          \end{array}
                                                                                                                                          
                                                                                                                                          Derivation
                                                                                                                                          1. Split input into 2 regimes
                                                                                                                                          2. if a < 1.05e155

                                                                                                                                            1. Initial program 50.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 rewrites52.2%

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

                                                                                                                                              if 1.05e155 < a

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

                                                                                                                                                  \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                                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 rewrites59.1%

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

                                                                                                                                                      \[\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 rewrites78.8%

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

                                                                                                                                                    Alternative 16: 40.3% 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 \begin{array}{l} \mathbf{if}\;angle\_m \leq 10^{+114}:\\ \;\;\;\;\left(\mathsf{PI}\left(\right) \cdot a\_m\right) \cdot \left(angle\_m \cdot \left(-0.011111111111111112 \cdot a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \left(angle\_m \cdot \mathsf{PI}\left(\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 1e+114)
                                                                                                                                                        (* (* (PI) a_m) (* angle_m (* -0.011111111111111112 a_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)
                                                                                                                                                    
                                                                                                                                                    \\
                                                                                                                                                    angle\_s \cdot \begin{array}{l}
                                                                                                                                                    \mathbf{if}\;angle\_m \leq 10^{+114}:\\
                                                                                                                                                    \;\;\;\;\left(\mathsf{PI}\left(\right) \cdot a\_m\right) \cdot \left(angle\_m \cdot \left(-0.011111111111111112 \cdot a\_m\right)\right)\\
                                                                                                                                                    
                                                                                                                                                    \mathbf{else}:\\
                                                                                                                                                    \;\;\;\;\left(-0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\\
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    \end{array}
                                                                                                                                                    \end{array}
                                                                                                                                                    
                                                                                                                                                    Derivation
                                                                                                                                                    1. Split input into 2 regimes
                                                                                                                                                    2. if angle < 1e114

                                                                                                                                                      1. Initial program 54.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 rewrites58.4%

                                                                                                                                                          \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                                        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 rewrites38.9%

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

                                                                                                                                                              \[\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 rewrites42.6%

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

                                                                                                                                                              if 1e114 < angle

                                                                                                                                                              1. Initial program 25.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 rewrites34.7%

                                                                                                                                                                  \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                                                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 rewrites28.5%

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

                                                                                                                                                                Alternative 17: 40.3% 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 \begin{array}{l} \mathbf{if}\;angle\_m \leq 10^{+114}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \left(angle\_m \cdot \mathsf{PI}\left(\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 1e+114)
                                                                                                                                                                    (* (* -0.011111111111111112 a_m) (* a_m (* (PI) angle_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)
                                                                                                                                                                
                                                                                                                                                                \\
                                                                                                                                                                angle\_s \cdot \begin{array}{l}
                                                                                                                                                                \mathbf{if}\;angle\_m \leq 10^{+114}:\\
                                                                                                                                                                \;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right)\\
                                                                                                                                                                
                                                                                                                                                                \mathbf{else}:\\
                                                                                                                                                                \;\;\;\;\left(-0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\\
                                                                                                                                                                
                                                                                                                                                                
                                                                                                                                                                \end{array}
                                                                                                                                                                \end{array}
                                                                                                                                                                
                                                                                                                                                                Derivation
                                                                                                                                                                1. Split input into 2 regimes
                                                                                                                                                                2. if angle < 1e114

                                                                                                                                                                  1. Initial program 54.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 rewrites58.4%

                                                                                                                                                                      \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                                                    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 rewrites38.9%

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

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

                                                                                                                                                                        if 1e114 < angle

                                                                                                                                                                        1. Initial program 25.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 rewrites34.7%

                                                                                                                                                                            \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                                                          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 rewrites28.5%

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

                                                                                                                                                                          Alternative 18: 39.0% 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 48.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 rewrites53.9%

                                                                                                                                                                              \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                                                                                                            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 rewrites36.9%

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