ab-angle->ABCF B

Percentage Accurate: 52.8% → 66.8%
Time: 9.2s
Alternatives: 20
Speedup: 10.3×

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: 52.8% 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: 66.8% accurate, 1.6× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(0.011111111111111112 \cdot t\_0\right)}{{\left(\left(\frac{-1}{b\_m - a\_m} \cdot \mathsf{fma}\left(b\_m - a\_m, a\_m, \left(b\_m - a\_m\right) \cdot b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)}^{-1}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000004e192

    1. Initial program 59.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 \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e192 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 18.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. 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) \]
      8. flip--N/A

        \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
    4. Applied rewrites13.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{{\left(\left(b - a\right) \cdot \left(\left(-\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(\left(b - a\right)\right)}}\right)\right)}^{-1}} \]
      23. lower-neg.f6413.3

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

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

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

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

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

        \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{{\left(\left(b - a\right) \cdot \left(\left(\left(b - a\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\left(b + a\right)}\right)\right)\right) \cdot \frac{1}{-\left(b - a\right)}\right)\right)}^{-1}} \]
      5. flip-+N/A

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

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

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

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

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

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

        \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{{\left(\left(b - a\right) \cdot \left(\left(\left(b - a\right) \cdot \left(\mathsf{neg}\left(\frac{\left(b - a\right) \cdot \left(b + a\right)}{\color{blue}{b - a}}\right)\right)\right) \cdot \frac{1}{-\left(b - a\right)}\right)\right)}^{-1}} \]
      12. div-invN/A

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

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

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

        \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{{\left(\left(b - a\right) \cdot \left(\left(\left(b - a\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{\color{blue}{-\left(b - a\right)}}\right)\right) \cdot \frac{1}{-\left(b - a\right)}\right)\right)}^{-1}} \]
      16. inv-powN/A

        \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{{\left(\left(b - a\right) \cdot \left(\left(\left(b - a\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{{\left(-\left(b - a\right)\right)}^{-1}}\right)\right) \cdot \frac{1}{-\left(b - a\right)}\right)\right)}^{-1}} \]
      17. sqr-powN/A

        \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{{\left(\left(b - a\right) \cdot \left(\left(\left(b - a\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left({\left(-\left(b - a\right)\right)}^{\left(\frac{-1}{2}\right)} \cdot {\left(-\left(b - a\right)\right)}^{\left(\frac{-1}{2}\right)}\right)}\right)\right) \cdot \frac{1}{-\left(b - a\right)}\right)\right)}^{-1}} \]
      18. pow-prod-downN/A

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

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

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

Alternative 2: 56.4% accurate, 1.0× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a\_m}^{2}\\ t_1 := \left(\left(a\_m \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right)\right) \cdot \mathsf{PI}\left(\right)\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-125}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
a_m = (fabs.f64 a)
(FPCore (a_m b_m angle)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a_m 2.0)))
        (t_1 (* (* (* a_m angle) (* -0.011111111111111112 a_m)) (PI))))
   (if (<= t_0 -5e-125)
     t_1
     (if (<= t_0 INFINITY)
       (* (* b_m b_m) (* 0.011111111111111112 (* (PI) angle)))
       t_1))))
\begin{array}{l}
b_m = \left|b\right|
\\
a_m = \left|a\right|

