ab-angle->ABCF B

Percentage Accurate: 53.7% → 67.4%
Time: 16.3s
Alternatives: 21
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 21 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.7% accurate, 1.0× speedup?

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

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

Alternative 1: 67.4% 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 := \sqrt[3]{\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.4 \cdot 10^{+161}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle\_m \cdot \frac{\sqrt[3]{{\mathsf{PI}\left(\right)}^{3}}}{180}\right)\right)\right)\\ \mathbf{elif}\;angle\_m \leq 3.2 \cdot 10^{+253}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot 2\right) + \sin \left(\frac{\mathsf{fma}\left(-angle\_m, \mathsf{PI}\left(\right), t\_1\right)}{-180}\right)\right) + \left(\sin \left(t\_1 \cdot 0.011111111111111112\right) + \sin 0\right)}{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left({t\_0}^{2} \cdot \left(t\_0 \cdot \frac{angle\_m}{180}\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (cbrt (PI))) (t_1 (* (PI) angle_m)))
   (*
    angle_s
    (if (<= angle_m 3.4e+161)
      (*
       (+ a b)
       (* (- b a) (sin (* 2.0 (* angle_m (/ (cbrt (pow (PI) 3.0)) 180.0))))))
      (if (<= angle_m 3.2e+253)
        (*
         (+ a b)
         (*
          (- b a)
          (/
           (+
            (+
             (sin (* (* (PI) (/ angle_m 180.0)) 2.0))
             (sin (/ (fma (- angle_m) (PI) t_1) -180.0)))
            (+ (sin (* t_1 0.011111111111111112)) (sin 0.0)))
           2.0)))
        (*
         (+ a b)
         (*
          (- b a)
          (sin (* 2.0 (* (pow t_0 2.0) (* t_0 (/ angle_m 180.0))))))))))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \sqrt[3]{\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.4 \cdot 10^{+161}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle\_m \cdot \frac{\sqrt[3]{{\mathsf{PI}\left(\right)}^{3}}}{180}\right)\right)\right)\\

\mathbf{elif}\;angle\_m \leq 3.2 \cdot 10^{+253}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot 2\right) + \sin \left(\frac{\mathsf{fma}\left(-angle\_m, \mathsf{PI}\left(\right), t\_1\right)}{-180}\right)\right) + \left(\sin \left(t\_1 \cdot 0.011111111111111112\right) + \sin 0\right)}{2}\right)\\

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


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

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.39999999999999993e161 < angle < 3.2000000000000003e253

    1. Initial program 36.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot 2\right) + \sin \left(\frac{\mathsf{fma}\left(-angle, \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot angle\right)}{-180}\right)\right) + \left(\sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot angle\right) \cdot 0.011111111111111112\right) + \sin \left(\frac{\mathsf{fma}\left(-angle, \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot angle\right)}{-180}\right)\right)}{2}\right) \]
    8. Applied rewrites58.0%

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot 2\right) + \sin \left(\frac{\mathsf{fma}\left(-angle, \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot angle\right)}{-180}\right)\right) + \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right) + \sin \left(\frac{-1}{180} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)\right)} + angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{2}\right) \]
      4. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot 2\right) + \sin \left(\frac{\mathsf{fma}\left(-angle, \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot angle\right)}{-180}\right)\right) + \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right) + \sin \left(\frac{-1}{180} \cdot \left(\color{blue}{0} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)}{2}\right) \]
      8. mul0-lftN/A

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot 2\right) + \sin \left(\frac{\mathsf{fma}\left(-angle, \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot angle\right)}{-180}\right)\right) + \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right) + \sin \left(\frac{-1}{180} \cdot \color{blue}{0}\right)\right)}{2}\right) \]
      9. metadata-eval53.0

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot 2\right) + \sin \left(\frac{\mathsf{fma}\left(-angle, \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot angle\right)}{-180}\right)\right) + \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.011111111111111112\right) + \sin \color{blue}{0}\right)}{2}\right) \]
    11. Applied rewrites53.0%

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

    if 3.2000000000000003e253 < angle

    1. Initial program 12.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt[3]{\mathsf{PI}\left(\right)}\\
