ab-angle->ABCF B

Percentage Accurate: 54.6% → 68.2%
Time: 7.0s
Alternatives: 17
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 17 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.6% 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: 68.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\mathsf{PI}\left(\right)}{2}\\
t_1 := \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right) - \mathsf{fma}\left(\frac{angle\_m}{180}, \mathsf{PI}\left(\right), t\_0\right)\right) + t\_0\\
t_2 := \mathsf{fma}\left(\frac{angle\_m}{180}, \mathsf{PI}\left(\right), 0.5 \cdot \mathsf{PI}\left(\right)\right) + t\_0\\
t_3 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 4.5 \cdot 10^{+121}:\\
\;\;\;\;\left(2 \cdot \cos t\_3\right) \cdot \left(\left(\sin t\_3 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \frac{2 \cdot \left(\sin \left(\frac{t\_1 - t\_2}{2}\right) \cdot \cos \left(\frac{t\_1 + t\_2}{2}\right)\right)}{2}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 4.5000000000000003e121

    1. Initial program 62.1%

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

        \[\leadsto \left(\color{blue}{\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) \]
      4. lift--.f64N/A

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
      7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
    5. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      9. lift-PI.f6475.8

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.5000000000000003e121 < angle

    1. Initial program 25.1%

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

        \[\leadsto \left(\color{blue}{\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) \]
      4. lift--.f64N/A

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
      7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \frac{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} - \mathsf{fma}\left(\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) - \cos \left(\mathsf{fma}\left(\mathsf{PI}\left(\right), \frac{angle}{180}, 0.5 \cdot \mathsf{PI}\left(\right)\right)\right)}{2} \]
    9. Applied rewrites29.4%

      \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \frac{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} - \mathsf{fma}\left(\mathsf{PI}\left(\right), \frac{angle}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) - \cos \left(\mathsf{fma}\left(\mathsf{PI}\left(\right), \frac{angle}{180}, \color{blue}{0.5 \cdot \mathsf{PI}\left(\right)}\right)\right)}{2} \]
    10. Applied rewrites36.6%

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

Alternative 2: 59.2% accurate, 1.0× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-220} \lor \neg \left(t\_0 \leq \infty\right):\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* 2.0 (- (pow b 2.0) (pow a 2.0)))))
   (*
    angle_s
    (if (or (<= t_0 -2e-220) (not (<= t_0 INFINITY)))
      (* (* -0.011111111111111112 a) (* (* angle_m (PI)) a))
      (* (* (* (PI) (* b b)) angle_m) 0.011111111111111112)))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-220} \lor \neg \left(t\_0 \leq \infty\right):\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\


