ab-angle->ABCF B

Percentage Accurate: 54.7% → 67.7%
Time: 12.9s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 54.7% accurate, 1.0× speedup?

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

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

Alternative 1: 67.7% accurate, 0.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\sqrt[3]{{\mathsf{PI}\left(\right)}^{3}} \cdot angle\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \mathsf{fma}\left(\sqrt{a\_m}, \sqrt{a\_m}, b\_m\right)\\


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

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 36.6%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{{a}^{1}} + 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) \]
      3. sqr-powN/A

        \[\leadsto \left(\color{blue}{{a}^{\left(\frac{1}{2}\right)} \cdot {a}^{\left(\frac{1}{2}\right)}} + 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) \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left({a}^{\left(\frac{1}{2}\right)}, {a}^{\left(\frac{1}{2}\right)}, 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) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left({a}^{\color{blue}{\frac{1}{2}}}, {a}^{\left(\frac{1}{2}\right)}, 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) \]
      6. unpow1/2N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\sqrt{a}}, {a}^{\left(\frac{1}{2}\right)}, 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) \]
      7. lower-sqrt.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\sqrt{a}}, {a}^{\left(\frac{1}{2}\right)}, 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) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(\sqrt{a}, {a}^{\color{blue}{\frac{1}{2}}}, 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) \]
      9. unpow1/2N/A

        \[\leadsto \mathsf{fma}\left(\sqrt{a}, \color{blue}{\sqrt{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) \]
      10. lower-sqrt.f649.3

        \[\leadsto \mathsf{fma}\left(\sqrt{a}, \color{blue}{\sqrt{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) \]
    6. Applied rewrites9.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{a}, \sqrt{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) \]
    7. Step-by-step derivation
      1. lift-PI.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{a}, \sqrt{a}, b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(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}}}\right) \cdot \frac{1}{90}\right)\right) \]
      5. add-cbrt-cubeN/A

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

        \[\leadsto \mathsf{fma}\left(\sqrt{a}, \sqrt{a}, b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \sqrt[3]{{\color{blue}{\mathsf{PI}\left(\right)}}^{3}}\right) \cdot \frac{1}{90}\right)\right) \]
      7. lower-pow.f6412.8

        \[\leadsto \mathsf{fma}\left(\sqrt{a}, \sqrt{a}, b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \sqrt[3]{\color{blue}{{\mathsf{PI}\left(\right)}^{3}}}\right) \cdot 0.011111111111111112\right)\right) \]
    8. Applied rewrites12.8%

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

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