t_1 := \mathsf{PI}\left(\right) \cdot angle\_m\\
t_2 := \sqrt{\mathsf{PI}\left(\right)}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 3.2 \cdot 10^{+253}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot 2\right) + \sin \left(\frac{\mathsf{fma}\left(t\_2 \cdot angle\_m, t\_2, \mathsf{PI}\left(\right) \cdot \left(-angle\_m\right)\right)}{-180}\right)\right) + \left(\sin \left(t\_1 \cdot 0.011111111111111112\right) + \sin \left(\frac{\mathsf{fma}\left(-angle\_m, \mathsf{PI}\left(\right), t\_1\right)}{-180}\right)\right)}{2}\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 3.2000000000000003e253

    1. Initial program 55.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.2000000000000003e253 < angle

    1. Initial program 12.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.8% 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 := \mathsf{PI}\left(\right) \cdot angle\_m\\ t_1 := \sin \left(\frac{\mathsf{fma}\left(-angle\_m, \mathsf{PI}\left(\right), t\_0\right)}{-180}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 2 \cdot 10^{+210}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right) + t\_1\right) + \left(\sin \left(t\_0 \cdot 0.011111111111111112\right) + t\_1\right)}{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* (PI) angle_m))
        (t_1 (sin (/ (fma (- angle_m) (PI) t_0) -180.0))))
   (*
    angle_s
    (if (<= a 2e+210)
      (*
       (+ a b)
       (*
        (- b a)
        (/
         (+
          (+ (sin (* (* (PI) 0.011111111111111112) angle_m)) t_1)
          (+ (sin (* t_0 0.011111111111111112)) t_1))
         2.0)))
      (*
       (+ a b)
       (*
        (- b a)
        (*
         (fma
          (* -2.2862368541380886e-7 (* angle_m angle_m))
          (pow (PI) 3.0)
          (* 0.011111111111111112 (PI)))
         angle_m)))))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{else}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.99999999999999985e210

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999985e210 < a

    1. Initial program 40.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.8% 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 := \mathsf{PI}\left(\right) \cdot angle\_m\\ t_1 := \sin \left(\frac{\mathsf{fma}\left(-angle\_m, \mathsf{PI}\left(\right), t\_0\right)}{-180}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 6 \cdot 10^{+207}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) + t\_1\right) + \left(\sin \left(t\_0 \cdot 0.011111111111111112\right) + t\_1\right)}{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* (PI) angle_m))
        (t_1 (sin (/ (fma (- angle_m) (PI) t_0) -180.0))))
   (*
    angle_s
    (if (<= a 6e+207)
      (*
       (+ a b)
       (*
        (- b a)
        (/
         (+
          (+ (sin (* (* 0.011111111111111112 angle_m) (PI))) t_1)
          (+ (sin (* t_0 0.011111111111111112)) t_1))
         2.0)))
      (*
       (+ a b)
       (*
        (- b a)
        (*
         (fma
          (* -2.2862368541380886e-7 (* angle_m angle_m))
          (pow (PI) 3.0)
          (* 0.011111111111111112 (PI)))
         angle_m)))))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{else}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 5.99999999999999966e207

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.99999999999999966e207 < a

    1. Initial program 37.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.9% 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 := \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot 2\right)\\ t_1 := \sqrt[3]{\mathsf{PI}\left(\right)}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 4.6 \cdot 10^{+45}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(t\_0 + \sin \left(\frac{\mathsf{fma}\left(-angle\_m, \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot angle\_m\right)}{-180}\right)\right) + \left(t\_0 + \sin 0\right)}{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle\_m \cdot \frac{{t\_1}^{2} \cdot t\_1}{180}\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (sin (* (* (PI) (/ angle_m 180.0)) 2.0))) (t_1 (cbrt (PI))))
   (*
    angle_s
    (if (<= angle_m 4.6e+45)
      (*
       (+ a b)
       (*
        (- b a)
        (/
         (+
          (+ t_0 (sin (/ (fma (- angle_m) (PI) (* (PI) angle_m)) -180.0)))
          (+ t_0 (sin 0.0)))
         2.0)))
      (*
       (+ a b)
       (*
        (- b a)
        (sin (* 2.0 (* angle_m (/ (* (pow t_1 2.0) t_1) 180.0))))))))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot 2\right)\\
