ab-angle->ABCF B

Percentage Accurate: 54.2% → 67.7%
Time: 8.5s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 54.2% accurate, 1.0× speedup?

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

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

Alternative 1: 67.7% accurate, 1.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \begin{array}{l} t_0 := \sqrt{\mathsf{PI}\left(\right)}\\ \mathbf{if}\;a\_m \leq 1.52 \cdot 10^{+153}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(\left(b\_m - a\_m\right) \cdot 2\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right)\right)\right)\\ \mathbf{elif}\;a\_m \leq 1.25 \cdot 10^{+266}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b\_m - a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\sin \left(2 \cdot \frac{\left(angle \cdot t\_0\right) \cdot t\_0}{180}\right) \cdot \left(b\_m - a\_m\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
(FPCore (a_m b_m angle)
 :precision binary64
 (let* ((t_0 (sqrt (PI))))
   (if (<= a_m 1.52e+153)
     (*
      (+ a_m b_m)
      (*
       (* (- b_m a_m) 2.0)
       (* (sin (* (/ angle 180.0) (PI))) (cos (/ (* (PI) angle) -180.0)))))
     (if (<= a_m 1.25e+266)
       (*
        (+ a_m b_m)
        (*
         (*
          (fma
           (* -2.2862368541380886e-7 (* angle angle))
           (pow (PI) 3.0)
           (* 0.011111111111111112 (PI)))
          angle)
         (- b_m a_m)))
       (*
        (+ a_m b_m)
        (* (sin (* 2.0 (/ (* (* angle t_0) t_0) 180.0))) (- b_m a_m)))))))
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|

\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
\mathbf{if}\;a\_m \leq 1.52 \cdot 10^{+153}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(\left(b\_m - a\_m\right) \cdot 2\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right)\right)\right)\\

