ab-angle->ABCF B

Percentage Accurate: 53.9% → 67.0%
Time: 9.3s
Alternatives: 23
Speedup: 13.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 53.9% accurate, 1.0× speedup?

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

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

Alternative 1: 67.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt[3]{\mathsf{PI}\left(\right)}\\
t_1 := 2 \cdot \left(b - a\right)\\
t_2 := \sqrt{\mathsf{PI}\left(\right)}\\
t_3 := {t\_0}^{2}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 1.1 \cdot 10^{+76}:\\
\;\;\;\;\left(a + b\right) \cdot \left(t\_1 \cdot \left(\cos \left(\left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot t\_2\right) \cdot t\_2\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right)\right)\\

\mathbf{elif}\;angle\_m \leq 4 \cdot 10^{+142}:\\
\;\;\;\;\left(a + b\right) \cdot \left(t\_1 \cdot \left(1 \cdot \sin \left(\left(\frac{angle\_m}{180} \cdot t\_3\right) \cdot t\_0\right)\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if angle < 1.1e76

    1. Initial program 63.3%

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

      \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
    4. Step-by-step derivation
      1. lower-*.f6462.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1e76 < angle < 4.0000000000000002e142

    1. Initial program 22.5%

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

      \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
    4. Step-by-step derivation
      1. lower-*.f6416.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(\cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sin \left(\left(\frac{angle}{180} \cdot {\left(\sqrt[3]{\mathsf{PI}\left(\right)}\right)}^{2}\right) \cdot \sqrt[3]{\color{blue}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
      13. lower-cbrt.f6430.0

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

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

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

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

      if 4.0000000000000002e142 < angle

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

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

          \[\leadsto \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \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)} \]
        4. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 67.0% accurate, 0.8× speedup?

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

        1. Initial program 62.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 \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
        4. Step-by-step derivation
          1. lower-*.f6462.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.16e93 < angle

        1. Initial program 20.0%

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
        4. Step-by-step derivation
          1. lower-*.f6419.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(a + b\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(\cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sin \left(\left(\frac{angle}{180} \cdot {\left(\sqrt[3]{\mathsf{PI}\left(\right)}\right)}^{2}\right) \cdot \sqrt[3]{\color{blue}{\mathsf{PI}\left(\right)}}\right)\right)\right) \]
          13. lower-cbrt.f6436.6

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 67.4% accurate, 1.0× speedup?

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

        1. Initial program 63.3%

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
        4. Step-by-step derivation
          1. lower-*.f6462.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.1e76 < angle

        1. Initial program 22.9%

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
        4. Step-by-step derivation
          1. lower-*.f6422.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 67.0% accurate, 1.6× speedup?

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

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

              \[\leadsto \color{blue}{\left(2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \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) \]
            4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(\left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 2\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(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot 2\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            2. flip3-+N/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{{a}^{3} + {b}^{3}}{\color{blue}{\mathsf{fma}\left(a, a - b, b \cdot b\right)}} \cdot \left(b - a\right)\right)\right) \cdot 2\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            12. lower--.f6428.5

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

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

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

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

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

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

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

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

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

            if 2.19999999999999996e44 < angle < 6.40000000000000038e141

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

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

                \[\leadsto \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \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)} \]
              4. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
              19. lower-*.f6441.6

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

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

            if 6.40000000000000038e141 < angle

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

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

                \[\leadsto \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \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)} \]
              4. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 54.4% accurate, 1.7× speedup?

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

            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. Taylor expanded in angle around 0

              \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
            4. Step-by-step derivation
              1. lower-*.f6458.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 7.3999999999999999e-134 < b

            1. Initial program 48.0%

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

              \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
            4. Step-by-step derivation
              1. lower-*.f6450.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 67.3% accurate, 1.7× speedup?

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

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

                \[\leadsto \color{blue}{\left(2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \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) \]
              4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(\left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 2\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(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot 2\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              2. flip3-+N/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{{a}^{3} + {b}^{3}}{\color{blue}{\mathsf{fma}\left(a, a - b, b \cdot b\right)}} \cdot \left(b - a\right)\right)\right) \cdot 2\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              12. lower--.f6428.5

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

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

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

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

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

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

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

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

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

              if 2.19999999999999996e44 < angle < 4.50000000000000045e186

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

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

                  \[\leadsto \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \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)} \]
                4. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                19. lower-*.f6436.4

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

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

              if 4.50000000000000045e186 < angle

              1. Initial program 25.1%

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

                \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
              4. Step-by-step derivation
                1. lower-*.f6430.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 67.3% accurate, 1.8× speedup?

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

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

                  \[\leadsto \color{blue}{\left(2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \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) \]
                4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(\left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 2\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(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot 2\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                2. flip3-+N/A

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{{a}^{3} + {b}^{3}}{\color{blue}{\mathsf{fma}\left(a, a - b, b \cdot b\right)}} \cdot \left(b - a\right)\right)\right) \cdot 2\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                12. lower--.f6428.5

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

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

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

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

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

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

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

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

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

                if 2.19999999999999996e44 < angle

                1. Initial program 24.9%

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

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                4. Step-by-step derivation
                  1. lower-*.f6424.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 8: 53.9% accurate, 1.8× speedup?

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

                  1. Initial program 58.9%

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

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                  4. Step-by-step derivation
                    1. lower-*.f6457.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 6.50000000000000033e-99 < b < 6.5999999999999997e-57

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

                      \[\leadsto \color{blue}{\left(2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \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) \]
                    4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 2\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}, 1\right) \]
                  7. Applied rewrites78.2%

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

                  if 6.5999999999999997e-57 < b

                  1. Initial program 44.9%

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

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                  4. Step-by-step derivation
                    1. lower-*.f6446.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 9: 58.4% accurate, 1.9× speedup?

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

                    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 10: 58.4% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 11: 58.4% accurate, 1.9× speedup?

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

                                1. Initial program 57.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\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 rewrites69.0%

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

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

                                    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 12: 58.4% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 13: 57.0% accurate, 1.9× speedup?

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

                                          1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              Alternative 14: 57.0% accurate, 1.9× speedup?

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

                                                1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    Alternative 15: 59.1% accurate, 3.1× speedup?

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

                                                      1. Initial program 63.3%

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

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

                                                          \[\leadsto \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
                                                        3. lift-*.f64N/A

                                                          \[\leadsto \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \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)} \]
                                                        4. associate-*r*N/A

                                                          \[\leadsto \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                                                        5. lower-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                                                      4. Applied rewrites66.4%

                                                        \[\leadsto \color{blue}{\left(\cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)} \]
                                                      5. Taylor expanded in angle around 0

                                                        \[\leadsto \color{blue}{\left(2 \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                      6. Step-by-step derivation
                                                        1. *-commutativeN/A

                                                          \[\leadsto \color{blue}{\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 2\right)} \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        2. lower-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 2\right)} \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        3. +-commutativeN/A

                                                          \[\leadsto \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        4. difference-of-squares-revN/A

                                                          \[\leadsto \left(\color{blue}{\left(b \cdot b - a \cdot a\right)} \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        5. unpow2N/A

                                                          \[\leadsto \left(\left(\color{blue}{{b}^{2}} - a \cdot a\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        6. fp-cancel-sub-sign-invN/A

                                                          \[\leadsto \left(\color{blue}{\left({b}^{2} + \left(\mathsf{neg}\left(a\right)\right) \cdot a\right)} \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        7. distribute-lft-neg-inN/A

                                                          \[\leadsto \left(\left({b}^{2} + \color{blue}{\left(\mathsf{neg}\left(a \cdot a\right)\right)}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        8. unpow2N/A

                                                          \[\leadsto \left(\left({b}^{2} + \left(\mathsf{neg}\left(\color{blue}{{a}^{2}}\right)\right)\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        9. mul-1-negN/A

                                                          \[\leadsto \left(\left({b}^{2} + \color{blue}{-1 \cdot {a}^{2}}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        10. +-commutativeN/A

                                                          \[\leadsto \left(\color{blue}{\left(-1 \cdot {a}^{2} + {b}^{2}\right)} \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        11. mul-1-negN/A

                                                          \[\leadsto \left(\left(\color{blue}{\left(\mathsf{neg}\left({a}^{2}\right)\right)} + {b}^{2}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        12. unpow2N/A

                                                          \[\leadsto \left(\left(\left(\mathsf{neg}\left(\color{blue}{a \cdot a}\right)\right) + {b}^{2}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        13. distribute-lft-neg-inN/A

                                                          \[\leadsto \left(\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right) \cdot a} + {b}^{2}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        14. mul-1-negN/A

                                                          \[\leadsto \left(\left(\color{blue}{\left(-1 \cdot a\right)} \cdot a + {b}^{2}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        15. lower-fma.f64N/A

                                                          \[\leadsto \left(\color{blue}{\mathsf{fma}\left(-1 \cdot a, a, {b}^{2}\right)} \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        16. mul-1-negN/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(a\right)}, a, {b}^{2}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        17. lower-neg.f64N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(\color{blue}{-a}, a, {b}^{2}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        18. unpow2N/A

                                                          \[\leadsto \left(\mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                        19. lower-*.f6463.9

                                                          \[\leadsto \left(\mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right) \cdot 2\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]
                                                      7. Applied rewrites63.9%

                                                        \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-a, a, b \cdot b\right) \cdot 2\right)} \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \]

                                                      if 5.5000000000000003e-137 < a

                                                      1. Initial program 43.0%

                                                        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in angle around 0

                                                        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                      4. Step-by-step derivation
                                                        1. lower-*.f6441.8

                                                          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                      5. Applied rewrites41.8%

                                                        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                      6. Step-by-step derivation
                                                        1. lift-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)} \]
                                                        2. lift-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                        3. associate-*l*N/A

                                                          \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right)} \]
                                                        4. lift-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                        5. *-commutativeN/A

                                                          \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                        6. lift--.f64N/A

                                                          \[\leadsto \left(\color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                        7. lift-pow.f64N/A

                                                          \[\leadsto \left(\left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                        8. lift-pow.f64N/A

                                                          \[\leadsto \left(\left({b}^{2} - \color{blue}{{a}^{2}}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                        9. pow2N/A

                                                          \[\leadsto \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                        10. pow2N/A

                                                          \[\leadsto \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                        11. difference-of-squares-revN/A

                                                          \[\leadsto \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                        12. lift-+.f64N/A

                                                          \[\leadsto \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                        13. lift--.f64N/A

                                                          \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                        14. associate-*l*N/A

                                                          \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot 2\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      7. Applied rewrites61.1%

                                                        \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(\cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
                                                      8. Taylor expanded in angle around 0

                                                        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                                                      9. Step-by-step derivation
                                                        1. *-commutativeN/A

                                                          \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right)} \]
                                                        2. lower-*.f64N/A

                                                          \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right)} \]
                                                        3. *-commutativeN/A

                                                          \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
                                                        4. lower-*.f64N/A

                                                          \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
                                                        5. *-commutativeN/A

                                                          \[\leadsto \left(a + b\right) \cdot \left(\left(\color{blue}{\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot angle\right) \cdot \frac{1}{90}\right) \]
                                                        6. lower-*.f64N/A

                                                          \[\leadsto \left(a + b\right) \cdot \left(\left(\color{blue}{\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot angle\right) \cdot \frac{1}{90}\right) \]
                                                        7. lower--.f64N/A

                                                          \[\leadsto \left(a + b\right) \cdot \left(\left(\left(\color{blue}{\left(b - a\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90}\right) \]
                                                        8. lower-PI.f6463.4

                                                          \[\leadsto \left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot angle\right) \cdot 0.011111111111111112\right) \]
                                                      10. Applied rewrites63.4%

                                                        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)} \]
                                                    3. Recombined 2 regimes into one program.
                                                    4. Add Preprocessing

                                                    Alternative 16: 65.9% accurate, 3.2× speedup?

                                                    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a + b\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(1 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right)\right)\right) \end{array} \]
                                                    angle\_m = (fabs.f64 angle)
                                                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                    (FPCore (angle_s a b angle_m)
                                                     :precision binary64
                                                     (*
                                                      angle_s
                                                      (* (+ a b) (* (* 2.0 (- b a)) (* 1.0 (sin (* (PI) (/ angle_m 180.0))))))))
                                                    \begin{array}{l}
                                                    angle\_m = \left|angle\right|
                                                    \\
                                                    angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                    
                                                    \\
                                                    angle\_s \cdot \left(\left(a + b\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(1 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right)\right)\right)
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Initial program 55.9%

                                                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in angle around 0

                                                      \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                    4. Step-by-step derivation
                                                      1. lower-*.f6455.5

                                                        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                    5. Applied rewrites55.5%

                                                      \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                    6. Step-by-step derivation
                                                      1. lift-*.f64N/A

                                                        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)} \]
                                                      2. lift-*.f64N/A

                                                        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                      3. associate-*l*N/A

                                                        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right)} \]
                                                      4. lift-*.f64N/A

                                                        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      5. *-commutativeN/A

                                                        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      6. lift--.f64N/A

                                                        \[\leadsto \left(\color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      7. lift-pow.f64N/A

                                                        \[\leadsto \left(\left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      8. lift-pow.f64N/A

                                                        \[\leadsto \left(\left({b}^{2} - \color{blue}{{a}^{2}}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      9. pow2N/A

                                                        \[\leadsto \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      10. pow2N/A

                                                        \[\leadsto \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      11. difference-of-squares-revN/A

                                                        \[\leadsto \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      12. lift-+.f64N/A

                                                        \[\leadsto \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      13. lift--.f64N/A

                                                        \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                      14. associate-*l*N/A

                                                        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot 2\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                    7. Applied rewrites65.6%

                                                      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(\cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
                                                    8. Taylor expanded in angle around 0

                                                      \[\leadsto \left(a + b\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{1} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                                                    9. Step-by-step derivation
                                                      1. Applied rewrites66.4%

                                                        \[\leadsto \left(a + b\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{1} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                                                      2. Add Preprocessing

                                                      Alternative 17: 38.7% accurate, 3.5× speedup?

                                                      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{-149}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 \cdot \left(-0.011111111111111112 \cdot a\right)\right) \cdot a\\ \end{array} \end{array} \end{array} \]
                                                      angle\_m = (fabs.f64 angle)
                                                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                      (FPCore (angle_s a b angle_m)
                                                       :precision binary64
                                                       (let* ((t_0 (* (PI) angle_m)))
                                                         (*
                                                          angle_s
                                                          (if (<= (pow a 2.0) 2e-149)
                                                            (* (* -0.011111111111111112 (* a a)) t_0)
                                                            (* (* t_0 (* -0.011111111111111112 a)) a)))))
                                                      \begin{array}{l}
                                                      angle\_m = \left|angle\right|
                                                      \\
                                                      angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\
                                                      angle\_s \cdot \begin{array}{l}
                                                      \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{-149}:\\
                                                      \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot t\_0\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\left(t\_0 \cdot \left(-0.011111111111111112 \cdot a\right)\right) \cdot a\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if (pow.f64 a #s(literal 2 binary64)) < 1.99999999999999996e-149

                                                        1. Initial program 65.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. associate-*r*N/A

                                                            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                          2. associate-*r*N/A

                                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                          3. lower-*.f64N/A

                                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                          4. lower-*.f64N/A

                                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                          5. lower-*.f64N/A

                                                            \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                          6. lower-PI.f64N/A

                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                          7. unpow2N/A

                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                          8. unpow2N/A

                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                          9. difference-of-squaresN/A

                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                          10. lower-*.f64N/A

                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                          11. lower-+.f64N/A

                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                          12. lower--.f6461.3

                                                            \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                        5. Applied rewrites61.3%

                                                          \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                        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 rewrites36.1%

                                                            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]

                                                          if 1.99999999999999996e-149 < (pow.f64 a #s(literal 2 binary64))

                                                          1. Initial program 48.3%

                                                            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in angle around 0

                                                            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                          4. Step-by-step derivation
                                                            1. associate-*r*N/A

                                                              \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                            2. associate-*r*N/A

                                                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                            3. lower-*.f64N/A

                                                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                            4. lower-*.f64N/A

                                                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                            5. lower-*.f64N/A

                                                              \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                            6. lower-PI.f64N/A

                                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                            7. unpow2N/A

                                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                            8. unpow2N/A

                                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                            9. difference-of-squaresN/A

                                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                            10. lower-*.f64N/A

                                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                            11. lower-+.f64N/A

                                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                            12. lower--.f6455.9

                                                              \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                          5. Applied rewrites55.9%

                                                            \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                          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 rewrites41.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 rewrites49.2%

                                                                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right) \cdot a \]
                                                            3. Recombined 2 regimes into one program.
                                                            4. Add Preprocessing

                                                            Alternative 18: 38.7% accurate, 3.5× speedup?

                                                            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{-149}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot t\_0\right)\\ \end{array} \end{array} \end{array} \]
                                                            angle\_m = (fabs.f64 angle)
                                                            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                            (FPCore (angle_s a b angle_m)
                                                             :precision binary64
                                                             (let* ((t_0 (* (PI) angle_m)))
                                                               (*
                                                                angle_s
                                                                (if (<= (pow a 2.0) 2e-149)
                                                                  (* (* -0.011111111111111112 (* a a)) t_0)
                                                                  (* (* -0.011111111111111112 a) (* a t_0))))))
                                                            \begin{array}{l}
                                                            angle\_m = \left|angle\right|
                                                            \\
                                                            angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\
                                                            angle\_s \cdot \begin{array}{l}
                                                            \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{-149}:\\
                                                            \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot t\_0\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot t\_0\right)\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if (pow.f64 a #s(literal 2 binary64)) < 1.99999999999999996e-149

                                                              1. Initial program 65.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. associate-*r*N/A

                                                                  \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                2. associate-*r*N/A

                                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                3. lower-*.f64N/A

                                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                4. lower-*.f64N/A

                                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                5. lower-*.f64N/A

                                                                  \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                6. lower-PI.f64N/A

                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                7. unpow2N/A

                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                8. unpow2N/A

                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                9. difference-of-squaresN/A

                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                10. lower-*.f64N/A

                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                11. lower-+.f64N/A

                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                12. lower--.f6461.3

                                                                  \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                              5. Applied rewrites61.3%

                                                                \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                              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 rewrites36.1%

                                                                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]

                                                                if 1.99999999999999996e-149 < (pow.f64 a #s(literal 2 binary64))

                                                                1. Initial program 48.3%

                                                                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in angle around 0

                                                                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                4. Step-by-step derivation
                                                                  1. associate-*r*N/A

                                                                    \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                  2. associate-*r*N/A

                                                                    \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                  3. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                  4. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  5. lower-*.f64N/A

                                                                    \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  6. lower-PI.f64N/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                  7. unpow2N/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                  8. unpow2N/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                  9. difference-of-squaresN/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                  10. lower-*.f64N/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                  11. lower-+.f64N/A

                                                                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                  12. lower--.f6455.9

                                                                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                5. Applied rewrites55.9%

                                                                  \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                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 rewrites41.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 rewrites49.2%

                                                                      \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right) \]
                                                                  3. Recombined 2 regimes into one program.
                                                                  4. Add Preprocessing

                                                                  Alternative 19: 64.1% accurate, 8.2× speedup?

                                                                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 0.00385:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)}{a + b}\\ \end{array} \end{array} \]
                                                                  angle\_m = (fabs.f64 angle)
                                                                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                  (FPCore (angle_s a b angle_m)
                                                                   :precision binary64
                                                                   (*
                                                                    angle_s
                                                                    (if (<= angle_m 0.00385)
                                                                      (* (+ a b) (* (* (* (- b a) (PI)) angle_m) 0.011111111111111112))
                                                                      (/
                                                                       (*
                                                                        (* (* (* 0.011111111111111112 angle_m) (PI)) (+ a b))
                                                                        (* (- b a) (+ a b)))
                                                                       (+ a b)))))
                                                                  \begin{array}{l}
                                                                  angle\_m = \left|angle\right|
                                                                  \\
                                                                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                  
                                                                  \\
                                                                  angle\_s \cdot \begin{array}{l}
                                                                  \mathbf{if}\;angle\_m \leq 0.00385:\\
                                                                  \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;\frac{\left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)}{a + b}\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 2 regimes
                                                                  2. if angle < 0.0038500000000000001

                                                                    1. Initial program 65.3%

                                                                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                    2. Add Preprocessing
                                                                    3. Taylor expanded in angle around 0

                                                                      \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                                    4. Step-by-step derivation
                                                                      1. lower-*.f6464.9

                                                                        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                                    5. Applied rewrites64.9%

                                                                      \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                                    6. Step-by-step derivation
                                                                      1. lift-*.f64N/A

                                                                        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)} \]
                                                                      2. lift-*.f64N/A

                                                                        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                                      3. associate-*l*N/A

                                                                        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right)} \]
                                                                      4. lift-*.f64N/A

                                                                        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      5. *-commutativeN/A

                                                                        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      6. lift--.f64N/A

                                                                        \[\leadsto \left(\color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      7. lift-pow.f64N/A

                                                                        \[\leadsto \left(\left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      8. lift-pow.f64N/A

                                                                        \[\leadsto \left(\left({b}^{2} - \color{blue}{{a}^{2}}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      9. pow2N/A

                                                                        \[\leadsto \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      10. pow2N/A

                                                                        \[\leadsto \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      11. difference-of-squares-revN/A

                                                                        \[\leadsto \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      12. lift-+.f64N/A

                                                                        \[\leadsto \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      13. lift--.f64N/A

                                                                        \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      14. associate-*l*N/A

                                                                        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot 2\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                    7. Applied rewrites77.2%

                                                                      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(\cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
                                                                    8. Taylor expanded in angle around 0

                                                                      \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                                                                    9. Step-by-step derivation
                                                                      1. *-commutativeN/A

                                                                        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right)} \]
                                                                      2. lower-*.f64N/A

                                                                        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right)} \]
                                                                      3. *-commutativeN/A

                                                                        \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
                                                                      4. lower-*.f64N/A

                                                                        \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
                                                                      5. *-commutativeN/A

                                                                        \[\leadsto \left(a + b\right) \cdot \left(\left(\color{blue}{\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot angle\right) \cdot \frac{1}{90}\right) \]
                                                                      6. lower-*.f64N/A

                                                                        \[\leadsto \left(a + b\right) \cdot \left(\left(\color{blue}{\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot angle\right) \cdot \frac{1}{90}\right) \]
                                                                      7. lower--.f64N/A

                                                                        \[\leadsto \left(a + b\right) \cdot \left(\left(\left(\color{blue}{\left(b - a\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90}\right) \]
                                                                      8. lower-PI.f6473.3

                                                                        \[\leadsto \left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot angle\right) \cdot 0.011111111111111112\right) \]
                                                                    10. Applied rewrites73.3%

                                                                      \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)} \]

                                                                    if 0.0038500000000000001 < angle

                                                                    1. Initial program 27.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. associate-*r*N/A

                                                                        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                      2. associate-*r*N/A

                                                                        \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                      3. lower-*.f64N/A

                                                                        \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                      4. lower-*.f64N/A

                                                                        \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                      5. lower-*.f64N/A

                                                                        \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                      6. lower-PI.f64N/A

                                                                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                      7. unpow2N/A

                                                                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                      8. unpow2N/A

                                                                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                      9. difference-of-squaresN/A

                                                                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                      10. lower-*.f64N/A

                                                                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                      11. lower-+.f64N/A

                                                                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                      12. lower--.f6433.8

                                                                        \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                    5. Applied rewrites33.8%

                                                                      \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                    6. Step-by-step derivation
                                                                      1. Applied rewrites33.8%

                                                                        \[\leadsto \frac{\left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)}{\color{blue}{a + b}} \]
                                                                    7. Recombined 2 regimes into one program.
                                                                    8. Add Preprocessing

                                                                    Alternative 20: 64.0% accurate, 13.7× speedup?

                                                                    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 0.0015:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \]
                                                                    angle\_m = (fabs.f64 angle)
                                                                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                    (FPCore (angle_s a b angle_m)
                                                                     :precision binary64
                                                                     (*
                                                                      angle_s
                                                                      (if (<= angle_m 0.0015)
                                                                        (* (+ a b) (* (* (* (- b a) (PI)) angle_m) 0.011111111111111112))
                                                                        (* (* (* 0.011111111111111112 angle_m) (PI)) (* (+ b a) (- b a))))))
                                                                    \begin{array}{l}
                                                                    angle\_m = \left|angle\right|
                                                                    \\
                                                                    angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                    
                                                                    \\
                                                                    angle\_s \cdot \begin{array}{l}
                                                                    \mathbf{if}\;angle\_m \leq 0.0015:\\
                                                                    \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 2 regimes
                                                                    2. if angle < 0.0015

                                                                      1. Initial program 65.3%

                                                                        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in angle around 0

                                                                        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
                                                                      4. Step-by-step derivation
                                                                        1. lower-*.f6464.9

                                                                          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                                      5. Applied rewrites64.9%

                                                                        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right) \]
                                                                      6. Step-by-step derivation
                                                                        1. lift-*.f64N/A

                                                                          \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)} \]
                                                                        2. lift-*.f64N/A

                                                                          \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right) \]
                                                                        3. associate-*l*N/A

                                                                          \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right)} \]
                                                                        4. lift-*.f64N/A

                                                                          \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                        5. *-commutativeN/A

                                                                          \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                        6. lift--.f64N/A

                                                                          \[\leadsto \left(\color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                        7. lift-pow.f64N/A

                                                                          \[\leadsto \left(\left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                        8. lift-pow.f64N/A

                                                                          \[\leadsto \left(\left({b}^{2} - \color{blue}{{a}^{2}}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                        9. pow2N/A

                                                                          \[\leadsto \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                        10. pow2N/A

                                                                          \[\leadsto \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                        11. difference-of-squares-revN/A

                                                                          \[\leadsto \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                        12. lift-+.f64N/A

                                                                          \[\leadsto \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                        13. lift--.f64N/A

                                                                          \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                        14. associate-*l*N/A

                                                                          \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot 2\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \]
                                                                      7. Applied rewrites77.2%

                                                                        \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(\cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
                                                                      8. Taylor expanded in angle around 0

                                                                        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                                                                      9. Step-by-step derivation
                                                                        1. *-commutativeN/A

                                                                          \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right)} \]
                                                                        2. lower-*.f64N/A

                                                                          \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right)} \]
                                                                        3. *-commutativeN/A

                                                                          \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
                                                                        4. lower-*.f64N/A

                                                                          \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
                                                                        5. *-commutativeN/A

                                                                          \[\leadsto \left(a + b\right) \cdot \left(\left(\color{blue}{\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot angle\right) \cdot \frac{1}{90}\right) \]
                                                                        6. lower-*.f64N/A

                                                                          \[\leadsto \left(a + b\right) \cdot \left(\left(\color{blue}{\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot angle\right) \cdot \frac{1}{90}\right) \]
                                                                        7. lower--.f64N/A

                                                                          \[\leadsto \left(a + b\right) \cdot \left(\left(\left(\color{blue}{\left(b - a\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90}\right) \]
                                                                        8. lower-PI.f6473.3

                                                                          \[\leadsto \left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot angle\right) \cdot 0.011111111111111112\right) \]
                                                                      10. Applied rewrites73.3%

                                                                        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)} \]

                                                                      if 0.0015 < angle

                                                                      1. Initial program 27.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. associate-*r*N/A

                                                                          \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                        2. associate-*r*N/A

                                                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                        3. lower-*.f64N/A

                                                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                        4. lower-*.f64N/A

                                                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                        5. lower-*.f64N/A

                                                                          \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                        6. lower-PI.f64N/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                        7. unpow2N/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                        8. unpow2N/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                        9. difference-of-squaresN/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                        10. lower-*.f64N/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                        11. lower-+.f64N/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                        12. lower--.f6433.8

                                                                          \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                      5. Applied rewrites33.8%

                                                                        \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                    3. Recombined 2 regimes into one program.
                                                                    4. Add Preprocessing

                                                                    Alternative 21: 64.0% accurate, 13.7× speedup?

                                                                    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 0.0013:\\ \;\;\;\;\left(b - a\right) \cdot \left(t\_0 \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \end{array} \]
                                                                    angle\_m = (fabs.f64 angle)
                                                                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                    (FPCore (angle_s a b angle_m)
                                                                     :precision binary64
                                                                     (let* ((t_0 (* (* 0.011111111111111112 angle_m) (PI))))
                                                                       (*
                                                                        angle_s
                                                                        (if (<= angle_m 0.0013)
                                                                          (* (- b a) (* t_0 (+ a b)))
                                                                          (* t_0 (* (+ b a) (- b a)))))))
                                                                    \begin{array}{l}
                                                                    angle\_m = \left|angle\right|
                                                                    \\
                                                                    angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    t_0 := \left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\
                                                                    angle\_s \cdot \begin{array}{l}
                                                                    \mathbf{if}\;angle\_m \leq 0.0013:\\
                                                                    \;\;\;\;\left(b - a\right) \cdot \left(t\_0 \cdot \left(a + b\right)\right)\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;t\_0 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 2 regimes
                                                                    2. if angle < 0.0012999999999999999

                                                                      1. Initial program 65.3%

                                                                        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in angle around 0

                                                                        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                      4. Step-by-step derivation
                                                                        1. associate-*r*N/A

                                                                          \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                        2. associate-*r*N/A

                                                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                        3. lower-*.f64N/A

                                                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                        4. lower-*.f64N/A

                                                                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                        5. lower-*.f64N/A

                                                                          \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                        6. lower-PI.f64N/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                        7. unpow2N/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                        8. unpow2N/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                        9. difference-of-squaresN/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                        10. lower-*.f64N/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                        11. lower-+.f64N/A

                                                                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                        12. lower--.f6466.2

                                                                          \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                      5. Applied rewrites66.2%

                                                                        \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                      6. Step-by-step derivation
                                                                        1. Applied rewrites73.3%

                                                                          \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right)} \]

                                                                        if 0.0012999999999999999 < angle

                                                                        1. Initial program 27.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. associate-*r*N/A

                                                                            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                          2. associate-*r*N/A

                                                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                          3. lower-*.f64N/A

                                                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                          4. lower-*.f64N/A

                                                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                          5. lower-*.f64N/A

                                                                            \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                          6. lower-PI.f64N/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                          7. unpow2N/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                          8. unpow2N/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                          9. difference-of-squaresN/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                          10. lower-*.f64N/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                          11. lower-+.f64N/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                          12. lower--.f6433.8

                                                                            \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                        5. Applied rewrites33.8%

                                                                          \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                      7. Recombined 2 regimes into one program.
                                                                      8. Add Preprocessing

                                                                      Alternative 22: 37.8% accurate, 16.8× speedup?

                                                                      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.9 \cdot 10^{-141}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot t\_0\\ \end{array} \end{array} \end{array} \]
                                                                      angle\_m = (fabs.f64 angle)
                                                                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                      (FPCore (angle_s a b angle_m)
                                                                       :precision binary64
                                                                       (let* ((t_0 (* (PI) angle_m)))
                                                                         (*
                                                                          angle_s
                                                                          (if (<= angle_m 2.9e-141)
                                                                            (* (* -0.011111111111111112 a) (* a t_0))
                                                                            (* (* (* -0.011111111111111112 a) a) t_0)))))
                                                                      \begin{array}{l}
                                                                      angle\_m = \left|angle\right|
                                                                      \\
                                                                      angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                      
                                                                      \\
                                                                      \begin{array}{l}
                                                                      t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\
                                                                      angle\_s \cdot \begin{array}{l}
                                                                      \mathbf{if}\;angle\_m \leq 2.9 \cdot 10^{-141}:\\
                                                                      \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot t\_0\right)\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot t\_0\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 2 regimes
                                                                      2. if angle < 2.9e-141

                                                                        1. Initial program 60.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. associate-*r*N/A

                                                                            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                          2. associate-*r*N/A

                                                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                          3. lower-*.f64N/A

                                                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                          4. lower-*.f64N/A

                                                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                          5. lower-*.f64N/A

                                                                            \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                          6. lower-PI.f64N/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                          7. unpow2N/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                          8. unpow2N/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                          9. difference-of-squaresN/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                          10. lower-*.f64N/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                          11. lower-+.f64N/A

                                                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                          12. lower--.f6461.3

                                                                            \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                        5. Applied rewrites61.3%

                                                                          \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                        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 rewrites41.3%

                                                                            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
                                                                          2. Step-by-step derivation
                                                                            1. Applied rewrites45.7%

                                                                              \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right) \]

                                                                            if 2.9e-141 < angle

                                                                            1. Initial program 46.7%

                                                                              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                            2. Add Preprocessing
                                                                            3. Taylor expanded in angle around 0

                                                                              \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                            4. Step-by-step derivation
                                                                              1. associate-*r*N/A

                                                                                \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                              2. associate-*r*N/A

                                                                                \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                              3. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                              4. lower-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                              6. lower-PI.f64N/A

                                                                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                              7. unpow2N/A

                                                                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                              8. unpow2N/A

                                                                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                              9. difference-of-squaresN/A

                                                                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                              10. lower-*.f64N/A

                                                                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                              11. lower-+.f64N/A

                                                                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                              12. lower--.f6452.5

                                                                                \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                            5. Applied rewrites52.5%

                                                                              \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                            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 rewrites35.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 rewrites35.1%

                                                                                  \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
                                                                              3. Recombined 2 regimes into one program.
                                                                              4. Add Preprocessing

                                                                              Alternative 23: 37.2% accurate, 21.6× speedup?

                                                                              \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right)\right) \end{array} \]
                                                                              angle\_m = (fabs.f64 angle)
                                                                              angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                              (FPCore (angle_s a b angle_m)
                                                                               :precision binary64
                                                                               (* angle_s (* (* -0.011111111111111112 a) (* a (* (PI) angle_m)))))
                                                                              \begin{array}{l}
                                                                              angle\_m = \left|angle\right|
                                                                              \\
                                                                              angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                              
                                                                              \\
                                                                              angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right)\right)
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Initial program 55.9%

                                                                                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                              2. Add Preprocessing
                                                                              3. Taylor expanded in angle around 0

                                                                                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                              4. Step-by-step derivation
                                                                                1. associate-*r*N/A

                                                                                  \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                                2. associate-*r*N/A

                                                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                3. lower-*.f64N/A

                                                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                4. lower-*.f64N/A

                                                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                5. lower-*.f64N/A

                                                                                  \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                6. lower-PI.f64N/A

                                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                7. unpow2N/A

                                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                                8. unpow2N/A

                                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                                9. difference-of-squaresN/A

                                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                10. lower-*.f64N/A

                                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                11. lower-+.f64N/A

                                                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                12. lower--.f6458.2

                                                                                  \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                              5. Applied rewrites58.2%

                                                                                \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                              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 rewrites39.1%

                                                                                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
                                                                                2. Step-by-step derivation
                                                                                  1. Applied rewrites40.9%

                                                                                    \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right) \]
                                                                                  2. Add Preprocessing

                                                                                  Reproduce

                                                                                  ?
                                                                                  herbie shell --seed 2025006 
                                                                                  (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)))))