\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a\_m}^{2}\\
t_1 := \left(\left(a\_m \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right)\right) \cdot \mathsf{PI}\left(\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-125}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.99999999999999967e-125 or +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto {b}^{2} \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{90} \cdot \frac{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)}{b}\right)} \]
          7. Applied rewrites59.2%

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

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

        Alternative 3: 56.4% accurate, 1.0× speedup?

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

          1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto {b}^{2} \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{90} \cdot \frac{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)}{b}\right)} \]
                7. Applied rewrites59.2%

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

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

                1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 4: 56.4% accurate, 1.0× speedup?

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

                    1. Initial program 49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto {b}^{2} \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{90} \cdot \frac{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)}{b}\right)} \]
                        7. Applied rewrites59.2%

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

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

                      Alternative 5: 66.8% accurate, 1.7× speedup?

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

                        1. Initial program 59.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 \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 5.00000000000000009e183 < (/.f64 angle #s(literal 180 binary64))

                        1. Initial program 18.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. 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) \]
                          8. flip--N/A

                            \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

                            \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

                            \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
                        4. Applied rewrites12.8%

                          \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}} \]
                        5. Step-by-step derivation
                          1. remove-double-negN/A

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{\color{blue}{0 - \left(\mathsf{neg}\left({\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}\right)\right)}} \]
                          4. lift-pow.f64N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\color{blue}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}\right)\right)} \]
                          5. unpow-1N/A

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

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

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

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

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{b \cdot b - a \cdot a}}\right)\right)} \]
                          12. pow2N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{{b}^{2}} - a \cdot a}\right)\right)} \]
                          13. pow2N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{{b}^{2} - \color{blue}{{a}^{2}}}\right)\right)} \]
                          14. distribute-neg-fracN/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \color{blue}{\frac{\mathsf{neg}\left(1\right)}{{b}^{2} - {a}^{2}}}} \]
                          15. metadata-evalN/A

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \frac{-1}{\color{blue}{\left(b - a\right) \cdot \left(a + b\right)}}} \]
                          24. lift-*.f6438.8

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

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

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

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

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

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

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

                      Alternative 6: 66.9% accurate, 1.7× speedup?

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

                        1. Initial program 59.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 \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 5.00000000000000009e183 < (/.f64 angle #s(literal 180 binary64))

                        1. Initial program 18.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. 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) \]
                          8. flip--N/A

                            \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

                            \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

                            \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
                        4. Applied rewrites12.8%

                          \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}} \]
                        5. Step-by-step derivation
                          1. remove-double-negN/A

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{\color{blue}{0 - \left(\mathsf{neg}\left({\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}\right)\right)}} \]
                          4. lift-pow.f64N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\color{blue}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}\right)\right)} \]
                          5. unpow-1N/A

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

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

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

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

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{b \cdot b - a \cdot a}}\right)\right)} \]
                          12. pow2N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{{b}^{2}} - a \cdot a}\right)\right)} \]
                          13. pow2N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{{b}^{2} - \color{blue}{{a}^{2}}}\right)\right)} \]
                          14. distribute-neg-fracN/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \color{blue}{\frac{\mathsf{neg}\left(1\right)}{{b}^{2} - {a}^{2}}}} \]
                          15. metadata-evalN/A

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \frac{-1}{\color{blue}{\left(b - a\right) \cdot \left(a + b\right)}}} \]
                          24. lift-*.f6438.8

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

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

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

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

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

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

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

                      Alternative 7: 66.9% accurate, 1.7× speedup?

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

                        1. Initial program 59.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 \left(\color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 5.00000000000000009e183 < (/.f64 angle #s(literal 180 binary64))

                        1. Initial program 18.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. 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) \]
                          8. flip--N/A

                            \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

                            \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

                            \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
                        4. Applied rewrites12.8%

                          \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}} \]
                        5. Step-by-step derivation
                          1. remove-double-negN/A

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{\color{blue}{0 - \left(\mathsf{neg}\left({\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}\right)\right)}} \]
                          4. lift-pow.f64N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\color{blue}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}\right)\right)} \]
                          5. unpow-1N/A

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

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

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

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

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{b \cdot b - a \cdot a}}\right)\right)} \]
                          12. pow2N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{{b}^{2}} - a \cdot a}\right)\right)} \]
                          13. pow2N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{{b}^{2} - \color{blue}{{a}^{2}}}\right)\right)} \]
                          14. distribute-neg-fracN/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \color{blue}{\frac{\mathsf{neg}\left(1\right)}{{b}^{2} - {a}^{2}}}} \]
                          15. metadata-evalN/A

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \frac{-1}{\color{blue}{\left(b - a\right) \cdot \left(a + b\right)}}} \]
                          24. lift-*.f6438.8

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

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

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

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

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

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

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

                      Alternative 8: 67.0% accurate, 1.7× speedup?

                      \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} t_0 := \sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\\ \mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+137}:\\ \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot t\_0\right) \cdot \left(b\_m - a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-t\_0}{\frac{{\left(b\_m - a\_m\right)}^{-1}}{b\_m + a\_m}}\\ \end{array} \end{array} \]
                      b_m = (fabs.f64 b)
                      a_m = (fabs.f64 a)
                      (FPCore (a_m b_m angle)
                       :precision binary64
                       (let* ((t_0 (sin (* (* 0.011111111111111112 (PI)) angle))))
                         (if (<= (/ angle 180.0) 4e+137)
                           (* (* (+ b_m a_m) t_0) (- b_m a_m))
                           (/ (- t_0) (/ (pow (- b_m a_m) -1.0) (+ b_m a_m))))))
                      \begin{array}{l}
                      b_m = \left|b\right|
                      \\
                      a_m = \left|a\right|
                      
                      \\
                      \begin{array}{l}
                      t_0 := \sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\\
                      \mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+137}:\\
                      \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot t\_0\right) \cdot \left(b\_m - a\_m\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{-t\_0}{\frac{{\left(b\_m - a\_m\right)}^{-1}}{b\_m + a\_m}}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (/.f64 angle #s(literal 180 binary64)) < 4.0000000000000001e137

                        1. Initial program 60.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. 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) \]
                          8. flip--N/A

                            \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

                            \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

                            \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
                        4. Applied rewrites65.1%

                          \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}} \]
                        5. Step-by-step derivation
                          1. *-lft-identityN/A

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

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

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

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

                            \[\leadsto \frac{1 \cdot \left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right)}{{\color{blue}{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}}^{-1}} \]
                          6. unpow-prod-downN/A

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

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

                            \[\leadsto \frac{1}{\color{blue}{\frac{1}{b - a}}} \cdot \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{{\left(a + b\right)}^{-1}} \]
                          9. remove-double-divN/A

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

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

                            \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right) \cdot \frac{1}{{\left(a + b\right)}^{-1}}\right)} \]
                          12. unpow-1N/A

                            \[\leadsto \left(b - a\right) \cdot \left(\left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right) \cdot \frac{1}{\color{blue}{\frac{1}{a + b}}}\right) \]
                          13. remove-double-divN/A

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

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

                        if 4.0000000000000001e137 < (/.f64 angle #s(literal 180 binary64))

                        1. Initial program 23.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. 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) \]
                          8. flip--N/A

                            \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

                            \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

                            \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
                        4. Applied rewrites17.2%

                          \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}} \]
                        5. Step-by-step derivation
                          1. remove-double-negN/A

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{\color{blue}{0 - \left(\mathsf{neg}\left({\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}\right)\right)}} \]
                          4. lift-pow.f64N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\color{blue}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}\right)\right)} \]
                          5. unpow-1N/A

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

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

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

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

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{b \cdot b - a \cdot a}}\right)\right)} \]
                          12. pow2N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{{b}^{2}} - a \cdot a}\right)\right)} \]
                          13. pow2N/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{{b}^{2} - \color{blue}{{a}^{2}}}\right)\right)} \]
                          14. distribute-neg-fracN/A

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \color{blue}{\frac{\mathsf{neg}\left(1\right)}{{b}^{2} - {a}^{2}}}} \]
                          15. metadata-evalN/A

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \frac{-1}{\color{blue}{\left(b - a\right) \cdot \left(a + b\right)}}} \]
                          24. lift-*.f6435.9

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

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

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

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

                          \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{\color{blue}{0 - \frac{-1}{\left(b - a\right) \cdot \left(b + a\right)}}} \]
                        7. Applied rewrites50.4%

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

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

                      Alternative 9: 63.7% accurate, 2.8× speedup?

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

                        1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(b + a\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 2.00000000000000007e-10 < (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999947e182

                          1. Initial program 40.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. 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) \]
                            8. flip--N/A

                              \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

                              \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

                              \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
                          4. Applied rewrites49.8%

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

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

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

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

                              \[\leadsto \frac{1}{\color{blue}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}} \cdot \left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right) \]
                            5. unpow-1N/A

                              \[\leadsto \frac{1}{\color{blue}{\frac{1}{\left(b - a\right) \cdot \left(a + b\right)}}} \cdot \left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right) \]
                            6. remove-double-divN/A

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\left(b \cdot b - a \cdot a\right)} \cdot \left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right) \]
                            13. pow2N/A

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

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

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

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

                          if 9.99999999999999947e182 < (/.f64 angle #s(literal 180 binary64))

                          1. Initial program 18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 10: 63.6% accurate, 2.8× speedup?

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

                            1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(b + a\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 2.00000000000000007e-10 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000015e191

                              1. Initial program 40.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. *-commutativeN/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 \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) \]
                                16. 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) \]
                                17. +-commutativeN/A

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

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

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

                              if 2.00000000000000015e191 < (/.f64 angle #s(literal 180 binary64))

                              1. Initial program 18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 11: 67.0% accurate, 3.1× speedup?

                              \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} t_0 := \sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\\ \mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+137}:\\ \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot t\_0\right) \cdot \left(b\_m - a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 \cdot \left(a\_m - b\_m\right)\right) \cdot \left(b\_m + a\_m\right)\\ \end{array} \end{array} \]
                              b_m = (fabs.f64 b)
                              a_m = (fabs.f64 a)
                              (FPCore (a_m b_m angle)
                               :precision binary64
                               (let* ((t_0 (sin (* (* 0.011111111111111112 (PI)) angle))))
                                 (if (<= (/ angle 180.0) 4e+137)
                                   (* (* (+ b_m a_m) t_0) (- b_m a_m))
                                   (* (* t_0 (- a_m b_m)) (+ b_m a_m)))))
                              \begin{array}{l}
                              b_m = \left|b\right|
                              \\
                              a_m = \left|a\right|
                              
                              \\
                              \begin{array}{l}
                              t_0 := \sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\\
                              \mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+137}:\\
                              \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot t\_0\right) \cdot \left(b\_m - a\_m\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(t\_0 \cdot \left(a\_m - b\_m\right)\right) \cdot \left(b\_m + a\_m\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (/.f64 angle #s(literal 180 binary64)) < 4.0000000000000001e137

                                1. Initial program 60.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. 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) \]
                                  8. flip--N/A

                                    \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

                                    \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

                                    \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
                                4. Applied rewrites65.1%

                                  \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}} \]
                                5. Step-by-step derivation
                                  1. *-lft-identityN/A

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

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

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

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

                                    \[\leadsto \frac{1 \cdot \left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right)}{{\color{blue}{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}}^{-1}} \]
                                  6. unpow-prod-downN/A

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

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

                                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{b - a}}} \cdot \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{{\left(a + b\right)}^{-1}} \]
                                  9. remove-double-divN/A

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

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

                                    \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right) \cdot \frac{1}{{\left(a + b\right)}^{-1}}\right)} \]
                                  12. unpow-1N/A

                                    \[\leadsto \left(b - a\right) \cdot \left(\left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right) \cdot \frac{1}{\color{blue}{\frac{1}{a + b}}}\right) \]
                                  13. remove-double-divN/A

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

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

                                if 4.0000000000000001e137 < (/.f64 angle #s(literal 180 binary64))

                                1. Initial program 23.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. 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) \]
                                  8. flip--N/A

                                    \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

                                    \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

                                    \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
                                4. Applied rewrites17.2%

                                  \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}} \]
                                5. Step-by-step derivation
                                  1. remove-double-negN/A

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

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

                                    \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{\color{blue}{0 - \left(\mathsf{neg}\left({\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}\right)\right)}} \]
                                  4. lift-pow.f64N/A

                                    \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\color{blue}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}\right)\right)} \]
                                  5. unpow-1N/A

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

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

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

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

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

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

                                    \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{b \cdot b - a \cdot a}}\right)\right)} \]
                                  12. pow2N/A

                                    \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{{b}^{2}} - a \cdot a}\right)\right)} \]
                                  13. pow2N/A

                                    \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{{b}^{2} - \color{blue}{{a}^{2}}}\right)\right)} \]
                                  14. distribute-neg-fracN/A

                                    \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \color{blue}{\frac{\mathsf{neg}\left(1\right)}{{b}^{2} - {a}^{2}}}} \]
                                  15. metadata-evalN/A

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \frac{-1}{\color{blue}{\left(b - a\right) \cdot \left(a + b\right)}}} \]
                                  24. lift-*.f6435.9

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

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

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

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

                                  \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{\color{blue}{0 - \frac{-1}{\left(b - a\right) \cdot \left(b + a\right)}}} \]
                                7. Applied rewrites50.4%

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

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

                              Alternative 12: 66.5% accurate, 3.1× speedup?

                              \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} t_0 := \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\\ \mathbf{if}\;\frac{angle}{180} \leq 10^{+183}:\\ \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \sin t\_0\right) \cdot \left(b\_m - a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-a\_m\right) \cdot \left(b\_m + a\_m\right)\right) \cdot t\_0\\ \end{array} \end{array} \]
                              b_m = (fabs.f64 b)
                              a_m = (fabs.f64 a)
                              (FPCore (a_m b_m angle)
                               :precision binary64
                               (let* ((t_0 (* (* 0.011111111111111112 (PI)) angle)))
                                 (if (<= (/ angle 180.0) 1e+183)
                                   (* (* (+ b_m a_m) (sin t_0)) (- b_m a_m))
                                   (* (* (- a_m) (+ b_m a_m)) t_0))))
                              \begin{array}{l}
                              b_m = \left|b\right|
                              \\
                              a_m = \left|a\right|
                              
                              \\
                              \begin{array}{l}
                              t_0 := \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\\
                              \mathbf{if}\;\frac{angle}{180} \leq 10^{+183}:\\
                              \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \sin t\_0\right) \cdot \left(b\_m - a\_m\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(\left(-a\_m\right) \cdot \left(b\_m + a\_m\right)\right) \cdot t\_0\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999947e182

                                1. Initial program 59.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. 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) \]
                                  8. flip--N/A

                                    \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

                                    \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

                                    \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
                                4. Applied rewrites64.6%

                                  \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}} \]
                                5. Step-by-step derivation
                                  1. *-lft-identityN/A

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

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

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

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

                                    \[\leadsto \frac{1 \cdot \left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right)}{{\color{blue}{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}}^{-1}} \]
                                  6. unpow-prod-downN/A

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

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

                                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{b - a}}} \cdot \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{{\left(a + b\right)}^{-1}} \]
                                  9. remove-double-divN/A

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

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

                                    \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right) \cdot \frac{1}{{\left(a + b\right)}^{-1}}\right)} \]
                                  12. unpow-1N/A

                                    \[\leadsto \left(b - a\right) \cdot \left(\left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right) \cdot \frac{1}{\color{blue}{\frac{1}{a + b}}}\right) \]
                                  13. remove-double-divN/A

                                    \[\leadsto \left(b - a\right) \cdot \left(\left(1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(a + b\right)}\right) \]
                                6. Applied rewrites74.3%

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

                                if 9.99999999999999947e182 < (/.f64 angle #s(literal 180 binary64))

                                1. Initial program 18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 13: 66.4% accurate, 3.1× speedup?

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

                                  1. Initial program 59.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. 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) \]
                                    8. 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) \]
                                    9. 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) \]
                                    10. 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) \]
                                    11. 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) \]
                                    12. 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) \]
                                    13. associate-*l*N/A

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

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

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

                                  if 2.00000000000000015e191 < (/.f64 angle #s(literal 180 binary64))

                                  1. Initial program 18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 14: 56.8% accurate, 3.4× speedup?

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

                                    1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 1.9999999999999999e247 < (pow.f64 a #s(literal 2 binary64))

                                      1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\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 rewrites62.2%

                                            \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right) \cdot a \]
                                        3. Recombined 2 regimes into one program.
                                        4. Final simplification59.0%

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

                                        Alternative 15: 56.8% accurate, 3.4× speedup?

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

                                          1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 1.9999999999999999e247 < (pow.f64 a #s(literal 2 binary64))

                                            1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\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 rewrites62.2%

                                                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right) \cdot a \]
                                              3. Recombined 2 regimes into one program.
                                              4. Final simplification59.0%

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

                                              Alternative 16: 56.8% accurate, 3.4× speedup?

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

                                                1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 1.9999999999999999e247 < (pow.f64 a #s(literal 2 binary64))

                                                1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\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 rewrites62.2%

                                                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right) \cdot a \]
                                                  3. Recombined 2 regimes into one program.
                                                  4. Final simplification59.0%

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

                                                  Alternative 17: 39.3% accurate, 3.5× speedup?

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

                                                    1. Initial program 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if 5.0000000000000002e255 < (pow.f64 a #s(literal 2 binary64))

                                                      1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 18: 62.7% accurate, 5.8× speedup?

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

                                                          1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \left(b + a\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 45000 < (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999947e182

                                                            1. Initial program 40.4%

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

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

                                                                \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                              3. 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. 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) \]
                                                              8. flip--N/A

                                                                \[\leadsto \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}} \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. clear-numN/A

                                                                \[\leadsto \color{blue}{\frac{1}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \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. associate-*l/N/A

                                                                \[\leadsto \color{blue}{\frac{1 \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)}{\frac{{b}^{2} + {a}^{2}}{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}}} \]
                                                            4. Applied rewrites47.3%

                                                              \[\leadsto \color{blue}{\frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}} \]
                                                            5. Step-by-step derivation
                                                              1. remove-double-negN/A

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

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

                                                                \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{\color{blue}{0 - \left(\mathsf{neg}\left({\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}\right)\right)}} \]
                                                              4. lift-pow.f64N/A

                                                                \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\color{blue}{{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}^{-1}}\right)\right)} \]
                                                              5. unpow-1N/A

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

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

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

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

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

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

                                                                \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{b \cdot b - a \cdot a}}\right)\right)} \]
                                                              12. pow2N/A

                                                                \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{\color{blue}{{b}^{2}} - a \cdot a}\right)\right)} \]
                                                              13. pow2N/A

                                                                \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \left(\mathsf{neg}\left(\frac{1}{{b}^{2} - \color{blue}{{a}^{2}}}\right)\right)} \]
                                                              14. distribute-neg-fracN/A

                                                                \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \color{blue}{\frac{\mathsf{neg}\left(1\right)}{{b}^{2} - {a}^{2}}}} \]
                                                              15. metadata-evalN/A

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

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

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

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

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

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

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

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

                                                                \[\leadsto \frac{1 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}{0 - \frac{-1}{\color{blue}{\left(b - a\right) \cdot \left(a + b\right)}}} \]
                                                              24. lift-*.f6437.3

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \frac{\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot angle\right) \cdot 0.011111111111111112}{0 - \frac{-1}{\left(b - a\right) \cdot \left(b + a\right)}} \]
                                                            9. Applied rewrites39.6%

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

                                                            if 9.99999999999999947e182 < (/.f64 angle #s(literal 180 binary64))

                                                            1. Initial program 18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 19: 62.0% accurate, 10.3× speedup?

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

                                                              1. Initial program 62.5%

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

                                                                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                              4. Step-by-step derivation
                                                                1. *-commutativeN/A

                                                                  \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
                                                                2. associate-*r*N/A

                                                                  \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
                                                                3. *-commutativeN/A

                                                                  \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                4. associate-*r*N/A

                                                                  \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                5. associate-*r*N/A

                                                                  \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                6. lower-*.f64N/A

                                                                  \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                7. lower-*.f64N/A

                                                                  \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                8. lower-*.f64N/A

                                                                  \[\leadsto \left(angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                9. lower-PI.f64N/A

                                                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                10. unpow2N/A

                                                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                11. unpow2N/A

                                                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                12. difference-of-squaresN/A

                                                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                13. lower-*.f64N/A

                                                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                14. lower-+.f64N/A

                                                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                15. lower--.f6461.2

                                                                  \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                              5. Applied rewrites61.2%

                                                                \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                              6. Step-by-step derivation
                                                                1. Applied rewrites69.6%

                                                                  \[\leadsto \left(b + a\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 2e46 < (/.f64 angle #s(literal 180 binary64))

                                                                1. Initial program 24.6%

                                                                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in angle around 0

                                                                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                4. Step-by-step derivation
                                                                  1. *-commutativeN/A

                                                                    \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
                                                                  2. associate-*r*N/A

                                                                    \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
                                                                  3. *-commutativeN/A

                                                                    \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                  4. associate-*r*N/A

                                                                    \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                  5. associate-*r*N/A

                                                                    \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                  6. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                  7. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  8. lower-*.f64N/A

                                                                    \[\leadsto \left(angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  9. lower-PI.f64N/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  10. unpow2N/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                  11. unpow2N/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                  12. difference-of-squaresN/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                  13. lower-*.f64N/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                  14. lower-+.f64N/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                  15. lower--.f6431.0

                                                                    \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                5. Applied rewrites31.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)} \]
                                                                6. Taylor expanded in a around inf

                                                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot \color{blue}{a}\right)\right) \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites35.1%

                                                                    \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right) \]
                                                                8. Recombined 2 regimes into one program.
                                                                9. Final simplification63.3%

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+46}:\\ \;\;\;\;\left(\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-a\right) \cdot \left(b + a\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\\ \end{array} \]
                                                                10. Add Preprocessing

                                                                Alternative 20: 37.9% accurate, 21.6× speedup?

                                                                \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\_m\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right) \end{array} \]
                                                                b_m = (fabs.f64 b)
                                                                a_m = (fabs.f64 a)
                                                                (FPCore (a_m b_m angle)
                                                                 :precision binary64
                                                                 (* (* (* (PI) angle) a_m) (* -0.011111111111111112 a_m)))
                                                                \begin{array}{l}
                                                                b_m = \left|b\right|
                                                                \\
                                                                a_m = \left|a\right|
                                                                
                                                                \\
                                                                \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\_m\right) \cdot \left(-0.011111111111111112 \cdot a\_m\right)
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Initial program 55.5%

                                                                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in angle around 0

                                                                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                4. Step-by-step derivation
                                                                  1. *-commutativeN/A

                                                                    \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
                                                                  2. associate-*r*N/A

                                                                    \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
                                                                  3. *-commutativeN/A

                                                                    \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                  4. associate-*r*N/A

                                                                    \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                  5. associate-*r*N/A

                                                                    \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                  6. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                  7. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  8. lower-*.f64N/A

                                                                    \[\leadsto \left(angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  9. lower-PI.f64N/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  10. unpow2N/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                  11. unpow2N/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                  12. difference-of-squaresN/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                  13. lower-*.f64N/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                  14. lower-+.f64N/A

                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                  15. lower--.f6455.7

                                                                    \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                5. Applied rewrites55.7%

                                                                  \[\leadsto \color{blue}{\left(angle \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                6. Taylor expanded in a around inf

                                                                  \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites38.0%

                                                                    \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
                                                                  2. Step-by-step derivation
                                                                    1. Applied rewrites39.3%

                                                                      \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                                                                    2. Final simplification39.3%

                                                                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right) \]
                                                                    3. Add Preprocessing

                                                                    Reproduce

                                                                    ?
                                                                    herbie shell --seed 2024332 
                                                                    (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)))))