\mathbf{elif}\;a\_m \leq 1.25 \cdot 10^{+266}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b\_m - a\_m\right)\right)\\

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


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

    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. 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. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(\left(b - a\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)\right)} \]
    10. Applied rewrites65.5%

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

    if 1.52e153 < a < 1.25e266

    1. Initial program 38.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. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)} \cdot \left(b - a\right)\right) \]

      if 1.25e266 < a

      1. Initial program 53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(a + b\right) \cdot \left(\sin \left(2 \cdot \frac{\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}{180}\right) \cdot \left(b - a\right)\right) \]
        10. lower-sqrt.f6484.4

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

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

    Alternative 2: 63.2% accurate, 0.7× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \begin{array}{l} t_0 := \sqrt{\mathsf{PI}\left(\right)}\\ t_1 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\ \mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq -2 \cdot 10^{+295}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(\mathsf{fma}\left(2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, -0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\sin \left(2 \cdot \left(\left(\frac{angle}{180} \cdot t\_0\right) \cdot t\_0\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\ \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    b_m = (fabs.f64 b)
    (FPCore (a_m b_m angle)
     :precision binary64
     (let* ((t_0 (sqrt (PI))) (t_1 (* (PI) (/ angle 180.0))))
       (if (<=
            (* (* (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) (sin t_1)) (cos t_1))
            -2e+295)
         (*
          (+ a_m b_m)
          (*
           (*
            (fma
             (* 2.2862368541380886e-7 (* angle angle))
             (pow (PI) 3.0)
             (* -0.011111111111111112 (PI)))
            angle)
           a_m))
         (*
          (+ a_m b_m)
          (* (sin (* 2.0 (* (* (/ angle 180.0) t_0) t_0))) (- b_m a_m))))))
    \begin{array}{l}
    a_m = \left|a\right|
    \\
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
    t_1 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\
    \mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq -2 \cdot 10^{+295}:\\
    \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(\mathsf{fma}\left(2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, -0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot a\_m\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\sin \left(2 \cdot \left(\left(\frac{angle}{180} \cdot t\_0\right) \cdot t\_0\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -2e295

      1. Initial program 50.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(angle \cdot \left(\frac{-1}{90} \cdot \mathsf{PI}\left(\right) + \frac{1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right)\right) \cdot a\right) \]
        3. Step-by-step derivation
          1. Applied rewrites58.0%

            \[\leadsto \left(a + b\right) \cdot \left(\left(\mathsf{fma}\left(2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, -0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot a\right) \]

          if -2e295 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

          1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 3: 66.5% accurate, 0.8× speedup?

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

          1. Initial program 49.9%

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

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

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

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

              if -2.0000000000000001e300 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 2e-204

              1. Initial program 63.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. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 4: 68.0% accurate, 1.3× speedup?

                  \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -5 \cdot 10^{+295}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(\mathsf{fma}\left(2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, -0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\sin \left(2 \cdot \frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right) \cdot \left(b\_m - a\_m\right)\right)\\ \end{array} \end{array} \]
                  a_m = (fabs.f64 a)
                  b_m = (fabs.f64 b)
                  (FPCore (a_m b_m angle)
                   :precision binary64
                   (if (<= (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) -5e+295)
                     (*
                      (+ a_m b_m)
                      (*
                       (*
                        (fma
                         (* 2.2862368541380886e-7 (* angle angle))
                         (pow (PI) 3.0)
                         (* -0.011111111111111112 (PI)))
                        angle)
                       a_m))
                     (* (+ a_m b_m) (* (sin (* 2.0 (/ (* angle (PI)) 180.0))) (- b_m a_m)))))
                  \begin{array}{l}
                  a_m = \left|a\right|
                  \\
                  b_m = \left|b\right|
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -5 \cdot 10^{+295}:\\
                  \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(\mathsf{fma}\left(2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, -0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot a\_m\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\sin \left(2 \cdot \frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right) \cdot \left(b\_m - a\_m\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.99999999999999991e295

                    1. Initial program 49.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(a + b\right) \cdot \left(\left(angle \cdot \left(\frac{-1}{90} \cdot \mathsf{PI}\left(\right) + \frac{1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right)\right) \cdot a\right) \]
                      3. Step-by-step derivation
                        1. Applied rewrites80.8%

                          \[\leadsto \left(a + b\right) \cdot \left(\left(\mathsf{fma}\left(2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, -0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot a\right) \]

                        if -4.99999999999999991e295 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                        1. Initial program 55.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. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 5: 66.4% accurate, 1.3× speedup?

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

                        1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 6: 66.5% accurate, 1.3× speedup?

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

                                1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 7: 59.7% accurate, 1.9× speedup?

                                      \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -\infty:\\ \;\;\;\;\left(a\_m \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right) \cdot angle\\ \end{array} \end{array} \]
                                      a_m = (fabs.f64 a)
                                      b_m = (fabs.f64 b)
                                      (FPCore (a_m b_m angle)
                                       :precision binary64
                                       (if (<= (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) (- INFINITY))
                                         (* (* a_m (* (* (PI) angle) a_m)) -0.011111111111111112)
                                         (* (* (* 0.011111111111111112 (PI)) (* (- b_m a_m) (+ a_m b_m))) angle)))
                                      \begin{array}{l}
                                      a_m = \left|a\right|
                                      \\
                                      b_m = \left|b\right|
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -\infty:\\
                                      \;\;\;\;\left(a\_m \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right) \cdot angle\\
                                      
                                      
                                      \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)))) < -inf.0

                                        1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

                                                1. Initial program 55.8%

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

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

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

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

                                                  Alternative 8: 59.7% accurate, 1.9× speedup?

                                                  \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -\infty:\\ \;\;\;\;\left(a\_m \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\\ \end{array} \end{array} \]
                                                  a_m = (fabs.f64 a)
                                                  b_m = (fabs.f64 b)
                                                  (FPCore (a_m b_m angle)
                                                   :precision binary64
                                                   (if (<= (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) (- INFINITY))
                                                     (* (* a_m (* (* (PI) angle) a_m)) -0.011111111111111112)
                                                     (* (* angle (* 0.011111111111111112 (PI))) (* (+ b_m a_m) (- b_m a_m)))))
                                                  \begin{array}{l}
                                                  a_m = \left|a\right|
                                                  \\
                                                  b_m = \left|b\right|
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -\infty:\\
                                                  \;\;\;\;\left(a\_m \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\\
                                                  
                                                  
                                                  \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)))) < -inf.0

                                                    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

                                                            1. Initial program 55.8%

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

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

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

                                                            Alternative 9: 59.4% accurate, 1.9× speedup?

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

                                                              1. Initial program 52.5%

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

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

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

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

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

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

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

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

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

                                                                      1. Initial program 55.6%

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

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

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

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

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

                                                                        Alternative 10: 58.4% accurate, 1.9× speedup?

                                                                        \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -1 \cdot 10^{-238}:\\ \;\;\;\;\left(a\_m \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
                                                                        a_m = (fabs.f64 a)
                                                                        b_m = (fabs.f64 b)
                                                                        (FPCore (a_m b_m angle)
                                                                         :precision binary64
                                                                         (if (<= (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) -1e-238)
                                                                           (* (* a_m (* (* (PI) angle) a_m)) -0.011111111111111112)
                                                                           (* (* (* (PI) (* b_m b_m)) angle) 0.011111111111111112)))
                                                                        \begin{array}{l}
                                                                        a_m = \left|a\right|
                                                                        \\
                                                                        b_m = \left|b\right|
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -1 \cdot 10^{-238}:\\
                                                                        \;\;\;\;\left(a\_m \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\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-239

                                                                          1. Initial program 52.5%

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

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

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

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

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

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

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

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

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

                                                                                  1. Initial program 55.6%

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

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

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

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

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

                                                                                    Alternative 11: 68.3% accurate, 3.3× speedup?

                                                                                    \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \left(a\_m + b\_m\right) \cdot \left(\sin \left(2 \cdot \frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right) \cdot \left(b\_m - a\_m\right)\right) \end{array} \]
                                                                                    a_m = (fabs.f64 a)
                                                                                    b_m = (fabs.f64 b)
                                                                                    (FPCore (a_m b_m angle)
                                                                                     :precision binary64
                                                                                     (* (+ a_m b_m) (* (sin (* 2.0 (/ (* angle (PI)) 180.0))) (- b_m a_m))))
                                                                                    \begin{array}{l}
                                                                                    a_m = \left|a\right|
                                                                                    \\
                                                                                    b_m = \left|b\right|
                                                                                    
                                                                                    \\
                                                                                    \left(a\_m + b\_m\right) \cdot \left(\sin \left(2 \cdot \frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right) \cdot \left(b\_m - a\_m\right)\right)
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    Alternative 12: 68.1% accurate, 3.3× speedup?

                                                                                    \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \left(a\_m + b\_m\right) \cdot \left(\sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \left(b\_m - a\_m\right)\right) \end{array} \]
                                                                                    a_m = (fabs.f64 a)
                                                                                    b_m = (fabs.f64 b)
                                                                                    (FPCore (a_m b_m angle)
                                                                                     :precision binary64
                                                                                     (* (+ a_m b_m) (* (sin (* 2.0 (* (PI) (/ angle 180.0)))) (- b_m a_m))))
                                                                                    \begin{array}{l}
                                                                                    a_m = \left|a\right|
                                                                                    \\
                                                                                    b_m = \left|b\right|
                                                                                    
                                                                                    \\
                                                                                    \left(a\_m + b\_m\right) \cdot \left(\sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \left(b\_m - a\_m\right)\right)
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    Alternative 13: 68.2% accurate, 3.3× speedup?

                                                                                    \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \left(a\_m + b\_m\right) \cdot \left(\sin \left(\frac{\mathsf{PI}\left(\right)}{180} \cdot \left(angle + angle\right)\right) \cdot \left(b\_m - a\_m\right)\right) \end{array} \]
                                                                                    a_m = (fabs.f64 a)
                                                                                    b_m = (fabs.f64 b)
                                                                                    (FPCore (a_m b_m angle)
                                                                                     :precision binary64
                                                                                     (* (+ a_m b_m) (* (sin (* (/ (PI) 180.0) (+ angle angle))) (- b_m a_m))))
                                                                                    \begin{array}{l}
                                                                                    a_m = \left|a\right|
                                                                                    \\
                                                                                    b_m = \left|b\right|
                                                                                    
                                                                                    \\
                                                                                    \left(a\_m + b\_m\right) \cdot \left(\sin \left(\frac{\mathsf{PI}\left(\right)}{180} \cdot \left(angle + angle\right)\right) \cdot \left(b\_m - a\_m\right)\right)
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \left(a + b\right) \cdot \left(\sin \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{180} \cdot \left(angle + angle\right)\right)} \cdot \left(b - a\right)\right) \]
                                                                                    11. Add Preprocessing

                                                                                    Alternative 14: 64.5% accurate, 3.6× speedup?

                                                                                    \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;a\_m \leq 5.4 \cdot 10^{-124}:\\ \;\;\;\;\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m \cdot b\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\ \end{array} \end{array} \]
                                                                                    a_m = (fabs.f64 a)
                                                                                    b_m = (fabs.f64 b)
                                                                                    (FPCore (a_m b_m angle)
                                                                                     :precision binary64
                                                                                     (if (<= a_m 5.4e-124)
                                                                                       (* (sin (* (* (PI) angle) 0.011111111111111112)) (* b_m b_m))
                                                                                       (* (+ a_m b_m) (* (- b_m a_m) (* (* 0.011111111111111112 (PI)) angle)))))
                                                                                    \begin{array}{l}
                                                                                    a_m = \left|a\right|
                                                                                    \\
                                                                                    b_m = \left|b\right|
                                                                                    
                                                                                    \\
                                                                                    \begin{array}{l}
                                                                                    \mathbf{if}\;a\_m \leq 5.4 \cdot 10^{-124}:\\
                                                                                    \;\;\;\;\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m \cdot b\_m\right)\\
                                                                                    
                                                                                    \mathbf{else}:\\
                                                                                    \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\
                                                                                    
                                                                                    
                                                                                    \end{array}
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Split input into 2 regimes
                                                                                    2. if a < 5.40000000000000035e-124

                                                                                      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. 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. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        if 5.40000000000000035e-124 < a

                                                                                        1. Initial program 51.4%

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

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

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

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

                                                                                          Alternative 15: 68.2% accurate, 3.6× speedup?

                                                                                          \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \left(a\_m + b\_m\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\_m\right)\right) \end{array} \]
                                                                                          a_m = (fabs.f64 a)
                                                                                          b_m = (fabs.f64 b)
                                                                                          (FPCore (a_m b_m angle)
                                                                                           :precision binary64
                                                                                           (* (+ a_m b_m) (* (sin (* (* (PI) angle) 0.011111111111111112)) (- b_m a_m))))
                                                                                          \begin{array}{l}
                                                                                          a_m = \left|a\right|
                                                                                          \\
                                                                                          b_m = \left|b\right|
                                                                                          
                                                                                          \\
                                                                                          \left(a\_m + b\_m\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\_m\right)\right)
                                                                                          \end{array}
                                                                                          
                                                                                          Derivation
                                                                                          1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            Alternative 16: 64.6% accurate, 13.7× speedup?

                                                                                            \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \begin{array}{l} t_0 := 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\\ \mathbf{if}\;angle \leq 5.5 \cdot 10^{-35}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(t\_0 \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right) \cdot angle\\ \end{array} \end{array} \]
                                                                                            a_m = (fabs.f64 a)
                                                                                            b_m = (fabs.f64 b)
                                                                                            (FPCore (a_m b_m angle)
                                                                                             :precision binary64
                                                                                             (let* ((t_0 (* 0.011111111111111112 (PI))))
                                                                                               (if (<= angle 5.5e-35)
                                                                                                 (* (+ a_m b_m) (* (- b_m a_m) (* t_0 angle)))
                                                                                                 (* (* t_0 (* (- b_m a_m) (+ a_m b_m))) angle))))
                                                                                            \begin{array}{l}
                                                                                            a_m = \left|a\right|
                                                                                            \\
                                                                                            b_m = \left|b\right|
                                                                                            
                                                                                            \\
                                                                                            \begin{array}{l}
                                                                                            t_0 := 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\\
                                                                                            \mathbf{if}\;angle \leq 5.5 \cdot 10^{-35}:\\
                                                                                            \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(t\_0 \cdot angle\right)\right)\\
                                                                                            
                                                                                            \mathbf{else}:\\
                                                                                            \;\;\;\;\left(t\_0 \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\right) \cdot angle\\
                                                                                            
                                                                                            
                                                                                            \end{array}
                                                                                            \end{array}
                                                                                            
                                                                                            Derivation
                                                                                            1. Split input into 2 regimes
                                                                                            2. if angle < 5.4999999999999997e-35

                                                                                              1. Initial program 60.8%

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

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

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

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

                                                                                                  if 5.4999999999999997e-35 < angle

                                                                                                  1. Initial program 37.1%

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

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

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

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

                                                                                                    Alternative 17: 39.8% accurate, 21.6× speedup?

                                                                                                    \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \left(a\_m \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112 \end{array} \]
                                                                                                    a_m = (fabs.f64 a)
                                                                                                    b_m = (fabs.f64 b)
                                                                                                    (FPCore (a_m b_m angle)
                                                                                                     :precision binary64
                                                                                                     (* (* a_m (* (* (PI) angle) a_m)) -0.011111111111111112))
                                                                                                    \begin{array}{l}
                                                                                                    a_m = \left|a\right|
                                                                                                    \\
                                                                                                    b_m = \left|b\right|
                                                                                                    
                                                                                                    \\
                                                                                                    \left(a\_m \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Initial program 54.2%

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

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

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

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

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

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

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

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

                                                                                                            Alternative 18: 39.8% accurate, 21.6× speedup?

                                                                                                            \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ \left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \end{array} \]
                                                                                                            a_m = (fabs.f64 a)
                                                                                                            b_m = (fabs.f64 b)
                                                                                                            (FPCore (a_m b_m angle)
                                                                                                             :precision binary64
                                                                                                             (* (* -0.011111111111111112 a_m) (* a_m (* (PI) angle))))
                                                                                                            \begin{array}{l}
                                                                                                            a_m = \left|a\right|
                                                                                                            \\
                                                                                                            b_m = \left|b\right|
                                                                                                            
                                                                                                            \\
                                                                                                            \left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)
                                                                                                            \end{array}
                                                                                                            
                                                                                                            Derivation
                                                                                                            1. Initial program 54.2%

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

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

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

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

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

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

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

                                                                                                                    Alternative 19: 39.8% accurate, 21.6× speedup?

                                                                                                                    \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ a\_m \cdot \left(\left(a\_m \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot -0.011111111111111112\right) \end{array} \]
                                                                                                                    a_m = (fabs.f64 a)
                                                                                                                    b_m = (fabs.f64 b)
                                                                                                                    (FPCore (a_m b_m angle)
                                                                                                                     :precision binary64
                                                                                                                     (* a_m (* (* a_m (* (PI) angle)) -0.011111111111111112)))
                                                                                                                    \begin{array}{l}
                                                                                                                    a_m = \left|a\right|
                                                                                                                    \\
                                                                                                                    b_m = \left|b\right|
                                                                                                                    
                                                                                                                    \\
                                                                                                                    a\_m \cdot \left(\left(a\_m \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot -0.011111111111111112\right)
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Initial program 54.2%

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

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

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

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

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

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

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

                                                                                                                            Alternative 20: 36.0% accurate, 21.6× speedup?

                                                                                                                            \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ -0.011111111111111112 \cdot \left(\left(a\_m \cdot a\_m\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \end{array} \]
                                                                                                                            a_m = (fabs.f64 a)
                                                                                                                            b_m = (fabs.f64 b)
                                                                                                                            (FPCore (a_m b_m angle)
                                                                                                                             :precision binary64
                                                                                                                             (* -0.011111111111111112 (* (* a_m a_m) (* angle (PI)))))
                                                                                                                            \begin{array}{l}
                                                                                                                            a_m = \left|a\right|
                                                                                                                            \\
                                                                                                                            b_m = \left|b\right|
                                                                                                                            
                                                                                                                            \\
                                                                                                                            -0.011111111111111112 \cdot \left(\left(a\_m \cdot a\_m\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)
                                                                                                                            \end{array}
                                                                                                                            
                                                                                                                            Derivation
                                                                                                                            1. Initial program 54.2%

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

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

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

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

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

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

                                                                                                                                  Reproduce

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