ab-angle->ABCF B

Percentage Accurate: 53.3% → 66.1%
Time: 6.3s
Alternatives: 20
Speedup: 13.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 53.3% accurate, 1.0× speedup?

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

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

Alternative 1: 66.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_0 := \left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 5 \cdot 10^{-20}:\\
\;\;\;\;\left(\mathsf{fma}\left(a \cdot angle\_m, \mathsf{PI}\left(\right), \left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\

\mathbf{elif}\;angle\_m \leq 5.1 \cdot 10^{+91}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\sin t\_0 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\mathsf{PI}\left(\right), \frac{angle\_m}{180}, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if angle < 4.9999999999999999e-20

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
      10. lift-PI.f64N/A

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

        \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
      12. lift-*.f64N/A

        \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
      13. lift-PI.f6477.9

        \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
    9. Applied rewrites77.9%

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

    if 4.9999999999999999e-20 < angle < 5.10000000000000013e91

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.10000000000000013e91 < angle

    1. Initial program 22.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 64.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\\
t_1 := \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+296} \lor \neg \left(t\_1 \leq 10^{+258}\right):\\
\;\;\;\;\left(\mathsf{fma}\left(a \cdot angle\_m, \mathsf{PI}\left(\right), \left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -1.99999999999999996e296 or 1.00000000000000006e258 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
      10. lift-PI.f64N/A

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

        \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
      12. lift-*.f64N/A

        \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
      13. lift-PI.f6475.3

        \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
    9. Applied rewrites75.3%

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

    if -1.99999999999999996e296 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 1.00000000000000006e258

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 62.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
        10. lift-PI.f64N/A

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

          \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
        12. lift-*.f64N/A

          \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
        13. lift-PI.f6470.3

          \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
      9. Applied rewrites70.3%

        \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
      10. Taylor expanded in a around inf

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

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

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

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

          \[\leadsto \left(\left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
        5. lift-PI.f6471.8

          \[\leadsto \left(\left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
      12. Applied rewrites71.8%

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

      if -9.9999999999999994e174 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 9.9999999999999991e211

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
        6. difference-of-squares-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 36.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
      9. Step-by-step derivation
        1. Applied rewrites71.1%

          \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
      10. Recombined 3 regimes into one program.
      11. Final simplification69.0%

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

      Alternative 4: 62.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
          15. lift--.f6471.1

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
          10. lift-PI.f64N/A

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

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
          12. lift-*.f64N/A

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
          13. lift-PI.f6469.7

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
        9. Applied rewrites69.7%

          \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
        10. Taylor expanded in a around inf

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

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

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

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

            \[\leadsto \left(\left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
          5. lift-PI.f6471.2

            \[\leadsto \left(\left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
        12. Applied rewrites71.2%

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

        if -1.00000000000000001e160 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 9.99999999999999986e306

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          8. difference-of-squares-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
        10. Recombined 3 regimes into one program.
        11. Final simplification69.0%

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

        Alternative 5: 62.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lift-PI.f64N/A

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-PI.f6470.3

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          9. Applied rewrites70.3%

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          10. Taylor expanded in a around inf

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

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

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

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

              \[\leadsto \left(\left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. lift-PI.f6471.8

              \[\leadsto \left(\left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          12. Applied rewrites71.8%

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

          if -9.9999999999999994e174 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 1.9999999999999999e-241

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            7. lift-PI.f6462.8

              \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          8. Applied rewrites62.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. lift-PI.f6471.1

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          10. Applied rewrites71.1%

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

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

        Alternative 6: 62.5% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            7. lift-PI.f6449.4

              \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          8. Applied rewrites49.4%

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

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

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

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

              \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            5. lower-*.f6449.4

              \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          10. Applied rewrites49.4%

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          11. Step-by-step derivation
            1. lift-*.f64N/A

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

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

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

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

              \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            6. associate-*l*N/A

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

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

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

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

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

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

              \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
            13. lift-PI.f6481.5

              \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
          12. Applied rewrites81.5%

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

          if -2.00000000000000003e306 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 1.9999999999999999e-241

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            7. lift-PI.f6459.2

              \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          8. Applied rewrites59.2%

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

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

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

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

              \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            5. lower-*.f6459.2

              \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          10. Applied rewrites59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. lift-PI.f6471.1

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          10. Applied rewrites71.1%

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

        Alternative 7: 57.8% accurate, 1.0× speedup?

        \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-254} \lor \neg \left(t\_0 \leq \infty\right):\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \end{array} \]
        angle\_m = (fabs.f64 angle)
        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
        (FPCore (angle_s a b angle_m)
         :precision binary64
         (let* ((t_0 (* 2.0 (- (pow b 2.0) (pow a 2.0)))))
           (*
            angle_s
            (if (or (<= t_0 -2e-254) (not (<= t_0 INFINITY)))
              (* (* -0.011111111111111112 a) (* (* angle_m a) (PI)))
              (* (* (* (PI) (* b b)) angle_m) 0.011111111111111112)))))
        \begin{array}{l}
        angle\_m = \left|angle\right|
        \\
        angle\_s = \mathsf{copysign}\left(1, angle\right)
        
        \\
        \begin{array}{l}
        t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\
        angle\_s \cdot \begin{array}{l}
        \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-254} \lor \neg \left(t\_0 \leq \infty\right):\\
        \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
        
        
        \end{array}
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -1.9999999999999998e-254 or +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (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. 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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            7. lift-PI.f6449.0

              \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          8. Applied rewrites49.0%

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

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

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

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

              \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            5. lower-*.f6449.1

              \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          10. Applied rewrites49.1%

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          11. Step-by-step derivation
            1. lift-*.f64N/A

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

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

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

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

              \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            6. associate-*l*N/A

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

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

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

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

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

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

              \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
            13. lift-PI.f6462.7

              \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
          12. Applied rewrites62.7%

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

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

          1. Initial program 60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
            7. lower-*.f6465.1

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
          8. Applied rewrites65.1%

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

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

        Alternative 8: 57.9% accurate, 1.0× speedup?

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

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

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

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

          if 3.30000000000000001e-163 < b

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lift-PI.f64N/A

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-PI.f6471.9

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          9. Applied rewrites71.9%

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          10. Step-by-step derivation
            1. lift-*.f64N/A

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

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. lift-PI.f64N/A

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

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

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

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

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

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

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

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

        Alternative 9: 62.1% accurate, 1.3× speedup?

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

          1. Initial program 65.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 a around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \]
          5. Applied rewrites67.8%

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

          if 5.0000000000000002e-203 < (pow.f64 b #s(literal 2 binary64))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            15. lift--.f6473.1

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lift-PI.f64N/A

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-PI.f6471.4

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          9. Applied rewrites71.4%

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          10. Step-by-step derivation
            1. lift-*.f64N/A

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

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. lift-PI.f64N/A

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

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

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

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

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

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

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

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

        Alternative 10: 61.7% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            13. lower--.f6466.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 0.0 < (pow.f64 b #s(literal 2 binary64))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            15. lift--.f6471.1

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lift-PI.f64N/A

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-PI.f6469.6

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          9. Applied rewrites69.6%

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          10. Step-by-step derivation
            1. lift-*.f64N/A

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

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

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. lift-PI.f64N/A

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

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

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

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

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

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

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

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

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

        Alternative 11: 48.9% accurate, 1.8× speedup?

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

          1. Initial program 55.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 a around inf

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

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

              \[\leadsto \left(\left(-2 \cdot \left(a \cdot \color{blue}{a}\right)\right) \cdot \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. lower-*.f6443.9

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

            \[\leadsto \left(\color{blue}{\left(-2 \cdot \left(a \cdot a\right)\right)} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          6. Taylor expanded in angle around 0

            \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          7. Step-by-step derivation
            1. lower-*.f6444.5

              \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(0.005555555555555556 \cdot \color{blue}{angle}\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          8. Applied rewrites44.5%

            \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]

          if 3.30000000000000001e-163 < b

          1. Initial program 47.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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6454.3

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites54.3%

            \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            2. lift-+.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. lift--.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            5. associate-*r*N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lift-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. *-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lower-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. +-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            14. lower-+.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            15. lift--.f6474.0

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          7. Applied rewrites74.0%

            \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          8. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            2. lift-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            3. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. distribute-lft-inN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. *-commutativeN/A

              \[\leadsto \left(\left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. associate-*r*N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lower-fma.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. lower-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lift-PI.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-PI.f6471.9

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          9. Applied rewrites71.9%

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          10. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lift--.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            3. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. lift-PI.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. lift-fma.f64N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. lift-*.f64N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. lift-*.f64N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. associate-*l*N/A

              \[\leadsto \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)} \]
          11. Applied rewrites71.9%

            \[\leadsto \color{blue}{\mathsf{fma}\left(angle \cdot b, \mathsf{PI}\left(\right), \left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 12: 59.8% accurate, 1.8× speedup?

        \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 3.7 \cdot 10^{-100}:\\ \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\sin t\_0 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(angle\_m \cdot b, \mathsf{PI}\left(\right), \left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \end{array} \]
        angle\_m = (fabs.f64 angle)
        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
        (FPCore (angle_s a b angle_m)
         :precision binary64
         (let* ((t_0 (* (* (PI) angle_m) 0.005555555555555556)))
           (*
            angle_s
            (if (<= b 3.7e-100)
              (* (* 2.0 (cos t_0)) (* (sin t_0) (* (+ b a) (- b a))))
              (*
               (fma (* angle_m b) (PI) (* (* angle_m a) (PI)))
               (* (- b a) 0.011111111111111112))))))
        \begin{array}{l}
        angle\_m = \left|angle\right|
        \\
        angle\_s = \mathsf{copysign}\left(1, angle\right)
        
        \\
        \begin{array}{l}
        t_0 := \left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\\
        angle\_s \cdot \begin{array}{l}
        \mathbf{if}\;b \leq 3.7 \cdot 10^{-100}:\\
        \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\sin t\_0 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(angle\_m \cdot b, \mathsf{PI}\left(\right), \left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\\
        
        
        \end{array}
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if b < 3.70000000000000018e-100

          1. Initial program 56.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 inf

            \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
            2. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
            3. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            4. lower-cos.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            6. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            8. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            9. lift-PI.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            10. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          5. Applied rewrites60.8%

            \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]

          if 3.70000000000000018e-100 < b

          1. Initial program 45.6%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6453.5

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites53.5%

            \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            2. lift-+.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. lift--.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            5. associate-*r*N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lift-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. *-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lower-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. +-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            14. lower-+.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            15. lift--.f6475.5

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          7. Applied rewrites75.5%

            \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          8. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            2. lift-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            3. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. distribute-lft-inN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. *-commutativeN/A

              \[\leadsto \left(\left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. associate-*r*N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lower-fma.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. lower-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lift-PI.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-PI.f6473.1

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          9. Applied rewrites73.1%

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          10. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lift--.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            3. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. lift-PI.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. lift-fma.f64N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. lift-*.f64N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. lift-*.f64N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. associate-*l*N/A

              \[\leadsto \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)} \]
          11. Applied rewrites73.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(angle \cdot b, \mathsf{PI}\left(\right), \left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 13: 62.9% accurate, 2.9× speedup?

        \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := angle\_m \cdot \mathsf{PI}\left(\right)\\ t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 3.5 \cdot 10^{+48}:\\ \;\;\;\;\left(\mathsf{fma}\left(a \cdot angle\_m, \mathsf{PI}\left(\right), t\_0 \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;angle\_m \leq 3 \cdot 10^{+89}:\\ \;\;\;\;\left(\left(t\_1 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\right) \cdot \mathsf{fma}\left({t\_0}^{2}, -1.54320987654321 \cdot 10^{-5}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t\_1 \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \end{array} \]
        angle\_m = (fabs.f64 angle)
        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
        (FPCore (angle_s a b angle_m)
         :precision binary64
         (let* ((t_0 (* angle_m (PI))) (t_1 (* (PI) angle_m)))
           (*
            angle_s
            (if (<= angle_m 3.5e+48)
              (* (* (fma (* a angle_m) (PI) (* t_0 b)) (- b a)) 0.011111111111111112)
              (if (<= angle_m 3e+89)
                (*
                 (* (* t_1 (* (+ b a) (- b a))) 0.011111111111111112)
                 (fma (pow t_0 2.0) -1.54320987654321e-5 1.0))
                (* (* t_1 (* b (- b a))) 0.011111111111111112))))))
        \begin{array}{l}
        angle\_m = \left|angle\right|
        \\
        angle\_s = \mathsf{copysign}\left(1, angle\right)
        
        \\
        \begin{array}{l}
        t_0 := angle\_m \cdot \mathsf{PI}\left(\right)\\
        t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\
        angle\_s \cdot \begin{array}{l}
        \mathbf{if}\;angle\_m \leq 3.5 \cdot 10^{+48}:\\
        \;\;\;\;\left(\mathsf{fma}\left(a \cdot angle\_m, \mathsf{PI}\left(\right), t\_0 \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
        
        \mathbf{elif}\;angle\_m \leq 3 \cdot 10^{+89}:\\
        \;\;\;\;\left(\left(t\_1 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\right) \cdot \mathsf{fma}\left({t\_0}^{2}, -1.54320987654321 \cdot 10^{-5}, 1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(t\_1 \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\\
        
        
        \end{array}
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if angle < 3.4999999999999997e48

          1. Initial program 61.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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6464.0

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites64.0%

            \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            2. lift-+.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. lift--.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            5. associate-*r*N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lift-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. *-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lower-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. +-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            14. lower-+.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            15. lift--.f6479.0

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          7. Applied rewrites79.0%

            \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          8. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            2. lift-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            3. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. distribute-lft-inN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. *-commutativeN/A

              \[\leadsto \left(\left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. associate-*r*N/A

              \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lower-fma.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. lower-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lift-PI.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lift-*.f64N/A

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-PI.f6477.6

              \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          9. Applied rewrites77.6%

            \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]

          if 3.4999999999999997e48 < angle < 3.00000000000000013e89

          1. Initial program 15.2%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            2. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            8. unpow2N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            9. unpow2N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            13. lower--.f6410.2

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          5. Applied rewrites10.2%

            \[\leadsto \color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
          6. Taylor expanded in angle around 0

            \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \left(\frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + \color{blue}{1}\right) \]
            2. *-commutativeN/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \left(\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{-1}{64800} + 1\right) \]
            3. pow-prod-downN/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2} \cdot \frac{-1}{64800} + 1\right) \]
            4. pow2N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{-1}{64800} + 1\right) \]
            5. lower-fma.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \mathsf{fma}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\frac{-1}{64800}}, 1\right) \]
            6. pow2N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, \frac{-1}{64800}, 1\right) \]
            7. lower-pow.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, \frac{-1}{64800}, 1\right) \]
            8. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90}\right) \cdot \mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, \frac{-1}{64800}, 1\right) \]
            9. lift-PI.f6426.3

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\right) \cdot \mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, -1.54320987654321 \cdot 10^{-5}, 1\right) \]
          8. Applied rewrites26.3%

            \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\right) \cdot \color{blue}{\mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, -1.54320987654321 \cdot 10^{-5}, 1\right)} \]

          if 3.00000000000000013e89 < angle

          1. Initial program 22.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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6435.4

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites35.4%

            \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Taylor expanded in a around 0

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          7. Step-by-step derivation
            1. Applied rewrites36.4%

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          8. Recombined 3 regimes into one program.
          9. Add Preprocessing

          Alternative 14: 48.0% accurate, 3.3× speedup?

          \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 4.5 \cdot 10^{-105}:\\ \;\;\;\;\left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(angle\_m \cdot b, \mathsf{PI}\left(\right), \left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
          angle\_m = (fabs.f64 angle)
          angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
          (FPCore (angle_s a b angle_m)
           :precision binary64
           (*
            angle_s
            (if (<= b 4.5e-105)
              (*
               (* (* -2.0 (* a a)) (sin (* (* angle_m (PI)) 0.005555555555555556)))
               1.0)
              (*
               (fma (* angle_m b) (PI) (* (* angle_m a) (PI)))
               (* (- b a) 0.011111111111111112)))))
          \begin{array}{l}
          angle\_m = \left|angle\right|
          \\
          angle\_s = \mathsf{copysign}\left(1, angle\right)
          
          \\
          angle\_s \cdot \begin{array}{l}
          \mathbf{if}\;b \leq 4.5 \cdot 10^{-105}:\\
          \;\;\;\;\left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right)\right) \cdot 1\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(angle\_m \cdot b, \mathsf{PI}\left(\right), \left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if b < 4.4999999999999997e-105

            1. Initial program 56.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 a around 0

              \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            4. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto \left(\left(2 \cdot {b}^{2}\right) \cdot \color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              2. lower-*.f64N/A

                \[\leadsto \left(\left(2 \cdot {b}^{2}\right) \cdot \color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              3. *-commutativeN/A

                \[\leadsto \left(\left({b}^{2} \cdot 2\right) \cdot \sin \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              4. lower-*.f64N/A

                \[\leadsto \left(\left({b}^{2} \cdot 2\right) \cdot \sin \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              5. unpow2N/A

                \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\color{blue}{\frac{1}{180}} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              6. lower-*.f64N/A

                \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\color{blue}{\frac{1}{180}} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              7. lower-sin.f64N/A

                \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              8. *-commutativeN/A

                \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              9. lower-*.f64N/A

                \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              10. *-commutativeN/A

                \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              11. lower-*.f64N/A

                \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              12. lift-PI.f6435.8

                \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            5. Applied rewrites35.8%

              \[\leadsto \color{blue}{\left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
            6. Taylor expanded in angle around 0

              \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \color{blue}{1} \]
            7. Step-by-step derivation
              1. Applied rewrites36.8%

                \[\leadsto \left(\left(\left(b \cdot b\right) \cdot 2\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \color{blue}{1} \]
              2. Taylor expanded in a around inf

                \[\leadsto \color{blue}{\left(-2 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \cdot 1 \]
              3. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(\left(-2 \cdot {a}^{2}\right) \cdot \color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \cdot 1 \]
                2. lower-*.f64N/A

                  \[\leadsto \left(\left(-2 \cdot {a}^{2}\right) \cdot \color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \cdot 1 \]
                3. lower-*.f64N/A

                  \[\leadsto \left(\left(-2 \cdot {a}^{2}\right) \cdot \sin \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \cdot 1 \]
                4. unpow2N/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \cdot 1 \]
                5. lower-*.f64N/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \cdot 1 \]
                6. *-commutativeN/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\right) \cdot 1 \]
                7. *-commutativeN/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot 1 \]
                8. lift-*.f64N/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot 1 \]
                9. lift-PI.f64N/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot 1 \]
                10. lift-*.f64N/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot 1 \]
                11. lift-sin.f6444.2

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot 1 \]
                12. lift-PI.f64N/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot 1 \]
                13. lift-*.f64N/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot 1 \]
                14. *-commutativeN/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot 1 \]
                15. lift-*.f64N/A

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot 1 \]
                16. lift-PI.f6444.2

                  \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right)\right) \cdot 1 \]
              4. Applied rewrites44.2%

                \[\leadsto \color{blue}{\left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\right)\right)} \cdot 1 \]

              if 4.4999999999999997e-105 < b

              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. 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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6452.9

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites52.9%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                2. lift-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                3. lift--.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                4. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                5. associate-*r*N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                8. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                9. *-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                10. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                12. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                13. +-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                14. lower-+.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                15. lift--.f6474.7

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              7. Applied rewrites74.7%

                \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              8. Step-by-step derivation
                1. lift-+.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                3. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                4. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                5. distribute-lft-inN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                6. *-commutativeN/A

                  \[\leadsto \left(\left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                7. associate-*r*N/A

                  \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                8. lower-fma.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                9. lower-*.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                10. lift-PI.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                12. lift-*.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                13. lift-PI.f6472.2

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              9. Applied rewrites72.2%

                \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              10. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lift--.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                3. lift-*.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                4. lift-*.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                5. lift-PI.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                6. lift-fma.f64N/A

                  \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                7. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                8. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                9. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                10. associate-*l*N/A

                  \[\leadsto \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)} \]
              11. Applied rewrites72.2%

                \[\leadsto \color{blue}{\mathsf{fma}\left(angle \cdot b, \mathsf{PI}\left(\right), \left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)} \]
            8. Recombined 2 regimes into one program.
            9. Add Preprocessing

            Alternative 15: 63.7% accurate, 11.0× speedup?

            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.15 \cdot 10^{-61}:\\ \;\;\;\;\left(\mathsf{fma}\left(a \cdot angle\_m, \mathsf{PI}\left(\right), \left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \]
            angle\_m = (fabs.f64 angle)
            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
            (FPCore (angle_s a b angle_m)
             :precision binary64
             (*
              angle_s
              (if (<= angle_m 2.15e-61)
                (*
                 (* (fma (* a angle_m) (PI) (* (* angle_m (PI)) b)) (- b a))
                 0.011111111111111112)
                (* (* 0.011111111111111112 angle_m) (* (* (PI) (+ a b)) (- b a))))))
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;angle\_m \leq 2.15 \cdot 10^{-61}:\\
            \;\;\;\;\left(\mathsf{fma}\left(a \cdot angle\_m, \mathsf{PI}\left(\right), \left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 2.1500000000000002e-61

              1. Initial program 60.1%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 0

                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6461.5

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites61.5%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                2. lift-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                3. lift--.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                4. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                5. associate-*r*N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                8. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                9. *-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                10. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                12. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                13. +-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                14. lower-+.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                15. lift--.f6478.6

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              7. Applied rewrites78.6%

                \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              8. Step-by-step derivation
                1. lift-+.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                3. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                4. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                5. distribute-lft-inN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                6. *-commutativeN/A

                  \[\leadsto \left(\left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                7. associate-*r*N/A

                  \[\leadsto \left(\left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                8. lower-fma.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                9. lower-*.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                10. lift-PI.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                12. lift-*.f64N/A

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                13. lift-PI.f6476.9

                  \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              9. Applied rewrites76.9%

                \[\leadsto \left(\mathsf{fma}\left(a \cdot angle, \mathsf{PI}\left(\right), \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]

              if 2.1500000000000002e-61 < angle

              1. Initial program 35.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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6447.3

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites47.3%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                3. lift-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                4. lift--.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                6. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                7. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                8. difference-of-squares-revN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. pow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                11. *-commutativeN/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                12. associate-*r*N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90} \]
                13. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                14. associate-*r*N/A

                  \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                15. lower-*.f64N/A

                  \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
              7. Applied rewrites47.4%

                \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 16: 64.0% accurate, 13.7× speedup?

            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2 \cdot 10^{-17}:\\ \;\;\;\;\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
            angle\_m = (fabs.f64 angle)
            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
            (FPCore (angle_s a b angle_m)
             :precision binary64
             (*
              angle_s
              (if (<= angle_m 2e-17)
                (* (* (* (+ a b) (PI)) angle_m) (* (- b a) 0.011111111111111112))
                (* (* angle_m (PI)) (* (* (- b a) (+ a b)) 0.011111111111111112)))))
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;angle\_m \leq 2 \cdot 10^{-17}:\\
            \;\;\;\;\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 2.00000000000000014e-17

              1. Initial program 61.2%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 0

                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6463.1

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites63.1%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                2. lift-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                3. lift--.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                4. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                5. associate-*r*N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                8. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                9. *-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                10. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                12. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                13. +-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                14. lower-+.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                15. lift--.f6479.5

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              7. Applied rewrites79.5%

                \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              8. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lift--.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                3. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                4. lift-+.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                6. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                7. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                8. associate-*l*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)} \]
                9. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \frac{1}{90}\right)} \]
              9. Applied rewrites79.5%

                \[\leadsto \color{blue}{\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)} \]

              if 2.00000000000000014e-17 < angle

              1. Initial program 29.2%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 0

                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6441.2

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites41.2%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                3. lift-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                4. lift--.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                6. difference-of-squares-revN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                7. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                8. pow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. associate-*l*N/A

                  \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \frac{1}{90}\right)} \]
                10. lift-PI.f64N/A

                  \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \frac{1}{90}\right) \]
                11. lift-*.f64N/A

                  \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \frac{1}{90}\right) \]
                12. *-commutativeN/A

                  \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \frac{1}{90}\right) \]
                13. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \frac{1}{90}\right)} \]
                14. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \frac{1}{90}\right) \]
                15. lift-PI.f64N/A

                  \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left({b}^{2} - \color{blue}{{a}^{2}}\right) \cdot \frac{1}{90}\right) \]
                16. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\frac{1}{90}}\right) \]
              7. Applied rewrites41.2%

                \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 17: 63.7% accurate, 13.7× speedup?

            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2 \cdot 10^{-61}:\\ \;\;\;\;\left(\left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \]
            angle\_m = (fabs.f64 angle)
            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
            (FPCore (angle_s a b angle_m)
             :precision binary64
             (*
              angle_s
              (if (<= angle_m 2e-61)
                (* (* (* (* angle_m (PI)) (+ a b)) (- b a)) 0.011111111111111112)
                (* (* 0.011111111111111112 angle_m) (* (* (PI) (+ a b)) (- b a))))))
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;angle\_m \leq 2 \cdot 10^{-61}:\\
            \;\;\;\;\left(\left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 2.0000000000000001e-61

              1. Initial program 60.1%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 0

                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6461.5

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites61.5%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                2. lift-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                3. lift--.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                4. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                5. associate-*r*N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                8. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                9. *-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                10. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                12. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                13. +-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                14. lower-+.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                15. lift--.f6478.6

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              7. Applied rewrites78.6%

                \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]

              if 2.0000000000000001e-61 < angle

              1. Initial program 35.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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6447.3

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites47.3%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                3. lift-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                4. lift--.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                6. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                7. lift-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                8. difference-of-squares-revN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. pow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                11. *-commutativeN/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                12. associate-*r*N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90} \]
                13. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                14. associate-*r*N/A

                  \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                15. lower-*.f64N/A

                  \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
              7. Applied rewrites47.4%

                \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 18: 37.1% accurate, 16.8× speedup?

            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 5 \cdot 10^{+143}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)\\ \end{array} \end{array} \]
            angle\_m = (fabs.f64 angle)
            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
            (FPCore (angle_s a b angle_m)
             :precision binary64
             (*
              angle_s
              (if (<= a 5e+143)
                (* (* (* -0.011111111111111112 a) a) (* angle_m (PI)))
                (* (* -0.011111111111111112 a) (* (* angle_m a) (PI))))))
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;a \leq 5 \cdot 10^{+143}:\\
            \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if a < 5.00000000000000012e143

              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. 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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6459.5

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites59.5%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Taylor expanded in a around inf

                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
              7. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                2. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                3. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. pow2N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                7. lift-PI.f6434.9

                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              8. Applied rewrites34.9%

                \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lower-*.f6434.9

                  \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              10. Applied rewrites34.9%

                \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]

              if 5.00000000000000012e143 < a

              1. Initial program 33.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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6444.4

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites44.4%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Taylor expanded in a around inf

                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
              7. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                2. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                3. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. pow2N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                7. lift-PI.f6447.1

                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              8. Applied rewrites47.1%

                \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lower-*.f6447.1

                  \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              10. Applied rewrites47.1%

                \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              11. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                3. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. lift-PI.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                6. associate-*l*N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                7. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                8. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
                9. associate-*r*N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                10. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                11. *-commutativeN/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
                12. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
                13. lift-PI.f6473.6

                  \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
              12. Applied rewrites73.6%

                \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 19: 37.1% accurate, 16.8× speedup?

            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 3:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)\\ \end{array} \end{array} \]
            angle\_m = (fabs.f64 angle)
            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
            (FPCore (angle_s a b angle_m)
             :precision binary64
             (*
              angle_s
              (if (<= a 3.0)
                (* (* -0.011111111111111112 (* a a)) (* angle_m (PI)))
                (* (* -0.011111111111111112 a) (* (* angle_m a) (PI))))))
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;a \leq 3:\\
            \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if a < 3

              1. Initial program 56.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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6460.5

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites60.5%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Taylor expanded in a around inf

                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
              7. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                2. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                3. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. pow2N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                7. lift-PI.f6435.7

                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              8. Applied rewrites35.7%

                \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]

              if 3 < a

              1. Initial program 41.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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6448.2

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites48.2%

                \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
              6. Taylor expanded in a around inf

                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
              7. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                2. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                3. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. pow2N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                7. lift-PI.f6439.4

                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              8. Applied rewrites39.4%

                \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lower-*.f6439.4

                  \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              10. Applied rewrites39.4%

                \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              11. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                3. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                4. lift-PI.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                6. associate-*l*N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                7. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                8. lift-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
                9. associate-*r*N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                10. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                11. *-commutativeN/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
                12. lower-*.f64N/A

                  \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
                13. lift-PI.f6454.4

                  \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
              12. Applied rewrites54.4%

                \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 20: 38.3% accurate, 21.6× speedup?

            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)\right) \end{array} \]
            angle\_m = (fabs.f64 angle)
            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
            (FPCore (angle_s a b angle_m)
             :precision binary64
             (* angle_s (* (* -0.011111111111111112 a) (* (* angle_m a) (PI)))))
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)\right)
            \end{array}
            
            Derivation
            1. Initial program 52.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 \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
              2. lower-*.f64N/A

                \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
              3. associate-*r*N/A

                \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
              4. lower-*.f64N/A

                \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
              5. *-commutativeN/A

                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
              6. lower-*.f64N/A

                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
              7. lift-PI.f64N/A

                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
              8. unpow2N/A

                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
              9. unpow2N/A

                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
              10. difference-of-squaresN/A

                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
              11. lower-*.f64N/A

                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
              12. lower-+.f64N/A

                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
              13. lower--.f6457.3

                \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
            5. Applied rewrites57.3%

              \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
            6. Taylor expanded in a around inf

              \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
            7. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
              2. lower-*.f64N/A

                \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
              3. lower-*.f64N/A

                \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              4. pow2N/A

                \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              5. lift-*.f64N/A

                \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              6. lower-*.f64N/A

                \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              7. lift-PI.f6436.7

                \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            8. Applied rewrites36.7%

              \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)} \]
            9. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              2. lift-*.f64N/A

                \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              3. associate-*r*N/A

                \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              4. lower-*.f64N/A

                \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              5. lower-*.f6436.7

                \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            10. Applied rewrites36.7%

              \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
            11. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
              2. lift-*.f64N/A

                \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              3. lift-*.f64N/A

                \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              4. lift-PI.f64N/A

                \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              5. lift-*.f64N/A

                \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
              6. associate-*l*N/A

                \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
              7. lower-*.f64N/A

                \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
              8. lift-*.f64N/A

                \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
              9. associate-*r*N/A

                \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
              10. lower-*.f64N/A

                \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(a \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
              11. *-commutativeN/A

                \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
              12. lower-*.f64N/A

                \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
              13. lift-PI.f6441.5

                \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \]
            12. Applied rewrites41.5%

              \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot a\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
            13. Add Preprocessing

            Reproduce

            ?
            herbie shell --seed 2025037 
            (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)))))