ab-angle->ABCF B

Percentage Accurate: 53.5% → 66.7%
Time: 9.1s
Alternatives: 16
Speedup: 3.4×

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 16 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 66.7% accurate, 1.5× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(b + a\right)\\ t_1 := \left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\\ t_2 := \sqrt{\mathsf{PI}\left(\right)}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+175}:\\ \;\;\;\;\cos \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(\left(\left(\sin t\_1 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right) \cdot \frac{2}{b + a}\right) \cdot \left(b + a\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+255}:\\ \;\;\;\;\left(t\_0 \cdot \left(0.5 \cdot \sin \left(\left(t\_2 \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right) \cdot t\_2\right)\right)\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 \cdot 2\right) \cdot \left(\cos t\_1 \cdot \sin \left(\left(\left(t\_2 \cdot t\_2\right) \cdot 0.005555555555555556\right) \cdot angle\_m\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 (* (- b a) (+ b a)))
        (t_1 (* (* (PI) 0.005555555555555556) angle_m))
        (t_2 (sqrt (PI))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 5e+175)
      (*
       (cos (* (/ angle_m 180.0) (PI)))
       (* (* (* (* (sin t_1) (- b a)) (+ b a)) (/ 2.0 (+ b a))) (+ b a)))
      (if (<= (/ angle_m 180.0) 1e+255)
        (*
         (* t_0 (* 0.5 (sin (* (* t_2 (* 0.011111111111111112 angle_m)) t_2))))
         2.0)
        (*
         (* t_0 2.0)
         (*
          (cos t_1)
          (sin (* (* (* t_2 t_2) 0.005555555555555556) angle_m)))))))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+255}:\\
\;\;\;\;\left(t\_0 \cdot \left(0.5 \cdot \sin \left(\left(t\_2 \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right) \cdot t\_2\right)\right)\right) \cdot 2\\

