ab-angle->ABCF B

Percentage Accurate: 53.8% → 66.9%
Time: 13.0s
Alternatives: 23
Speedup: 10.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 53.8% accurate, 1.0× speedup?

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

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

Alternative 1: 66.9% accurate, 0.8× 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 2 \cdot 10^{+264}:\\ \;\;\;\;\frac{\sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a - b\right)}{\frac{-1}{a + b}}\\ \mathbf{else}:\\ \;\;\;\;\left(\cos \left(\frac{{\left({\left(\sqrt[3]{\mathsf{PI}\left(\right)}\right)}^{2}\right)}^{1.5} \cdot angle\_m}{-180}\right) \cdot 2\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (/ angle_m 180.0) 2e+264)
    (/
     (* (sin (* (* 0.011111111111111112 (PI)) angle_m)) (- a b))
     (/ -1.0 (+ a b)))
    (*
     (* (cos (/ (* (pow (pow (cbrt (PI)) 2.0) 1.5) angle_m) -180.0)) 2.0)
     (*
      (* (+ a b) (- b a))
      (sin (* (* 0.005555555555555556 angle_m) (PI))))))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+264}:\\
\;\;\;\;\frac{\sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a - b\right)}{\frac{-1}{a + b}}\\

\mathbf{else}:\\
\;\;\;\;\left(\cos \left(\frac{{\left({\left(\sqrt[3]{\mathsf{PI}\left(\right)}\right)}^{2}\right)}^{1.5} \cdot angle\_m}{-180}\right) \cdot 2\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\


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

    1. Initial program 57.8%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. 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 rewrites74.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)} \]
    5. Applied rewrites75.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000009e264 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 27.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.1% 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 := {b}^{2} - {a}^{2}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+275}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right), \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+289}:\\ \;\;\;\;\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(a + b\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 (- (pow b 2.0) (pow a 2.0))))
   (*
    angle_s
    (if (<= t_0 -4e+275)
      (*
       (*
        (*
         (fma
          (* (* (PI) (PI)) (* -2.2862368541380886e-7 (* angle_m angle_m)))
          (PI)
          (* 0.011111111111111112 (PI)))
         angle_m)
        (- b a))
       (+ a b))
      (if (<= t_0 4e+289)
        (* (sin (* (* (PI) angle_m) 0.011111111111111112)) (* (+ a b) (- b a)))
        (* (* (* (* (PI) (- b a)) angle_m) 0.011111111111111112) (+ a b)))))))
\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}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -4 \cdot 10^{+275}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right), \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\

\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\\

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