\end{array}
\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.99999999999999998e-220 or +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 45.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
      13. lower--.f6446.2

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

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

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

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

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

        \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      4. pow2N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
      7. lift-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
      8. lift-PI.f6444.0

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
    8. Applied rewrites44.0%

      \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
      2. lift-*.f64N/A

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

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

        \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
      5. lower-*.f6445.5

        \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
    10. Applied rewrites45.5%

      \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
      3. lift-*.f64N/A

        \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
      4. associate-*l*N/A

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

        \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
      7. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
      13. lift-PI.f6453.7

        \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
    12. Applied rewrites53.7%

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

    if -1.99999999999999998e-220 < (*.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 65.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
      13. lower--.f6459.2

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

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

      \[\leadsto \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
      6. pow2N/A

        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
      7. lift-*.f6459.4

        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
    8. Applied rewrites59.4%

      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.7%

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

Alternative 3: 65.0% accurate, 1.3× speedup?

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

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

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


\end{array}
\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)))) < 1e-224

    1. Initial program 55.3%

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

        \[\leadsto \left(\color{blue}{\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) \]
      4. lift--.f64N/A

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
      7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
    5. Taylor expanded in angle around inf

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

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

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

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

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

          \[\leadsto 2 \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot a\right) \cdot \left(b - a\right)\right) \]
      4. Applied rewrites57.7%

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

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

      1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
        9. *-commutativeN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
        14. +-commutativeN/A

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

          \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
        16. lift--.f6468.8

          \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
      7. Applied rewrites68.8%

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

    Alternative 4: 67.9% accurate, 1.7× speedup?

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

      1. Initial program 61.9%

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

          \[\leadsto \left(\color{blue}{\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) \]
        4. lift--.f64N/A

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
        7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
      5. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.9000000000000001e105 < angle

      1. Initial program 28.1%

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

          \[\leadsto \left(\color{blue}{\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) \]
        4. lift--.f64N/A

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
        7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
      5. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        9. lift-PI.f6430.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \sin \left(\left(-\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        17. lift-PI.f6433.0

          \[\leadsto \left(2 \cdot \sin \left(\left(-\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      10. Applied rewrites33.0%

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

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

    Alternative 5: 67.9% accurate, 1.7× speedup?

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

      1. Initial program 63.3%

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

          \[\leadsto \left(\color{blue}{\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) \]
        4. lift--.f64N/A

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
        7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
      5. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        9. lift-PI.f6477.5

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        9. lift-PI.f6477.5

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

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

      if 6e61 < 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. 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 \frac{angle}{180}\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 \frac{angle}{180}\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(\color{blue}{\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) \]
        4. lift--.f64N/A

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
        7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
      5. Step-by-step derivation
        1. lift-PI.f64N/A

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

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

          \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \color{blue}{\frac{angle}{180}}\right)\right) \]
        4. associate-*r/N/A

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

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

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

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

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

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

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

    Alternative 6: 67.8% accurate, 1.8× speedup?

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

      1. Initial program 57.5%

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

          \[\leadsto \left(\color{blue}{\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) \]
        4. lift--.f64N/A

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
        7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
      5. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        9. lift-PI.f6466.3

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

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

      if 9.5000000000000001e154 < b

      1. Initial program 43.7%

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

          \[\leadsto \left(\color{blue}{\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) \]
        4. lift--.f64N/A

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
        7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
      5. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b - a\right)\right) \]
        8. lift-PI.f6477.1

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right) \]
      9. Applied rewrites77.1%

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

    Alternative 7: 68.0% accurate, 1.8× speedup?

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

      1. Initial program 62.3%

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

          \[\leadsto \left(\color{blue}{\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) \]
        4. lift--.f64N/A

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
        7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
      5. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        9. lift-PI.f6476.0

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      8. Applied rewrites76.0%

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        9. lift-PI.f6476.0

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

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

      if 1.09999999999999999e126 < angle

      1. Initial program 23.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. 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 \frac{angle}{180}\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 \frac{angle}{180}\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(\color{blue}{\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) \]
        4. lift--.f64N/A

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
        7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
      5. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto 2 \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
          9. lift-PI.f6427.8

            \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        3. Applied rewrites27.8%

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

      Alternative 8: 59.0% accurate, 1.9× speedup?

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

        1. Initial program 52.8%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in angle around 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          13. lower--.f6444.3

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

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

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

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

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

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          4. pow2N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          7. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          8. lift-PI.f6443.6

            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        8. Applied rewrites43.6%

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
        9. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          2. lift-*.f64N/A

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

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

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          5. lower-*.f6445.4

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        10. Applied rewrites45.4%

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        11. Step-by-step derivation
          1. lift-*.f64N/A

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

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          3. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          4. associate-*l*N/A

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

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
          6. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
          7. *-commutativeN/A

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

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

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

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

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

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          13. lift-PI.f6452.6

            \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        12. Applied rewrites52.6%

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

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

        1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 67.8% accurate, 3.0× speedup?

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

          1. Initial program 64.1%

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

              \[\leadsto \left(\color{blue}{\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) \]
            4. lift--.f64N/A

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

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

              \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
            7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
          5. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b - a\right)\right) \]
            8. lift-PI.f6477.6

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right) \]
          9. Applied rewrites77.6%

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

          if 1.8e-10 < angle

          1. Initial program 33.9%

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

              \[\leadsto \left(\color{blue}{\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) \]
            4. lift--.f64N/A

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

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

              \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
            7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
          5. Step-by-step derivation
            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \color{blue}{\frac{angle}{180}}\right)\right) \]
          6. Applied rewrites36.7%

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

        Alternative 10: 67.6% accurate, 3.1× speedup?

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

          1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. *-commutativeN/A

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

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

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

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

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            14. +-commutativeN/A

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

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            16. lift--.f6475.9

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          7. Applied rewrites75.9%

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

          if 1.5e-10 < angle

          1. Initial program 33.9%

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

              \[\leadsto \left(\color{blue}{\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) \]
            4. lift--.f64N/A

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

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

              \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
            7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
          5. Step-by-step derivation
            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \color{blue}{\frac{angle}{180}}\right)\right) \]
          6. Applied rewrites36.7%

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

        Alternative 11: 66.0% accurate, 3.3× speedup?

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

          1. Initial program 57.2%

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

              \[\leadsto \left(\color{blue}{\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) \]
            4. lift--.f64N/A

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

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

              \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
            7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
          5. Taylor expanded in angle around inf

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

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

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

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

            if 8.8000000000000001e89 < b

            1. Initial program 49.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
              9. *-commutativeN/A

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

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

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

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

                \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
              14. +-commutativeN/A

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

                \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
              16. lift--.f6466.5

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

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

          Alternative 12: 66.6% accurate, 3.3× speedup?

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

            1. Initial program 57.2%

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

                \[\leadsto \left(\color{blue}{\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) \]
              4. lift--.f64N/A

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

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

                \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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) \]
              7. lift-sin.f64N/A

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\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 \frac{angle}{180}\right)\right)} \]
            5. Taylor expanded in angle around inf

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto 2 \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
                9. lift-PI.f6462.7

                  \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
              3. Applied rewrites62.7%

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

              if 6.1e119 < b

              1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                9. *-commutativeN/A

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

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

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

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

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                14. +-commutativeN/A

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

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                16. lift--.f6469.8

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              7. Applied rewrites69.8%

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

            Alternative 13: 59.3% accurate, 3.4× speedup?

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

              1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6452.8

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                7. associate-*l*N/A

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

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

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

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

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

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

                  \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \cdot \frac{1}{90} \]
                14. +-commutativeN/A

                  \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right) \cdot \frac{1}{90} \]
                15. lower-+.f6452.9

                  \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right) \cdot 0.011111111111111112 \]
              7. Applied rewrites52.9%

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

              if 1.99999999999999997e307 < (pow.f64 a #s(literal 2 binary64))

              1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. pow2N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                6. *-commutativeN/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                7. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                8. lift-PI.f6450.3

                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              8. Applied rewrites50.3%

                \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                2. lift-*.f64N/A

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

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

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                5. lower-*.f6453.5

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

                \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              11. Step-by-step derivation
                1. lift-*.f64N/A

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

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                3. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                4. associate-*l*N/A

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

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
                6. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
                7. *-commutativeN/A

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

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

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

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

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

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
                13. lift-PI.f6470.5

                  \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
              12. Applied rewrites70.5%

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

            Alternative 14: 59.1% accurate, 3.4× speedup?

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

              1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                6. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
                18. +-commutativeN/A

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

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

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

              if 8.00000000000000026e286 < (pow.f64 a #s(literal 2 binary64))

              1. Initial program 44.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. pow2N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                6. *-commutativeN/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                7. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                8. lift-PI.f6448.7

                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              8. Applied rewrites48.7%

                \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                2. lift-*.f64N/A

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

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

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                5. lower-*.f6451.7

                  \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              10. Applied rewrites51.7%

                \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              11. Step-by-step derivation
                1. lift-*.f64N/A

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

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                3. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                4. associate-*l*N/A

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

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
                6. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
                7. *-commutativeN/A

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

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

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

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

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

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
                13. lift-PI.f6467.1

                  \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
              12. Applied rewrites67.1%

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

            Alternative 15: 59.1% accurate, 3.4× speedup?

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

              1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                9. +-commutativeN/A

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

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

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

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

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

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

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

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

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

              if 8.00000000000000026e286 < (pow.f64 a #s(literal 2 binary64))

              1. Initial program 44.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. pow2N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                6. *-commutativeN/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                7. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                8. lift-PI.f6448.7

                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              8. Applied rewrites48.7%

                \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                2. lift-*.f64N/A

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

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

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                5. lower-*.f6451.7

                  \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              10. Applied rewrites51.7%

                \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              11. Step-by-step derivation
                1. lift-*.f64N/A

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

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                3. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                4. associate-*l*N/A

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

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
                6. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
                7. *-commutativeN/A

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

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

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

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

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

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
                13. lift-PI.f6467.1

                  \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
              12. Applied rewrites67.1%

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

            Alternative 16: 63.5% accurate, 13.7× speedup?

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

              1. Initial program 58.3%

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

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

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

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

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

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6456.0

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites56.0%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                2. lift-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                3. lift--.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                4. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                5. associate-*r*N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                8. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                9. *-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                10. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                11. *-commutativeN/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                12. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                13. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                14. +-commutativeN/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                15. lower-+.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                16. lift--.f6464.8

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              7. Applied rewrites64.8%

                \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]

              if 5.49999999999999997e187 < angle

              1. Initial program 25.1%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 0

                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6420.2

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites20.2%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Taylor expanded in a around 0

                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot b\right)\right) \cdot \frac{1}{90} \]
              7. Step-by-step derivation
                1. Applied rewrites20.4%

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot b\right)\right) \cdot 0.011111111111111112 \]
              8. Recombined 2 regimes into one program.
              9. Add Preprocessing

              Alternative 17: 38.1% accurate, 21.6× speedup?

              \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)\right) \end{array} \]
              angle\_m = (fabs.f64 angle)
              angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
              (FPCore (angle_s a b angle_m)
               :precision binary64
               (* angle_s (* (* -0.011111111111111112 a) (* (* angle_m (PI)) a))))
              \begin{array}{l}
              angle\_m = \left|angle\right|
              \\
              angle\_s = \mathsf{copysign}\left(1, angle\right)
              
              \\
              angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)\right)
              \end{array}
              
              Derivation
              1. Initial program 55.6%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 0

                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6453.0

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites53.0%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Taylor expanded in a around inf

                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
              7. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                2. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                3. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. pow2N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                6. *-commutativeN/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                7. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                8. lift-PI.f6430.3

                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              8. Applied rewrites30.3%

                \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                5. lower-*.f6431.0

                  \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              10. Applied rewrites31.0%

                \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
              11. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{angle}\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                3. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                4. associate-*l*N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right) \]
                5. lift-PI.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
                6. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
                7. *-commutativeN/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                8. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                9. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
                10. *-commutativeN/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
                12. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
                13. lift-PI.f6433.4

                  \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
              12. Applied rewrites33.4%

                \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{a}\right) \]
              13. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2025056 
              (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)))))