\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot 2\right) \cdot \left(\cos t\_1 \cdot \sin \left(\left(\left(t\_2 \cdot t\_2\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right)\\


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

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e175 < (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999988e254

    1. Initial program 42.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. Applied rewrites46.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999988e254 < (/.f64 angle #s(literal 180 binary64))

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

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot 0.005555555555555556\right) \cdot angle\right) \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \]
    7. Recombined 3 regimes into one program.
    8. Final simplification77.1%

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

    Alternative 2: 65.7% accurate, 0.6× speedup?

    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := {b}^{2} - {a}^{2}\\ t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\ t_2 := \sin \left(t\_1 \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+299}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot a\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+280}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(\left(a \cdot a\right) \cdot -0.011111111111111112, t\_1, \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b angle_m)
     :precision binary64
     (let* ((t_0 (- (pow b 2.0) (pow a 2.0)))
            (t_1 (* (PI) angle_m))
            (t_2 (* (sin (* t_1 0.011111111111111112)) (* (- b a) (+ b a)))))
       (*
        angle_s
        (if (<= t_0 -5e+299)
          (* (* (* -0.011111111111111112 a) angle_m) (* (PI) a))
          (if (<= t_0 2e+280)
            t_2
            (if (<= t_0 INFINITY)
              (fma
               (* (* a a) -0.011111111111111112)
               t_1
               (* (* (* (* (PI) b) angle_m) 0.011111111111111112) b))
              t_2))))))
    \begin{array}{l}
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    \begin{array}{l}
    t_0 := {b}^{2} - {a}^{2}\\
    t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\
    t_2 := \sin \left(t\_1 \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+299}:\\
    \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot a\right)\\
    
    \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+280}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_0 \leq \infty:\\
    \;\;\;\;\mathsf{fma}\left(\left(a \cdot a\right) \cdot -0.011111111111111112, t\_1, \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -5.0000000000000003e299

      1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. Applied rewrites55.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 rewrites80.5%

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

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

            if -5.0000000000000003e299 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2.0000000000000001e280 or +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

            1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \color{blue}{\mathsf{PI}\left(\right) \cdot angle}, \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot b\right) \]
            8. Recombined 3 regimes into one program.
            9. Final simplification72.3%

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

            Alternative 3: 66.2% accurate, 0.7× 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)}^{1.5}}\\ angle\_s \cdot \left(\cos \left(\frac{angle\_m}{180} \cdot \left(t\_0 \cdot t\_0\right)\right) \cdot \left(\left(\left(2 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\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
             (let* ((t_0 (cbrt (pow (PI) 1.5))))
               (*
                angle_s
                (*
                 (cos (* (/ angle_m 180.0) (* t_0 t_0)))
                 (*
                  (* (* 2.0 (sin (* (PI) (* angle_m 0.005555555555555556)))) (- 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 := \sqrt[3]{{\mathsf{PI}\left(\right)}^{1.5}}\\
            angle\_s \cdot \left(\cos \left(\frac{angle\_m}{180} \cdot \left(t\_0 \cdot t\_0\right)\right) \cdot \left(\left(\left(2 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\right)
            \end{array}
            \end{array}
            
            Derivation
            1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \cos \left(\frac{angle}{180} \cdot \left(\sqrt[3]{{\mathsf{PI}\left(\right)}^{1.5}} \cdot \sqrt[3]{{\mathsf{PI}\left(\right)}^{1.5}}\right)\right) \cdot \left(\left(\left(2 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right) \]
            8. Add Preprocessing

            Alternative 4: 66.9% 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 := \cos \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+174}:\\ \;\;\;\;t\_1 \cdot \left(\left(\left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right) \cdot \frac{2}{b + a}\right) \cdot \left(b + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\sin \left(\left({t\_0}^{2} \cdot t\_0\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot 2\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\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 (cbrt (PI))) (t_1 (cos (* (/ angle_m 180.0) (PI)))))
               (*
                angle_s
                (if (<= (/ angle_m 180.0) 5e+174)
                  (*
                   t_1
                   (*
                    (*
                     (*
                      (* (sin (* (* (PI) 0.005555555555555556) angle_m)) (- b a))
                      (+ b a))
                     (/ 2.0 (+ b a)))
                    (+ b a)))
                  (*
                   (*
                    (*
                     (*
                      (sin (* (* (pow t_0 2.0) t_0) (* angle_m 0.005555555555555556)))
                      2.0)
                     (- b a))
                    (+ b a))
                   t_1)))))
            \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 := \cos \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right)\\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+174}:\\
            \;\;\;\;t\_1 \cdot \left(\left(\left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right) \cdot \frac{2}{b + a}\right) \cdot \left(b + a\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(\left(\sin \left(\left({t\_0}^{2} \cdot t\_0\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot 2\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right) \cdot t\_1\\
            
            
            \end{array}
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 angle #s(literal 180 binary64)) < 4.9999999999999997e174

              1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 4.9999999999999997e174 < (/.f64 angle #s(literal 180 binary64))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 5: 57.6% 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 := {b}^{2} - {a}^{2}\\ t_1 := \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-244}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\left(\left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;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 (- (pow b 2.0) (pow a 2.0)))
                    (t_1 (* (* (* (PI) angle_m) a) (* -0.011111111111111112 a))))
               (*
                angle_s
                (if (<= t_0 -2e-244)
                  t_1
                  (if (<= t_0 INFINITY)
                    (* (* (* (* b b) (PI)) angle_m) 0.011111111111111112)
                    t_1)))))
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            \begin{array}{l}
            t_0 := {b}^{2} - {a}^{2}\\
            t_1 := \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-244}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t\_0 \leq \infty:\\
            \;\;\;\;\left(\left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1.9999999999999999e-244 or +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

              1. Initial program 48.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
              7. Step-by-step derivation
                1. Applied rewrites54.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 rewrites66.5%

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

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

                  1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 6: 57.6% 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 := \mathsf{PI}\left(\right) \cdot angle\_m\\ t_1 := {b}^{2} - {a}^{2}\\ t_2 := \left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-244}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\left(t\_0 \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \end{array} \]
                  angle\_m = (fabs.f64 angle)
                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                  (FPCore (angle_s a b angle_m)
                   :precision binary64
                   (let* ((t_0 (* (PI) angle_m))
                          (t_1 (- (pow b 2.0) (pow a 2.0)))
                          (t_2 (* (* t_0 a) (* -0.011111111111111112 a))))
                     (*
                      angle_s
                      (if (<= t_1 -2e-244)
                        t_2
                        (if (<= t_1 INFINITY) (* (* t_0 0.011111111111111112) (* b b)) t_2)))))
                  \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 := {b}^{2} - {a}^{2}\\
                  t_2 := \left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
                  angle\_s \cdot \begin{array}{l}
                  \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-244}:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{elif}\;t\_1 \leq \infty:\\
                  \;\;\;\;\left(t\_0 \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_2\\
                  
                  
                  \end{array}
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1.9999999999999999e-244 or +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                    1. Initial program 48.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                    7. Step-by-step derivation
                      1. Applied rewrites54.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 rewrites66.5%

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

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

                        1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 7: 66.8% 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 := \sqrt{\mathsf{PI}\left(\right)}\\ t_1 := \left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\\ t_2 := \sin t\_1\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+196}:\\ \;\;\;\;\left(\cos t\_1 \cdot 2\right) \cdot \left(\left(t\_2 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\cos \left(\left(\left(t\_0 \cdot t\_0\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right) \cdot t\_2\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot 2\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 (* (* (PI) 0.005555555555555556) angle_m))
                                (t_2 (sin t_1)))
                           (*
                            angle_s
                            (if (<= (/ angle_m 180.0) 1e+196)
                              (* (* (cos t_1) 2.0) (* (* t_2 (- b a)) (+ b a)))
                              (*
                               (* (cos (* (* (* t_0 t_0) 0.005555555555555556) angle_m)) t_2)
                               (* (* (- b a) (+ b a)) 2.0))))))
                        \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 := \left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\\
                        t_2 := \sin t\_1\\
                        angle\_s \cdot \begin{array}{l}
                        \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+196}:\\
                        \;\;\;\;\left(\cos t\_1 \cdot 2\right) \cdot \left(\left(t\_2 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(\cos \left(\left(\left(t\_0 \cdot t\_0\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right) \cdot t\_2\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot 2\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999995e195

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

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

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

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

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

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

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

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

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

                            if 9.9999999999999995e195 < (/.f64 angle #s(literal 180 binary64))

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

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

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

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

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

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

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

                                \[\leadsto \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right) \cdot \cos \left(\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot 0.005555555555555556\right) \cdot angle\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \]
                            7. Recombined 2 regimes into one program.
                            8. Final simplification75.8%

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

                            Alternative 8: 64.9% 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 := \left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+196}:\\ \;\;\;\;\left(\cos t\_0 \cdot 2\right) \cdot \left(\left(\sin t\_0 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(b \cdot b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \frac{2}{b + a}\right) \cdot \left(b + a\right)\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\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) 0.005555555555555556) angle_m)))
                               (*
                                angle_s
                                (if (<= (/ angle_m 180.0) 1e+196)
                                  (* (* (cos t_0) 2.0) (* (* (sin t_0) (- b a)) (+ b a)))
                                  (*
                                   (*
                                    (*
                                     (* (* b b) (sin (* (* (PI) angle_m) 0.005555555555555556)))
                                     (/ 2.0 (+ b a)))
                                    (+ b a))
                                   (cos (* (/ angle_m 180.0) (PI))))))))
                            \begin{array}{l}
                            angle\_m = \left|angle\right|
                            \\
                            angle\_s = \mathsf{copysign}\left(1, angle\right)
                            
                            \\
                            \begin{array}{l}
                            t_0 := \left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\\
                            angle\_s \cdot \begin{array}{l}
                            \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+196}:\\
                            \;\;\;\;\left(\cos t\_0 \cdot 2\right) \cdot \left(\left(\sin t\_0 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(\left(\left(\left(b \cdot b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \frac{2}{b + a}\right) \cdot \left(b + a\right)\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999995e195

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

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

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

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

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

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

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

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

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

                                if 9.9999999999999995e195 < (/.f64 angle #s(literal 180 binary64))

                                1. Initial program 36.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(\left(a + b\right) \cdot \left(\color{blue}{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(b \cdot b\right)\right)} \cdot \frac{2}{b + a}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              7. Recombined 2 regimes into one program.
                              8. Final simplification75.0%

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

                              Alternative 9: 65.8% accurate, 1.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}\;b \leq 6.4 \cdot 10^{+226}:\\ \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle\_m \cdot angle\_m\right) \cdot -5.7155921353452215 \cdot 10^{-8}, {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot angle\_m\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\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 (<= b 6.4e+226)
                                  (* (* (sin (* (* (PI) angle_m) 0.011111111111111112)) (- b a)) (+ b a))
                                  (*
                                   (*
                                    (*
                                     (fma
                                      (* (* angle_m angle_m) -5.7155921353452215e-8)
                                      (pow (PI) 3.0)
                                      (* 0.011111111111111112 (PI)))
                                     (* (- b a) (+ b a)))
                                    angle_m)
                                   (cos (* (/ angle_m 180.0) (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}\;b \leq 6.4 \cdot 10^{+226}:\\
                              \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(\left(\mathsf{fma}\left(\left(angle\_m \cdot angle\_m\right) \cdot -5.7155921353452215 \cdot 10^{-8}, {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot angle\_m\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if b < 6.39999999999999954e226

                                1. Initial program 59.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 6.39999999999999954e226 < b

                                1. Initial program 50.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}{\left(angle \cdot \left(\frac{-1}{17496000} \cdot \left({angle}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) + \frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                4. Step-by-step derivation
                                  1. *-commutativeN/A

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \mathsf{fma}\left(-5.7155921353452215 \cdot 10^{-8} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot angle\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              3. Recombined 2 regimes into one program.
                              4. Final simplification73.8%

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

                              Alternative 10: 65.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 0.005555555555555556\\ t_1 := t\_0 \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 1.5 \cdot 10^{+237}:\\ \;\;\;\;\left(\cos t\_1 \cdot 2\right) \cdot \left(\left(\sin t\_1 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(-1.1431184270690443 \cdot 10^{-7} \cdot {\mathsf{PI}\left(\right)}^{3}, angle\_m \cdot angle\_m, t\_0\right) \cdot angle\_m\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot 2\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) 0.005555555555555556)) (t_1 (* t_0 angle_m)))
                                 (*
                                  angle_s
                                  (if (<= (/ angle_m 180.0) 1.5e+237)
                                    (* (* (cos t_1) 2.0) (* (* (sin t_1) (- b a)) (+ b a)))
                                    (*
                                     (*
                                      (fma (* -1.1431184270690443e-7 (pow (PI) 3.0)) (* angle_m angle_m) t_0)
                                      angle_m)
                                     (* (* (- b a) (+ b a)) 2.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 0.005555555555555556\\
                              t_1 := t\_0 \cdot angle\_m\\
                              angle\_s \cdot \begin{array}{l}
                              \mathbf{if}\;\frac{angle\_m}{180} \leq 1.5 \cdot 10^{+237}:\\
                              \;\;\;\;\left(\cos t\_1 \cdot 2\right) \cdot \left(\left(\sin t\_1 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(\mathsf{fma}\left(-1.1431184270690443 \cdot 10^{-7} \cdot {\mathsf{PI}\left(\right)}^{3}, angle\_m \cdot angle\_m, t\_0\right) \cdot angle\_m\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot 2\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (/.f64 angle #s(literal 180 binary64)) < 1.5e237

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

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

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

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

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

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

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

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

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

                                  if 1.5e237 < (/.f64 angle #s(literal 180 binary64))

                                  1. Initial program 37.6%

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(\mathsf{fma}\left({\mathsf{PI}\left(\right)}^{3} \cdot -1.1431184270690443 \cdot 10^{-7}, angle \cdot angle, 0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot 2\right) \]
                                  8. Recombined 2 regimes into one program.
                                  9. Final simplification74.9%

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

                                  Alternative 11: 65.4% accurate, 2.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}\;\frac{angle\_m}{180} \leq 1.5 \cdot 10^{+237}:\\ \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(-1.1431184270690443 \cdot 10^{-7} \cdot {\mathsf{PI}\left(\right)}^{3}, angle\_m \cdot angle\_m, \mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot 2\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 180.0) 1.5e+237)
                                      (* (* (sin (* (* (PI) angle_m) 0.011111111111111112)) (- b a)) (+ b a))
                                      (*
                                       (*
                                        (fma
                                         (* -1.1431184270690443e-7 (pow (PI) 3.0))
                                         (* angle_m angle_m)
                                         (* (PI) 0.005555555555555556))
                                        angle_m)
                                       (* (* (- b a) (+ b a)) 2.0)))))
                                  \begin{array}{l}
                                  angle\_m = \left|angle\right|
                                  \\
                                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                                  
                                  \\
                                  angle\_s \cdot \begin{array}{l}
                                  \mathbf{if}\;\frac{angle\_m}{180} \leq 1.5 \cdot 10^{+237}:\\
                                  \;\;\;\;\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(\mathsf{fma}\left(-1.1431184270690443 \cdot 10^{-7} \cdot {\mathsf{PI}\left(\right)}^{3}, angle\_m \cdot angle\_m, \mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot 2\right)\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if (/.f64 angle #s(literal 180 binary64)) < 1.5e237

                                    1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.5e237 < (/.f64 angle #s(literal 180 binary64))

                                    1. Initial program 37.6%

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

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

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

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

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

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

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

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

                                        \[\leadsto \left(\mathsf{fma}\left({\mathsf{PI}\left(\right)}^{3} \cdot -1.1431184270690443 \cdot 10^{-7}, angle \cdot angle, 0.005555555555555556 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot 2\right) \]
                                    8. Recombined 2 regimes into one program.
                                    9. Final simplification73.9%

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

                                    Alternative 12: 60.6% accurate, 3.0× speedup?

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

                                      1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if 2.0000000000000001e276 < (pow.f64 a #s(literal 2 binary64))

                                        1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 13: 66.0% accurate, 3.1× 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}\;\frac{angle\_m}{180} \leq 10^{+248}:\\ \;\;\;\;\left(\sin \left(t\_0 \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(a \cdot a\right) \cdot -0.011111111111111112\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 180.0) 1e+248)
                                                  (* (* (sin (* t_0 0.011111111111111112)) (- b a)) (+ b a))
                                                  (* (* (* a a) -0.011111111111111112) 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}\;\frac{angle\_m}{180} \leq 10^{+248}:\\
                                            \;\;\;\;\left(\sin \left(t\_0 \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot t\_0\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000005e248

                                              1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 1.00000000000000005e248 < (/.f64 angle #s(literal 180 binary64))

                                              1. Initial program 35.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              Alternative 14: 57.7% accurate, 3.4× speedup?

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

                                                1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if 4.99999999999999978e282 < (pow.f64 a #s(literal 2 binary64))

                                                  1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites55.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 rewrites74.2%

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

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

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

                                                      Alternative 15: 57.7% accurate, 3.4× speedup?

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

                                                        1. Initial program 65.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if 9.99999999999999955e282 < (pow.f64 a #s(literal 2 binary64))

                                                        1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites55.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 rewrites73.9%

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

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

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

                                                            Alternative 16: 38.5% 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(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right) \end{array} \]
                                                            angle\_m = (fabs.f64 angle)
                                                            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                            (FPCore (angle_s a b angle_m)
                                                             :precision binary64
                                                             (* angle_s (* (* (* (PI) angle_m) a) (* -0.011111111111111112 a))))
                                                            \begin{array}{l}
                                                            angle\_m = \left|angle\right|
                                                            \\
                                                            angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                            
                                                            \\
                                                            angle\_s \cdot \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right)
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites36.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 rewrites41.7%

                                                                  \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right) \]
                                                                2. Final simplification41.7%

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

                                                                Reproduce

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