\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))) < -3.99999999999999984e275

    1. Initial program 54.3%

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

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

        \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. 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 rewrites77.1%

      \[\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)} \]
    5. Taylor expanded in angle around 0

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
      8. lower-pow.f64N/A

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

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

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

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

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

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, \mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot angle\right)}\right) \]
    8. Step-by-step derivation
      1. Applied rewrites81.1%

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

      if -3.99999999999999984e275 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.0000000000000002e289

      1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
        14. *-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 rewrites68.6%

        \[\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 4.0000000000000002e289 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

      1. Initial program 37.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -4 \cdot 10^{+275}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right)\right), \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 4 \cdot 10^{+289}:\\ \;\;\;\;\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(a + b\right)\\ \end{array} \]
    11. Add Preprocessing

    Alternative 3: 65.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 := {b}^{2} - {a}^{2}\\ t_1 := 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+275}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right), \mathsf{PI}\left(\right), t\_1\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-311}:\\ \;\;\;\;\left(\left(-a\right) \cdot a\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t\_1 \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\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 (- (pow b 2.0) (pow a 2.0))) (t_1 (* 0.011111111111111112 (PI))))
       (*
        angle_s
        (if (<= t_0 -4e+275)
          (*
           (*
            (*
             (fma
              (* (* (PI) (PI)) (* -2.2862368541380886e-7 (* angle_m angle_m)))
              (PI)
              t_1)
             angle_m)
            (- b a))
           (+ a b))
          (if (<= t_0 4e-311)
            (* (* (- a) a) (sin (* (* (PI) angle_m) 0.011111111111111112)))
            (* (* (* t_1 angle_m) (- b a)) (+ a b)))))))
    \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 := 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+275}:\\
    \;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right), \mathsf{PI}\left(\right), t\_1\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
    
    \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-311}:\\
    \;\;\;\;\left(\left(-a\right) \cdot a\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(t\_1 \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
    
    
    \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))) < -3.99999999999999984e275

      1. Initial program 54.3%

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

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

          \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        3. 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 rewrites77.1%

        \[\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)} \]
      5. Taylor expanded in angle around 0

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

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

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

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

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

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

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
        8. lower-pow.f64N/A

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, \mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot angle\right)}\right) \]
      8. Step-by-step derivation
        1. Applied rewrites81.1%

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

        if -3.99999999999999984e275 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 3.99999999999979e-311

        1. Initial program 67.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 rewrites12.0%

          \[\leadsto \color{blue}{\left({b}^{6} - {a}^{6}\right) \cdot \left({\left(\mathsf{fma}\left(\mathsf{fma}\left(a, a, b \cdot b\right), a \cdot a, {b}^{4}\right)\right)}^{-1} \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)\right)} \]
        4. Taylor expanded in b around 0

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

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

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

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

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

            \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(a\right)\right) \cdot a\right)} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
          6. mul-1-negN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(-a\right) \cdot a\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot angle\right) \cdot 0.011111111111111112\right) \]
        6. Applied rewrites68.0%

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

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

        1. Initial program 52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
          15. lower--.f6461.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 rewrites61.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. Step-by-step derivation
          1. Applied rewrites72.4%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -4 \cdot 10^{+275}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right)\right), \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 4 \cdot 10^{-311}:\\ \;\;\;\;\left(\left(-a\right) \cdot a\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 4: 65.5% 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 := {b}^{2} - {a}^{2}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-189}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right), \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+289}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(a + b\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 (- (pow b 2.0) (pow a 2.0))))
           (*
            angle_s
            (if (<= t_0 -5e-189)
              (*
               (*
                (*
                 (fma
                  (* (* (PI) (PI)) (* -2.2862368541380886e-7 (* angle_m angle_m)))
                  (PI)
                  (* 0.011111111111111112 (PI)))
                 angle_m)
                (- b a))
               (+ a b))
              (if (<= t_0 4e+289)
                (* (* b b) (sin (* (* (PI) angle_m) 0.011111111111111112)))
                (* (* (* (* (PI) (- b a)) angle_m) 0.011111111111111112) (+ a b)))))))
        \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}\\
        angle\_s \cdot \begin{array}{l}
        \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-189}:\\
        \;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right), \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
        
        \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+289}:\\
        \;\;\;\;\left(b \cdot b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(a + b\right)\\
        
        
        \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))) < -4.9999999999999997e-189

          1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\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)} \]
          5. Taylor expanded in angle around 0

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

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

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

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

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

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

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

              \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
            8. lower-pow.f64N/A

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

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

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

              \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{1}{90}}\right) \cdot angle\right)\right) \]
            12. lower-PI.f6467.0

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

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, \mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot angle\right)}\right) \]
          8. Step-by-step derivation
            1. Applied rewrites67.0%

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

            if -4.9999999999999997e-189 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.0000000000000002e289

            1. Initial program 73.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. Applied rewrites14.6%

              \[\leadsto \color{blue}{\left({b}^{6} - {a}^{6}\right) \cdot \left({\left(\mathsf{fma}\left(\mathsf{fma}\left(a, a, b \cdot b\right), a \cdot a, {b}^{4}\right)\right)}^{-1} \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)\right)} \]
            4. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

                \[\leadsto \left(b \cdot b\right) \cdot \sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
              9. lower-PI.f6473.2

                \[\leadsto \left(b \cdot b\right) \cdot \sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot angle\right) \cdot 0.011111111111111112\right) \]
            6. Applied rewrites73.2%

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

            if 4.0000000000000002e289 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

            1. Initial program 37.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 58.1% 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}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-189}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot t\_0\right) \cdot a\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(b \cdot b, t\_0 \cdot 0.011111111111111112, 0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\ \end{array} \end{array} \end{array} \]
          angle\_m = (fabs.f64 angle)
          angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
          (FPCore (angle_s a b angle_m)
           :precision binary64
           (let* ((t_0 (* (PI) angle_m)) (t_1 (- (pow b 2.0) (pow a 2.0))))
             (*
              angle_s
              (if (<= t_1 -5e-189)
                (* (* (* -0.011111111111111112 a) t_0) a)
                (if (<= t_1 INFINITY)
                  (fma (* b b) (* t_0 0.011111111111111112) 0.0)
                  (* (* t_0 a) (* -0.011111111111111112 a)))))))
          \begin{array}{l}
          angle\_m = \left|angle\right|
          \\
          angle\_s = \mathsf{copysign}\left(1, angle\right)
          
          \\
          \begin{array}{l}
          t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\
          t_1 := {b}^{2} - {a}^{2}\\
          angle\_s \cdot \begin{array}{l}
          \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-189}:\\
          \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot t\_0\right) \cdot a\\
          
          \mathbf{elif}\;t\_1 \leq \infty:\\
          \;\;\;\;\mathsf{fma}\left(b \cdot b, t\_0 \cdot 0.011111111111111112, 0\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
          
          
          \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))) < -4.9999999999999997e-189

            1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
              15. lower--.f6450.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 rewrites50.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 \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
            7. Step-by-step derivation
              1. Applied rewrites50.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 rewrites61.4%

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

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

                1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                  15. lower--.f6465.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 rewrites65.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 b around 0

                  \[\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 rewrites24.6%

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

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

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

                  1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 6: 58.1% 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}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-189}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot t\_0\right) \cdot a\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\left(\left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\ \end{array} \end{array} \end{array} \]
                    angle\_m = (fabs.f64 angle)
                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                    (FPCore (angle_s a b angle_m)
                     :precision binary64
                     (let* ((t_0 (* (PI) angle_m)) (t_1 (- (pow b 2.0) (pow a 2.0))))
                       (*
                        angle_s
                        (if (<= t_1 -5e-189)
                          (* (* (* -0.011111111111111112 a) t_0) a)
                          (if (<= t_1 INFINITY)
                            (* (* (* (* b b) (PI)) angle_m) 0.011111111111111112)
                            (* (* t_0 a) (* -0.011111111111111112 a)))))))
                    \begin{array}{l}
                    angle\_m = \left|angle\right|
                    \\
                    angle\_s = \mathsf{copysign}\left(1, angle\right)
                    
                    \\
                    \begin{array}{l}
                    t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\
                    t_1 := {b}^{2} - {a}^{2}\\
                    angle\_s \cdot \begin{array}{l}
                    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-189}:\\
                    \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot t\_0\right) \cdot a\\
                    
                    \mathbf{elif}\;t\_1 \leq \infty:\\
                    \;\;\;\;\left(\left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
                    
                    
                    \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))) < -4.9999999999999997e-189

                      1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                        15. lower--.f6450.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 rewrites50.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 \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites50.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 rewrites61.4%

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

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

                          1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                            15. lower--.f6465.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 rewrites65.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 b around inf

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

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

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

                            1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -5 \cdot 10^{-189}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot a\\ \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} \]
                              5. Add Preprocessing

                              Alternative 7: 65.9% accurate, 1.3× speedup?

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

                                1. Initial program 62.2%

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                                  8. 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 rewrites71.7%

                                  \[\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)} \]
                                5. Taylor expanded in b around 0

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

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

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

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

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

                                1. Initial program 52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                  15. lower--.f6461.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 rewrites61.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. Step-by-step derivation
                                  1. Applied rewrites72.4%

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

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

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

                                  1. Initial program 58.1%

                                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  2. Add Preprocessing
                                  3. 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 rewrites74.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)} \]
                                  5. Applied rewrites75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 1.9999999999999999e253 < (/.f64 angle #s(literal 180 binary64))

                                  1. Initial program 23.4%

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

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

                                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                    3. 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 rewrites5.9%

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

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

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

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

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

                                  Alternative 9: 59.0% accurate, 1.9× speedup?

                                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -2 \cdot 10^{+239}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot angle\_m\\ \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 b 2.0) (pow a 2.0)) -2e+239)
                                      (* (* (* -0.011111111111111112 a) (* (PI) angle_m)) a)
                                      (* (* (* 0.011111111111111112 (PI)) (* (+ a b) (- b a))) angle_m))))
                                  \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}^{2} - {a}^{2} \leq -2 \cdot 10^{+239}:\\
                                  \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot angle\_m\\
                                  
                                  
                                  \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.99999999999999998e239

                                    1. Initial program 55.6%

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

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

                                        \[\leadsto \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--.f6449.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 rewrites49.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 b around 0

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

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

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

                                        if -1.99999999999999998e239 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                                        1. Initial program 57.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                          15. lower--.f6462.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 rewrites62.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. Step-by-step derivation
                                          1. Applied rewrites62.0%

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

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

                                        Alternative 10: 59.0% accurate, 1.9× speedup?

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

                                          1. Initial program 55.0%

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

                                            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                          4. Step-by-step derivation
                                            1. *-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--.f6449.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 rewrites49.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 b around 0

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

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

                                              if -1.00000000000000002e234 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                                              1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                15. lower--.f6462.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 rewrites62.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)} \]
                                            3. Recombined 2 regimes into one program.
                                            4. Final simplification63.5%

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

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

                                              1. Initial program 58.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.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 rewrites62.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. Step-by-step derivation
                                                1. Applied rewrites72.9%

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

                                                if 4.9999999999999996e-41 < (/.f64 angle #s(literal 180 binary64))

                                                1. Initial program 51.5%

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

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

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

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

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

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

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

                                                    \[\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 \frac{1}{90}\right)\right)} \]
                                                  2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\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 \frac{1}{90}\right) \]
                                                  18. lift-*.f6455.0

                                                    \[\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) \]
                                                  19. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

                                              Alternative 12: 66.9% accurate, 3.1× speedup?

                                              \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \frac{\sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a - b\right)}{\frac{-1}{a + b}} \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
                                                (/
                                                 (* (sin (* (* 0.011111111111111112 (PI)) angle_m)) (- a b))
                                                 (/ -1.0 (+ a b)))))
                                              \begin{array}{l}
                                              angle\_m = \left|angle\right|
                                              \\
                                              angle\_s = \mathsf{copysign}\left(1, angle\right)
                                              
                                              \\
                                              angle\_s \cdot \frac{\sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a - b\right)}{\frac{-1}{a + b}}
                                              \end{array}
                                              
                                              Derivation
                                              1. Initial program 57.2%

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

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

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

                                                \[\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)} \]
                                              5. Applied rewrites74.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              Alternative 13: 39.6% accurate, 3.5× 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^{+210}:\\ \;\;\;\;\left(\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\ \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+210)
                                                  (* (* (* (* a a) -0.011111111111111112) (PI)) angle_m)
                                                  (* (* (* -0.011111111111111112 a) (* (PI) angle_m)) 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^{+210}:\\
                                              \;\;\;\;\left(\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if (pow.f64 a #s(literal 2 binary64)) < 9.99999999999999927e209

                                                1. Initial program 64.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--.f6462.1

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

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

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

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

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

                                                    if 9.99999999999999927e209 < (pow.f64 a #s(literal 2 binary64))

                                                    1. Initial program 43.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                      15. lower--.f6453.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 rewrites53.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 \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites45.8%

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

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

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

                                                      Alternative 14: 39.6% accurate, 3.5× 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^{-74}:\\ \;\;\;\;\left(\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\ \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-74)
                                                          (* (* (* (* a a) -0.011111111111111112) angle_m) (PI))
                                                          (* (* (* -0.011111111111111112 a) (* (PI) angle_m)) 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^{-74}:\\
                                                      \;\;\;\;\left(\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if (pow.f64 a #s(literal 2 binary64)) < 1.99999999999999992e-74

                                                        1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                          15. lower--.f6468.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 rewrites68.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 b around 0

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

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

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

                                                            if 1.99999999999999992e-74 < (pow.f64 a #s(literal 2 binary64))

                                                            1. Initial program 46.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 15: 39.6% accurate, 3.5× 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^{-88}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot angle\_m\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-88)
                                                                  (* (* (* -0.011111111111111112 a) a) (* (PI) angle_m))
                                                                  (* (* (* -0.011111111111111112 a) (PI)) (* a angle_m)))))
                                                              \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^{-88}:\\
                                                              \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot angle\_m\right)\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if (pow.f64 a #s(literal 2 binary64)) < 1.99999999999999987e-88

                                                                1. Initial program 71.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--.f6469.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 rewrites69.6%

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

                                                                  \[\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 rewrites31.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 rewrites31.1%

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

                                                                    if 1.99999999999999987e-88 < (pow.f64 a #s(literal 2 binary64))

                                                                    1. Initial program 46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        Alternative 16: 39.6% accurate, 3.5× 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 6 \cdot 10^{+300}:\\ \;\;\;\;\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot angle\_m\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) 6e+300)
                                                                            (* (* (* a a) -0.011111111111111112) (* (PI) angle_m))
                                                                            (* (* (* -0.011111111111111112 a) (PI)) (* a angle_m)))))
                                                                        \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 6 \cdot 10^{+300}:\\
                                                                        \;\;\;\;\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot angle\_m\right)\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 2 regimes
                                                                        2. if (pow.f64 a #s(literal 2 binary64)) < 6.00000000000000032e300

                                                                          1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                            15. lower--.f6461.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 rewrites61.6%

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

                                                                            \[\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 rewrites33.1%

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

                                                                            if 6.00000000000000032e300 < (pow.f64 a #s(literal 2 binary64))

                                                                            1. Initial program 37.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                              15. lower--.f6452.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 rewrites52.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 b around 0

                                                                              \[\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 rewrites46.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 rewrites66.1%

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

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

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

                                                                                Alternative 17: 67.0% accurate, 3.6× speedup?

                                                                                \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\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
                                                                                  (* (* (sin (* (* (PI) angle_m) 0.011111111111111112)) (- b a)) (+ a b))))
                                                                                \begin{array}{l}
                                                                                angle\_m = \left|angle\right|
                                                                                \\
                                                                                angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                
                                                                                \\
                                                                                angle\_s \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Initial program 57.2%

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

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

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

                                                                                  \[\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)} \]
                                                                                5. Final simplification72.7%

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

                                                                                Alternative 18: 64.4% accurate, 6.5× speedup?

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

                                                                                  1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                                                                                    8. lower-pow.f64N/A

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

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

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

                                                                                      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{1}{90}}\right) \cdot angle\right)\right) \]
                                                                                    12. lower-PI.f6474.2

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

                                                                                    \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), {\mathsf{PI}\left(\right)}^{3}, \mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot angle\right)}\right) \]
                                                                                  8. Step-by-step derivation
                                                                                    1. Applied rewrites74.2%

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

                                                                                    if 1.9999999999999999e33 < (/.f64 angle #s(literal 180 binary64))

                                                                                    1. Initial program 39.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                      15. lower--.f6436.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 rewrites36.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)} \]
                                                                                  9. Recombined 2 regimes into one program.
                                                                                  10. Final simplification69.4%

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

                                                                                  Alternative 19: 62.0% accurate, 10.3× speedup?

                                                                                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+125}:\\ \;\;\;\;\left(\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b \cdot b, \left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112, 0\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) 1e+125)
                                                                                      (* (* (* (* 0.011111111111111112 (PI)) angle_m) (- b a)) (+ a b))
                                                                                      (fma (* b b) (* (* (PI) angle_m) 0.011111111111111112) 0.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 10^{+125}:\\
                                                                                  \;\;\;\;\left(\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;\mathsf{fma}\left(b \cdot b, \left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112, 0\right)\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 2 regimes
                                                                                  2. if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999992e124

                                                                                    1. Initial program 58.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                      15. lower--.f6461.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 rewrites61.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. Step-by-step derivation
                                                                                      1. Applied rewrites70.3%

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

                                                                                      if 9.9999999999999992e124 < (/.f64 angle #s(literal 180 binary64))

                                                                                      1. Initial program 38.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--.f6434.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 rewrites34.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 \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                                                      7. Step-by-step derivation
                                                                                        1. Applied rewrites26.7%

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

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

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

                                                                                      Alternative 20: 39.4% accurate, 11.9× speedup?

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

                                                                                        1. Initial program 57.8%

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

                                                                                          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. *-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.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 rewrites62.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 b around 0

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

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

                                                                                            if 1.99999999999999993e-64 < (/.f64 angle #s(literal 180 binary64))

                                                                                            1. Initial program 55.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--.f6448.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 rewrites48.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 b around 0

                                                                                              \[\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 rewrites28.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 rewrites28.1%

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

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

                                                                                              Alternative 21: 39.3% accurate, 11.9× speedup?

                                                                                              \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{-73}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot t\_0\right) \cdot a\\ \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-73)
                                                                                                    (* (* (* -0.011111111111111112 a) t_0) 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^{-73}:\\
                                                                                              \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot t\_0\right) \cdot a\\
                                                                                              
                                                                                              \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)) < 9.99999999999999997e-74

                                                                                                1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                    \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                                  15. lower--.f6461.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 rewrites61.6%

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

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

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

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

                                                                                                    if 9.99999999999999997e-74 < (/.f64 angle #s(literal 180 binary64))

                                                                                                    1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                        \[\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 simplification40.6%

                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{-73}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot a\\ \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 22: 39.3% accurate, 11.9× speedup?

                                                                                                    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{-73}:\\ \;\;\;\;\left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot 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-73)
                                                                                                          (* (* t_0 a) (* -0.011111111111111112 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^{-73}:\\
                                                                                                    \;\;\;\;\left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot 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)) < 9.99999999999999997e-74

                                                                                                      1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                          \[\leadsto \left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                                        15. lower--.f6461.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 rewrites61.6%

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

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

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

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

                                                                                                          if 9.99999999999999997e-74 < (/.f64 angle #s(literal 180 binary64))

                                                                                                          1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                              \[\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 simplification40.6%

                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{-73}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot 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 23: 38.0% 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 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                \[\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 2024255 
                                                                                                              (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)))))