Alternative 2: 67.2% accurate, 1.2× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;1 \cdot t\_0\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.74999999999999997e-53

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.74999999999999997e-53 < a

    1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 67.6% accurate, 1.9× speedup?

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

      1. Initial program 56.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 rewrites64.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)} \]

      if 4.99999999999999992e-46 < (pow.f64 a #s(literal 2 binary64))

      1. Initial program 44.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 59.4% accurate, 1.9× speedup?

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

        1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.00000000000000002e55 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

              1. Initial program 49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 5: 58.3% accurate, 1.9× speedup?

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

              1. Initial program 52.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--.f6455.0

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

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

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

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

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

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

                    1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 6: 58.3% accurate, 2.0× speedup?

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

                        1. Initial program 52.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--.f6455.0

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

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

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

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

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

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

                              1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 7: 58.3% accurate, 2.0× speedup?

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

                                1. Initial program 52.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--.f6455.0

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

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

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

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

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

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

                                      1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 8: 66.3% accurate, 2.0× speedup?

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

                                          1. Initial program 58.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 rewrites65.8%

                                            \[\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 inf

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

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

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

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

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

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

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

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

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

                                          if 5.0000000000000001e-180 < (pow.f64 a #s(literal 2 binary64))

                                          1. Initial program 45.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 rewrites66.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 \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 \left(\frac{1}{90} \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)}\right) \]
                                            2. associate-*r*N/A

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

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

                                              \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \cdot angle\right) \]
                                            5. 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 \frac{1}{90}\right)} \cdot angle\right) \]
                                            6. *-commutativeN/A

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

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

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

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

                                        Alternative 9: 66.5% accurate, 3.1× speedup?

                                        \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ 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^{+133}:\\ \;\;\;\;\left(\left(\left(\left(b\_m - a\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right) \cdot \left(b\_m + a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(b\_m + a\_m\right)\right)\\ \end{array} \end{array} \]
                                        b_m = (fabs.f64 b)
                                        a_m = (fabs.f64 a)
                                        angle\_m = (fabs.f64 angle)
                                        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                        (FPCore (angle_s a_m b_m angle_m)
                                         :precision binary64
                                         (*
                                          angle_s
                                          (if (<= (/ angle_m 180.0) 1e+133)
                                            (* (* (* (* (- b_m a_m) (PI)) 0.011111111111111112) angle_m) (+ b_m a_m))
                                            (*
                                             (sin (* (* 0.011111111111111112 (PI)) angle_m))
                                             (* (- b_m a_m) (+ b_m a_m))))))
                                        \begin{array}{l}
                                        b_m = \left|b\right|
                                        \\
                                        a_m = \left|a\right|
                                        \\
                                        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^{+133}:\\
                                        \;\;\;\;\left(\left(\left(\left(b\_m - a\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right) \cdot \left(b\_m + a\_m\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(b\_m + a\_m\right)\right)\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if (/.f64 angle #s(literal 180 binary64)) < 1e133

                                          1. Initial program 52.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.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 \left(\frac{1}{90} \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)}\right) \]
                                            2. associate-*r*N/A

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

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

                                              \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \cdot angle\right) \]
                                            5. 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 \frac{1}{90}\right)} \cdot angle\right) \]
                                            6. *-commutativeN/A

                                              \[\leadsto \left(a + b\right) \cdot \left(\left(\color{blue}{\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \frac{1}{90}\right) \cdot angle\right) \]
                                            7. 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 \frac{1}{90}\right) \cdot angle\right) \]
                                            8. 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 \frac{1}{90}\right) \cdot angle\right) \]
                                            9. lower-PI.f6469.4

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

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

                                          if 1e133 < (/.f64 angle #s(literal 180 binary64))

                                          1. Initial program 37.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 rewrites34.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. 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. unpow2N/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. lift-pow.f64N/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) \]
                                            10. 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) \]
                                            11. lift-pow.f64N/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) \]
                                            12. lift--.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) \]
                                            13. lower-*.f6434.5

                                              \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)} \]
                                            14. lift--.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) \]
                                            15. lift-pow.f64N/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) \]
                                            16. pow2N/A

                                              \[\leadsto \left({b}^{2} - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right) \]
                                            17. lift-pow.f64N/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) \]
                                            18. unpow2N/A

                                              \[\leadsto \left(\color{blue}{b \cdot b} - a \cdot a\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right) \]
                                            19. 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) \]
                                            20. lift-+.f64N/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) \]
                                            21. 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) \]
                                            22. lift-*.f6434.5

                                              \[\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 0.011111111111111112\right) \]
                                            23. 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)} \]
                                            24. 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) \]
                                          6. Applied rewrites34.8%

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

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

                                        Alternative 10: 68.5% accurate, 3.4× speedup?

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

                                          1. Initial program 50.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 rewrites66.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)} \]

                                          if 1.4000000000000001e279 < b

                                          1. Initial program 15.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 rewrites71.4%

                                            \[\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 \left(\frac{1}{90} \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)}\right) \]
                                            2. associate-*r*N/A

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

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

                                              \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \cdot angle\right) \]
                                            5. 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 \frac{1}{90}\right)} \cdot angle\right) \]
                                            6. *-commutativeN/A

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

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

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

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

                                        Alternative 11: 68.7% accurate, 3.4× speedup?

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

                                          1. Initial program 50.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 rewrites66.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. Step-by-step derivation
                                            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

                                          if 1.4000000000000001e279 < b

                                          1. Initial program 15.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 rewrites71.4%

                                            \[\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 \left(\frac{1}{90} \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)}\right) \]
                                            2. associate-*r*N/A

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

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

                                              \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \cdot angle\right) \]
                                            5. 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 \frac{1}{90}\right)} \cdot angle\right) \]
                                            6. *-commutativeN/A

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

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

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

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

                                        Alternative 12: 41.1% accurate, 3.5× speedup?

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

                                          1. Initial program 56.7%

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

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

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

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

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

                                                if 4e6 < (pow.f64 a #s(literal 2 binary64))

                                                1. Initial program 41.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--.f6457.9

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

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

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

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

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

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

                                                    Alternative 13: 41.1% accurate, 3.5× speedup?

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

                                                      1. Initial program 57.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--.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 rewrites25.3%

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

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

                                                          if 1e12 < (pow.f64 a #s(literal 2 binary64))

                                                          1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 14: 63.9% accurate, 10.3× speedup?

                                                              \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ 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^{+201}:\\ \;\;\;\;\left(\left(\left(\left(b\_m - a\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right) \cdot \left(b\_m + a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-a\_m\right) \cdot \left(b\_m + a\_m\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\\ \end{array} \end{array} \]
                                                              b_m = (fabs.f64 b)
                                                              a_m = (fabs.f64 a)
                                                              angle\_m = (fabs.f64 angle)
                                                              angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                              (FPCore (angle_s a_m b_m angle_m)
                                                               :precision binary64
                                                               (*
                                                                angle_s
                                                                (if (<= (/ angle_m 180.0) 2e+201)
                                                                  (* (* (* (* (- b_m a_m) (PI)) 0.011111111111111112) angle_m) (+ b_m a_m))
                                                                  (* (* (- a_m) (+ b_m a_m)) (* (* 0.011111111111111112 (PI)) angle_m)))))
                                                              \begin{array}{l}
                                                              b_m = \left|b\right|
                                                              \\
                                                              a_m = \left|a\right|
                                                              \\
                                                              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^{+201}:\\
                                                              \;\;\;\;\left(\left(\left(\left(b\_m - a\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right) \cdot \left(b\_m + a\_m\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\left(\left(-a\_m\right) \cdot \left(b\_m + a\_m\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000008e201

                                                                1. Initial program 51.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 rewrites70.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 \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 \left(\frac{1}{90} \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\right)}\right) \]
                                                                  2. associate-*r*N/A

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

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

                                                                    \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \cdot angle\right) \]
                                                                  5. 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 \frac{1}{90}\right)} \cdot angle\right) \]
                                                                  6. *-commutativeN/A

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

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

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

                                                                if 2.00000000000000008e201 < (/.f64 angle #s(literal 180 binary64))

                                                                1. Initial program 34.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                Alternative 15: 39.7% accurate, 11.9× speedup?

                                                                \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ 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^{-170}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot angle\_m\right) \cdot a\_m\right) \cdot \left(a\_m \cdot \mathsf{PI}\left(\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right) \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\ \end{array} \end{array} \]
                                                                b_m = (fabs.f64 b)
                                                                a_m = (fabs.f64 a)
                                                                angle\_m = (fabs.f64 angle)
                                                                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                (FPCore (angle_s a_m b_m angle_m)
                                                                 :precision binary64
                                                                 (*
                                                                  angle_s
                                                                  (if (<= (/ angle_m 180.0) 1e-170)
                                                                    (* (* (* -0.011111111111111112 angle_m) a_m) (* a_m (PI)))
                                                                    (* (* (* (* a_m a_m) -0.011111111111111112) angle_m) (PI)))))
                                                                \begin{array}{l}
                                                                b_m = \left|b\right|
                                                                \\
                                                                a_m = \left|a\right|
                                                                \\
                                                                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^{-170}:\\
                                                                \;\;\;\;\left(\left(-0.011111111111111112 \cdot angle\_m\right) \cdot a\_m\right) \cdot \left(a\_m \cdot \mathsf{PI}\left(\right)\right)\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\left(\left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right) \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999983e-171

                                                                  1. Initial program 53.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--.f6461.2

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

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

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

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

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

                                                                        if 9.99999999999999983e-171 < (/.f64 angle #s(literal 180 binary64))

                                                                        1. Initial program 44.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--.f6445.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 rewrites45.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 rewrites30.9%

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

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

                                                                        Alternative 16: 39.7% accurate, 21.6× speedup?

                                                                        \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\left(-0.011111111111111112 \cdot angle\_m\right) \cdot \left(a\_m \cdot \mathsf{PI}\left(\right)\right)\right) \cdot a\_m\right) \end{array} \]
                                                                        b_m = (fabs.f64 b)
                                                                        a_m = (fabs.f64 a)
                                                                        angle\_m = (fabs.f64 angle)
                                                                        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                        (FPCore (angle_s a_m b_m angle_m)
                                                                         :precision binary64
                                                                         (* angle_s (* (* (* -0.011111111111111112 angle_m) (* a_m (PI))) a_m)))
                                                                        \begin{array}{l}
                                                                        b_m = \left|b\right|
                                                                        \\
                                                                        a_m = \left|a\right|
                                                                        \\
                                                                        angle\_m = \left|angle\right|
                                                                        \\
                                                                        angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                        
                                                                        \\
                                                                        angle\_s \cdot \left(\left(\left(-0.011111111111111112 \cdot angle\_m\right) \cdot \left(a\_m \cdot \mathsf{PI}\left(\right)\right)\right) \cdot a\_m\right)
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              Reproduce

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