t_1 := \sqrt[3]{\mathsf{PI}\left(\right)}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 4.6 \cdot 10^{+45}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(t\_0 + \sin \left(\frac{\mathsf{fma}\left(-angle\_m, \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot angle\_m\right)}{-180}\right)\right) + \left(t\_0 + \sin 0\right)}{2}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle\_m \cdot \frac{{t\_1}^{2} \cdot t\_1}{180}\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 4.60000000000000025e45

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \frac{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot 2\right) + \sin \left(\frac{\mathsf{fma}\left(-angle, \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot angle\right)}{-180}\right)\right) + \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot 2\right) + \sin \left(\frac{-1}{180} \cdot \color{blue}{0}\right)\right)}{2}\right) \]
      9. metadata-eval78.1

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

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

    if 4.60000000000000025e45 < angle

    1. Initial program 24.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\\
\begin{array}{l}
t_0 := \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -1 \cdot 10^{-237}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(-a\right) \cdot t\_0\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a + b\right) \cdot \left(t\_0 \cdot b\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -9.9999999999999999e-238

    1. Initial program 53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.2% 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}\;a \leq 2 \cdot 10^{+210}:\\ \;\;\;\;\left(\left(-2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle\_m, 0.5\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(a + b\right)\right) \cdot \left(a - b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\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 2e+210)
    (*
     (*
      (*
       -2.0
       (*
        (sin (* 0.005555555555555556 (* angle_m (PI))))
        (sin (* (fma 0.005555555555555556 angle_m 0.5) (PI)))))
      (+ a b))
     (- a b))
    (*
     (+ a b)
     (*
      (- b a)
      (*
       (fma
        (* -2.2862368541380886e-7 (* angle_m angle_m))
        (pow (PI) 3.0)
        (* 0.011111111111111112 (PI)))
       angle_m))))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 2 \cdot 10^{+210}:\\
\;\;\;\;\left(\left(-2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle\_m, 0.5\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(a + b\right)\right) \cdot \left(a - b\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.99999999999999985e210

    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-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-*.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. *-commutativeN/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}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \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(\frac{angle}{180}, \mathsf{PI}\left(\right), \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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\color{blue}{\mathsf{PI}\left(\right)}}{2}\right)\right) \]
      8. lower-/.f6456.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(\frac{angle}{180}, \mathsf{PI}\left(\right), \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right) \]
    4. Applied rewrites56.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(\frac{angle}{180}, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \]
    5. Taylor expanded in a around 0

      \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + 2 \cdot \left({b}^{2} \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

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

        \[\leadsto \left(-2 \cdot {a}^{2}\right) \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) + \color{blue}{\left(2 \cdot {b}^{2}\right) \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      3. distribute-rgt-outN/A

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

        \[\leadsto \color{blue}{\left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(-2 \cdot {a}^{2} + 2 \cdot {b}^{2}\right)} \]
    7. Applied rewrites56.5%

      \[\leadsto \color{blue}{\left(\sin \left(\mathsf{PI}\left(\right) \cdot \mathsf{fma}\left(0.005555555555555556, angle, 0.5\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)\right) \cdot \left(-2 \cdot \left(a \cdot a - b \cdot b\right)\right)} \]
    8. Step-by-step derivation
      1. Applied rewrites68.8%

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

      if 1.99999999999999985e210 < a

      1. Initial program 40.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 58.8% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 57.6% accurate, 1.9× speedup?

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

            1. Initial program 53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 10: 67.0% accurate, 2.7× speedup?

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

                    1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 6.0000000000000005e-44 < a < 7.09999999999999969e171

                    1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 7.09999999999999969e171 < a

                    1. Initial program 32.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 11: 67.3% accurate, 2.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 7.09999999999999969e171 < a

                    1. Initial program 32.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 12: 67.3% accurate, 3.0× speedup?

                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 5 \cdot 10^{+170}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 2}{180}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\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+170)
                      (* (+ a b) (* (- b a) (sin (/ (* (* (PI) angle_m) 2.0) 180.0))))
                      (*
                       (+ a b)
                       (*
                        (- b a)
                        (*
                         (fma
                          (* -2.2862368541380886e-7 (* angle_m angle_m))
                          (pow (PI) 3.0)
                          (* 0.011111111111111112 (PI)))
                         angle_m))))))
                  \begin{array}{l}
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \begin{array}{l}
                  \mathbf{if}\;a \leq 5 \cdot 10^{+170}:\\
                  \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 2}{180}\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), {\mathsf{PI}\left(\right)}^{3}, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if a < 4.99999999999999977e170

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 4.99999999999999977e170 < a

                    1. Initial program 32.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 13: 67.5% accurate, 3.3× speedup?

                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 2}{180}\right)\right)\right) \end{array} \]
                  angle\_m = (fabs.f64 angle)
                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                  (FPCore (angle_s a b angle_m)
                   :precision binary64
                   (* angle_s (* (+ a b) (* (- b a) (sin (/ (* (* (PI) angle_m) 2.0) 180.0))))))
                  \begin{array}{l}
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 2}{180}\right)\right)\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 14: 67.6% accurate, 3.3× speedup?

                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle\_m \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right) \end{array} \]
                  angle\_m = (fabs.f64 angle)
                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                  (FPCore (angle_s a b angle_m)
                   :precision binary64
                   (* angle_s (* (+ a b) (* (- b a) (sin (* 2.0 (* angle_m (/ (PI) 180.0))))))))
                  \begin{array}{l}
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle\_m \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 15: 64.5% accurate, 3.3× speedup?

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

                    1. Initial program 60.8%

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                      9. difference-of-squaresN/A

                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                      10. lower-*.f64N/A

                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                      11. lower-+.f64N/A

                        \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                      12. lower--.f6460.5

                        \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                    5. Applied rewrites60.5%

                      \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                    6. Step-by-step derivation
                      1. Applied rewrites71.0%

                        \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)} \]

                      if 0.0140000000000000003 < angle < 6.80000000000000011e37

                      1. Initial program 53.3%

                        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                        2. lift-*.f64N/A

                          \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                        3. associate-*l*N/A

                          \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
                        4. lift-*.f64N/A

                          \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
                        5. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
                        6. associate-*r*N/A

                          \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
                        7. lift--.f64N/A

                          \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        8. lift-pow.f64N/A

                          \[\leadsto \left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        9. unpow2N/A

                          \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        10. lift-pow.f64N/A

                          \[\leadsto \left(b \cdot b - \color{blue}{{a}^{2}}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        11. unpow2N/A

                          \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        12. difference-of-squaresN/A

                          \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        13. lift-sin.f64N/A

                          \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        14. lift-cos.f64N/A

                          \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right)\right) \]
                      4. Applied rewrites53.3%

                        \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
                      5. Taylor expanded in a around 0

                        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(b \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
                      6. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right)} \]
                        3. lower-sin.f64N/A

                          \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot b\right) \]
                        4. *-commutativeN/A

                          \[\leadsto \left(a + b\right) \cdot \left(\sin \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)} \cdot b\right) \]
                        5. lower-*.f64N/A

                          \[\leadsto \left(a + b\right) \cdot \left(\sin \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)} \cdot b\right) \]
                        6. *-commutativeN/A

                          \[\leadsto \left(a + b\right) \cdot \left(\sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \cdot b\right) \]
                        7. lower-*.f64N/A

                          \[\leadsto \left(a + b\right) \cdot \left(\sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \cdot b\right) \]
                        8. lower-PI.f6447.9

                          \[\leadsto \left(a + b\right) \cdot \left(\sin \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot angle\right) \cdot 0.011111111111111112\right) \cdot b\right) \]
                      7. Applied rewrites47.9%

                        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot b\right)} \]

                      if 6.80000000000000011e37 < angle

                      1. Initial program 24.4%

                        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                      2. Add Preprocessing
                      3. Taylor expanded in angle around 0

                        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                      4. Step-by-step derivation
                        1. associate-*r*N/A

                          \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                        2. associate-*r*N/A

                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                        3. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                        4. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                        5. lower-*.f64N/A

                          \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                        6. lower-PI.f64N/A

                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                        7. unpow2N/A

                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                        8. unpow2N/A

                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                        9. difference-of-squaresN/A

                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                        10. lower-*.f64N/A

                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                        11. lower-+.f64N/A

                          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                        12. lower--.f6431.2

                          \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                      5. Applied rewrites31.2%

                        \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                      6. Step-by-step derivation
                        1. Applied rewrites33.2%

                          \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right)} \]
                      7. Recombined 3 regimes into one program.
                      8. Add Preprocessing

                      Alternative 16: 67.3% accurate, 3.3× speedup?

                      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle\_m}{180} \cdot \left(\mathsf{PI}\left(\right) + \mathsf{PI}\left(\right)\right)\right)\right)\right) \end{array} \]
                      angle\_m = (fabs.f64 angle)
                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                      (FPCore (angle_s a b angle_m)
                       :precision binary64
                       (* angle_s (* (+ a b) (* (- b a) (sin (* (/ angle_m 180.0) (+ (PI) (PI))))))))
                      \begin{array}{l}
                      angle\_m = \left|angle\right|
                      \\
                      angle\_s = \mathsf{copysign}\left(1, angle\right)
                      
                      \\
                      angle\_s \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle\_m}{180} \cdot \left(\mathsf{PI}\left(\right) + \mathsf{PI}\left(\right)\right)\right)\right)\right)
                      \end{array}
                      
                      Derivation
                      1. Initial program 53.4%

                        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                        2. lift-*.f64N/A

                          \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                        3. associate-*l*N/A

                          \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
                        4. lift-*.f64N/A

                          \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
                        5. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
                        6. associate-*r*N/A

                          \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
                        7. lift--.f64N/A

                          \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        8. lift-pow.f64N/A

                          \[\leadsto \left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        9. unpow2N/A

                          \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        10. lift-pow.f64N/A

                          \[\leadsto \left(b \cdot b - \color{blue}{{a}^{2}}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        11. unpow2N/A

                          \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        12. difference-of-squaresN/A

                          \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        13. lift-sin.f64N/A

                          \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                        14. lift-cos.f64N/A

                          \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right)\right) \]
                      4. Applied rewrites68.2%

                        \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
                      5. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(2 \cdot \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                        2. count-2-revN/A

                          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right) + \frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                        3. lift-*.f64N/A

                          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)} + \frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \]
                        4. lift-*.f64N/A

                          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right) + \color{blue}{\frac{angle}{180} \cdot \mathsf{PI}\left(\right)}\right)\right) \]
                        5. distribute-lft-outN/A

                          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{angle}{180} \cdot \left(\mathsf{PI}\left(\right) + \mathsf{PI}\left(\right)\right)\right)}\right) \]
                        6. lower-*.f64N/A

                          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{angle}{180} \cdot \left(\mathsf{PI}\left(\right) + \mathsf{PI}\left(\right)\right)\right)}\right) \]
                        7. lower-+.f6468.2

                          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle}{180} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) + \mathsf{PI}\left(\right)\right)}\right)\right) \]
                      6. Applied rewrites68.2%

                        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{angle}{180} \cdot \left(\mathsf{PI}\left(\right) + \mathsf{PI}\left(\right)\right)\right)}\right) \]
                      7. Add Preprocessing

                      Alternative 17: 64.4% accurate, 12.9× speedup?

                      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 0.047:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right)\\ \end{array} \end{array} \]
                      angle\_m = (fabs.f64 angle)
                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                      (FPCore (angle_s a b angle_m)
                       :precision binary64
                       (*
                        angle_s
                        (if (<= angle_m 0.047)
                          (* (- b a) (* (+ b a) (* (* 0.011111111111111112 angle_m) (PI))))
                          (* 0.011111111111111112 (* (* (PI) angle_m) (fma (- a) a (* b b)))))))
                      \begin{array}{l}
                      angle\_m = \left|angle\right|
                      \\
                      angle\_s = \mathsf{copysign}\left(1, angle\right)
                      
                      \\
                      angle\_s \cdot \begin{array}{l}
                      \mathbf{if}\;angle\_m \leq 0.047:\\
                      \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;0.011111111111111112 \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if angle < 0.047

                        1. Initial program 60.8%

                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                        2. Add Preprocessing
                        3. Taylor expanded in angle around 0

                          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                        4. Step-by-step derivation
                          1. associate-*r*N/A

                            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                          2. associate-*r*N/A

                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                          3. lower-*.f64N/A

                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                          4. lower-*.f64N/A

                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                          5. lower-*.f64N/A

                            \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                          6. lower-PI.f64N/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                          7. unpow2N/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                          8. unpow2N/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                          9. difference-of-squaresN/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                          10. lower-*.f64N/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                          11. lower-+.f64N/A

                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                          12. lower--.f6460.5

                            \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                        5. Applied rewrites60.5%

                          \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                        6. Step-by-step derivation
                          1. Applied rewrites71.0%

                            \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)} \]

                          if 0.047 < angle

                          1. Initial program 27.0%

                            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                          2. Add Preprocessing
                          3. Taylor expanded in angle around 0

                            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                          4. Step-by-step derivation
                            1. associate-*r*N/A

                              \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                            2. associate-*r*N/A

                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                            3. lower-*.f64N/A

                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                            4. lower-*.f64N/A

                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                            5. lower-*.f64N/A

                              \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                            6. lower-PI.f64N/A

                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                            7. unpow2N/A

                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                            8. unpow2N/A

                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                            9. difference-of-squaresN/A

                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                            10. lower-*.f64N/A

                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                            11. lower-+.f64N/A

                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                            12. lower--.f6432.2

                              \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                          5. Applied rewrites32.2%

                            \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                          6. Step-by-step derivation
                            1. Applied rewrites34.0%

                              \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right)} \]
                          7. Recombined 2 regimes into one program.
                          8. Add Preprocessing

                          Alternative 18: 64.3% 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.4 \cdot 10^{-35}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
                          angle\_m = (fabs.f64 angle)
                          angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                          (FPCore (angle_s a b angle_m)
                           :precision binary64
                           (*
                            angle_s
                            (if (<= angle_m 2.4e-35)
                              (* (- b a) (* (+ b a) (* (* 0.011111111111111112 angle_m) (PI))))
                              (* (* (* (* (PI) (+ a b)) (- b a)) angle_m) 0.011111111111111112))))
                          \begin{array}{l}
                          angle\_m = \left|angle\right|
                          \\
                          angle\_s = \mathsf{copysign}\left(1, angle\right)
                          
                          \\
                          angle\_s \cdot \begin{array}{l}
                          \mathbf{if}\;angle\_m \leq 2.4 \cdot 10^{-35}:\\
                          \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if angle < 2.4000000000000001e-35

                            1. Initial program 59.3%

                              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in angle around 0

                              \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                            4. Step-by-step derivation
                              1. associate-*r*N/A

                                \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                              2. associate-*r*N/A

                                \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                              3. lower-*.f64N/A

                                \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                              4. lower-*.f64N/A

                                \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                              5. lower-*.f64N/A

                                \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                              6. lower-PI.f64N/A

                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                              7. unpow2N/A

                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                              8. unpow2N/A

                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                              9. difference-of-squaresN/A

                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                              10. lower-*.f64N/A

                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                              11. lower-+.f64N/A

                                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                              12. lower--.f6458.4

                                \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                            5. Applied rewrites58.4%

                              \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                            6. Step-by-step derivation
                              1. Applied rewrites69.5%

                                \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)} \]

                              if 2.4000000000000001e-35 < angle

                              1. Initial program 36.5%

                                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                              2. Add Preprocessing
                              3. Taylor expanded in angle around 0

                                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                              4. Step-by-step derivation
                                1. associate-*r*N/A

                                  \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                2. associate-*r*N/A

                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                3. lower-*.f64N/A

                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                4. lower-*.f64N/A

                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                5. lower-*.f64N/A

                                  \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                6. lower-PI.f64N/A

                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                7. unpow2N/A

                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                8. unpow2N/A

                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                9. difference-of-squaresN/A

                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                10. lower-*.f64N/A

                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                11. lower-+.f64N/A

                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                12. lower--.f6442.5

                                  \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                              5. Applied rewrites42.5%

                                \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                              6. Taylor expanded in a around inf

                                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                              7. Step-by-step derivation
                                1. Applied rewrites26.4%

                                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
                                2. Step-by-step derivation
                                  1. Applied rewrites20.8%

                                    \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                                  2. 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)} \]
                                  3. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
                                    2. unpow2N/A

                                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - \color{blue}{a \cdot a}\right)\right)\right) \cdot \frac{1}{90} \]
                                    3. fp-cancel-sub-sign-invN/A

                                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} + \left(\mathsf{neg}\left(a\right)\right) \cdot a\right)}\right)\right) \cdot \frac{1}{90} \]
                                    4. distribute-lft-neg-inN/A

                                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} + \color{blue}{\left(\mathsf{neg}\left(a \cdot a\right)\right)}\right)\right)\right) \cdot \frac{1}{90} \]
                                    5. unpow2N/A

                                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} + \left(\mathsf{neg}\left(\color{blue}{{a}^{2}}\right)\right)\right)\right)\right) \cdot \frac{1}{90} \]
                                    6. mul-1-negN/A

                                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} + \color{blue}{-1 \cdot {a}^{2}}\right)\right)\right) \cdot \frac{1}{90} \]
                                    7. +-commutativeN/A

                                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(-1 \cdot {a}^{2} + {b}^{2}\right)}\right)\right) \cdot \frac{1}{90} \]
                                    8. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(-1 \cdot {a}^{2} + {b}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
                                  4. Applied rewrites42.5%

                                    \[\leadsto \color{blue}{\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot angle\right) \cdot 0.011111111111111112} \]
                                3. Recombined 2 regimes into one program.
                                4. Add Preprocessing

                                Alternative 19: 39.2% 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}\;angle\_m \leq 1.6 \cdot 10^{-78}:\\ \;\;\;\;\left(a \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\ \end{array} \end{array} \]
                                angle\_m = (fabs.f64 angle)
                                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                (FPCore (angle_s a b angle_m)
                                 :precision binary64
                                 (*
                                  angle_s
                                  (if (<= angle_m 1.6e-78)
                                    (* (* a angle_m) (* (PI) (* -0.011111111111111112 a)))
                                    (* (* -0.011111111111111112 (* a a)) (* (PI) angle_m)))))
                                \begin{array}{l}
                                angle\_m = \left|angle\right|
                                \\
                                angle\_s = \mathsf{copysign}\left(1, angle\right)
                                
                                \\
                                angle\_s \cdot \begin{array}{l}
                                \mathbf{if}\;angle\_m \leq 1.6 \cdot 10^{-78}:\\
                                \;\;\;\;\left(a \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if angle < 1.6e-78

                                  1. Initial program 56.8%

                                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in angle around 0

                                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                  4. Step-by-step derivation
                                    1. associate-*r*N/A

                                      \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                    2. associate-*r*N/A

                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                    3. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                    4. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                    5. lower-*.f64N/A

                                      \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                    6. lower-PI.f64N/A

                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                    7. unpow2N/A

                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                    8. unpow2N/A

                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                    9. difference-of-squaresN/A

                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                    10. lower-*.f64N/A

                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                    11. lower-+.f64N/A

                                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                    12. lower--.f6455.9

                                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                  5. Applied rewrites55.9%

                                    \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                  6. Taylor expanded in a around inf

                                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites38.6%

                                      \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites44.3%

                                        \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites44.3%

                                          \[\leadsto \left(a \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(-0.011111111111111112 \cdot a\right)}\right) \]

                                        if 1.6e-78 < angle

                                        1. Initial program 45.8%

                                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in angle around 0

                                          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                        4. Step-by-step derivation
                                          1. associate-*r*N/A

                                            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                          2. associate-*r*N/A

                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                          3. lower-*.f64N/A

                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                          4. lower-*.f64N/A

                                            \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                          5. lower-*.f64N/A

                                            \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                          6. lower-PI.f64N/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                          7. unpow2N/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                          8. unpow2N/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                          9. difference-of-squaresN/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                          10. lower-*.f64N/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                          11. lower-+.f64N/A

                                            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                          12. lower--.f6450.8

                                            \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                        5. Applied rewrites50.8%

                                          \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                        6. Taylor expanded in a around inf

                                          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites29.7%

                                            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
                                        8. Recombined 2 regimes into one program.
                                        9. Add Preprocessing

                                        Alternative 20: 39.0% 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}\;angle\_m \leq 2.5 \cdot 10^{-103}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\ \end{array} \end{array} \]
                                        angle\_m = (fabs.f64 angle)
                                        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                        (FPCore (angle_s a b angle_m)
                                         :precision binary64
                                         (*
                                          angle_s
                                          (if (<= angle_m 2.5e-103)
                                            (* (* -0.011111111111111112 a) (* a (* angle_m (PI))))
                                            (* (* -0.011111111111111112 (* a a)) (* (PI) angle_m)))))
                                        \begin{array}{l}
                                        angle\_m = \left|angle\right|
                                        \\
                                        angle\_s = \mathsf{copysign}\left(1, angle\right)
                                        
                                        \\
                                        angle\_s \cdot \begin{array}{l}
                                        \mathbf{if}\;angle\_m \leq 2.5 \cdot 10^{-103}:\\
                                        \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if angle < 2.49999999999999983e-103

                                          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. associate-*r*N/A

                                              \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                            2. associate-*r*N/A

                                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                            3. lower-*.f64N/A

                                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                            4. lower-*.f64N/A

                                              \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                            5. lower-*.f64N/A

                                              \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                            6. lower-PI.f64N/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                            7. unpow2N/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                            8. unpow2N/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                            9. difference-of-squaresN/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                            10. lower-*.f64N/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                            11. lower-+.f64N/A

                                              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                            12. lower--.f6455.7

                                              \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                          5. Applied rewrites55.7%

                                            \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                          6. Taylor expanded in a around inf

                                            \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites38.2%

                                              \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites44.0%

                                                \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]

                                              if 2.49999999999999983e-103 < angle

                                              1. Initial program 46.5%

                                                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in angle around 0

                                                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                              4. Step-by-step derivation
                                                1. associate-*r*N/A

                                                  \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                2. associate-*r*N/A

                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                3. lower-*.f64N/A

                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                4. lower-*.f64N/A

                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                5. lower-*.f64N/A

                                                  \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                6. lower-PI.f64N/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                7. unpow2N/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                8. unpow2N/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                9. difference-of-squaresN/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                10. lower-*.f64N/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                11. lower-+.f64N/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                12. lower--.f6451.4

                                                  \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                              5. Applied rewrites51.4%

                                                \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                              6. Taylor expanded in a around inf

                                                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites30.6%

                                                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
                                              8. Recombined 2 regimes into one program.
                                              9. Add Preprocessing

                                              Alternative 21: 38.0% accurate, 21.6× speedup?

                                              \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right) \end{array} \]
                                              angle\_m = (fabs.f64 angle)
                                              angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                              (FPCore (angle_s a b angle_m)
                                               :precision binary64
                                               (* angle_s (* (* -0.011111111111111112 a) (* a (* angle_m (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(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right)
                                              \end{array}
                                              
                                              Derivation
                                              1. Initial program 53.4%

                                                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in angle around 0

                                                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                              4. Step-by-step derivation
                                                1. associate-*r*N/A

                                                  \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                2. associate-*r*N/A

                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                3. lower-*.f64N/A

                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                4. lower-*.f64N/A

                                                  \[\leadsto \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                5. lower-*.f64N/A

                                                  \[\leadsto \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                6. lower-PI.f64N/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                7. unpow2N/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                8. unpow2N/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                9. difference-of-squaresN/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                10. lower-*.f64N/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                11. lower-+.f64N/A

                                                  \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                12. lower--.f6454.3

                                                  \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                              5. Applied rewrites54.3%

                                                \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                              6. Taylor expanded in a around inf

                                                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites35.8%

                                                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \]
                                                2. Step-by-step derivation
                                                  1. Applied rewrites38.3%

                                                    \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                                                  2. Add Preprocessing

                                                  Reproduce

                                                  ?
                                                  herbie shell --seed 2024359 
                                                  (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)))))