ab-angle->ABCF B

Percentage Accurate: 53.6% → 66.7%
Time: 10.8s
Alternatives: 18
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 18 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 66.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\\ \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+268}:\\ \;\;\;\;\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), t\_0, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle}{180} \cdot \sqrt[3]{t\_0}\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (* (PI) (PI)) (PI))))
   (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -5e+268)
     (*
      (+ a b)
      (*
       (- b a)
       (*
        (fma
         (* -2.2862368541380886e-7 (* angle angle))
         t_0
         (* 0.011111111111111112 (PI)))
        angle)))
     (* (+ a b) (* (- b a) (sin (* 2.0 (* (/ angle 180.0) (cbrt t_0)))))))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\\
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+268}:\\
\;\;\;\;\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), t\_0, 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle}{180} \cdot \sqrt[3]{t\_0}\right)\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)))) < -5.0000000000000002e268

    1. Initial program 45.6%

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

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

      \[\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) \]
    8. Step-by-step derivation
      1. Applied rewrites83.9%

        \[\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]

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

      1. Initial program 62.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 rewrites70.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-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 66.2% accurate, 1.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\mathsf{PI}\left(\right)}\\ \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+268}:\\ \;\;\;\;\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle}{180} \cdot \left(t\_0 \cdot t\_0\right)\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (let* ((t_0 (sqrt (PI))))
       (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -5e+268)
         (*
          (+ a b)
          (*
           (- b a)
           (*
            (fma
             (* -2.2862368541380886e-7 (* angle angle))
             (* (* (PI) (PI)) (PI))
             (* 0.011111111111111112 (PI)))
            angle)))
         (* (+ a b) (* (- b a) (sin (* 2.0 (* (/ angle 180.0) (* t_0 t_0)))))))))
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
    \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+268}:\\
    \;\;\;\;\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle}{180} \cdot \left(t\_0 \cdot t\_0\right)\right)\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)))) < -5.0000000000000002e268

      1. Initial program 45.6%

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

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

        \[\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) \]
      8. Step-by-step derivation
        1. Applied rewrites83.9%

          \[\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]

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

        1. Initial program 62.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 rewrites70.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-PI.f64N/A

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

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

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

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

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle}{180} \cdot \left(\color{blue}{\sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\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(\frac{angle}{180} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right) \]
          7. lower-sqrt.f6474.9

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

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

      Alternative 3: 65.5% accurate, 1.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{+32}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle}{180} \cdot \left(\mathsf{PI}\left(\right) + \mathsf{PI}\left(\right)\right)\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 \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\ \end{array} \end{array} \]
      (FPCore (a b angle)
       :precision binary64
       (if (<= (pow a 2.0) 2e+32)
         (* (+ a b) (* (- b a) (sin (* (/ angle 180.0) (+ (PI) (PI))))))
         (*
          (+ a b)
          (*
           (- b a)
           (*
            (fma
             (* -2.2862368541380886e-7 (* angle angle))
             (* (* (PI) (PI)) (PI))
             (* 0.011111111111111112 (PI)))
            angle)))))
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{+32}:\\
      \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle}{180} \cdot \left(\mathsf{PI}\left(\right) + \mathsf{PI}\left(\right)\right)\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 \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (pow.f64 a #s(literal 2 binary64)) < 2.00000000000000011e32

        1. Initial program 66.7%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. 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 rewrites73.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. 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-+.f6473.1

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

          \[\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) \]

        if 2.00000000000000011e32 < (pow.f64 a #s(literal 2 binary64))

        1. Initial program 50.2%

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

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

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

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

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

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

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

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

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

        Alternative 4: 57.1% accurate, 1.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{-299}:\\ \;\;\;\;\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
        (FPCore (a b angle)
         :precision binary64
         (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -4e-299)
           (* (* (* angle (PI)) (* -0.011111111111111112 a)) a)
           (* (* (* (PI) (* b b)) angle) 0.011111111111111112)))
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{-299}:\\
        \;\;\;\;\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right) \cdot a\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\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)))) < -3.99999999999999997e-299

          1. Initial program 55.0%

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

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

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

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

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

              1. Initial program 61.9%

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

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

                  \[\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 5: 64.7% accurate, 2.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 5 \cdot 10^{-303}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot 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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\ \end{array} \end{array} \]
              (FPCore (a b angle)
               :precision binary64
               (if (<= (pow a 2.0) 5e-303)
                 (* (+ a b) (* (sin (* (* (PI) angle) 0.011111111111111112)) b))
                 (*
                  (+ a b)
                  (*
                   (- b a)
                   (*
                    (fma
                     (* -2.2862368541380886e-7 (* angle angle))
                     (* (* (PI) (PI)) (PI))
                     (* 0.011111111111111112 (PI)))
                    angle)))))
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;{a}^{2} \leq 5 \cdot 10^{-303}:\\
              \;\;\;\;\left(a + b\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot 0.011111111111111112\right) \cdot 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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (pow.f64 a #s(literal 2 binary64)) < 4.9999999999999998e-303

                1. Initial program 71.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 rewrites76.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. 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.f6478.0

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

                  \[\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 4.9999999999999998e-303 < (pow.f64 a #s(literal 2 binary64))

                1. Initial program 54.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 rewrites69.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. 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.f6472.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 rewrites72.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) \]
                8. Step-by-step derivation
                  1. Applied rewrites72.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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                9. Recombined 2 regimes into one program.
                10. Add Preprocessing

                Alternative 6: 67.4% accurate, 3.1× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 1.35 \cdot 10^{+233}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-\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)\\ \end{array} \end{array} \]
                (FPCore (a b angle)
                 :precision binary64
                 (if (<= angle 1.35e+233)
                   (* (+ a b) (* (- b a) (sin (* 2.0 (* angle (/ (PI) 180.0))))))
                   (- (* (+ a b) (* (- b a) (sin (* 2.0 (* (/ angle 180.0) (PI)))))))))
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;angle \leq 1.35 \cdot 10^{+233}:\\
                \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;-\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)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if angle < 1.35000000000000004e233

                  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. 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 rewrites74.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-/.f6477.3

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

                    \[\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) \]

                  if 1.35000000000000004e233 < angle

                  1. Initial program 23.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 rewrites23.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-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 1.35 \cdot 10^{+233}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-\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)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 7: 66.7% accurate, 3.1× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 8.2 \cdot 10^{+26}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\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 \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\ \end{array} \end{array} \]
                (FPCore (a b angle)
                 :precision binary64
                 (if (<= a 8.2e+26)
                   (* (+ a b) (* (- b a) (sin (* 2.0 (* angle (/ (PI) 180.0))))))
                   (*
                    (+ a b)
                    (*
                     (- b a)
                     (*
                      (fma
                       (* -2.2862368541380886e-7 (* angle angle))
                       (* (* (PI) (PI)) (PI))
                       (* 0.011111111111111112 (PI)))
                      angle)))))
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;a \leq 8.2 \cdot 10^{+26}:\\
                \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\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 \cdot angle\right), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if a < 8.19999999999999967e26

                  1. Initial program 62.7%

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

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

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

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

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

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

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

                    \[\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) \]

                  if 8.19999999999999967e26 < a

                  1. Initial program 46.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 rewrites65.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. 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.f6477.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 rewrites77.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) \]
                  8. Step-by-step derivation
                    1. Applied rewrites77.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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]
                  9. Recombined 2 regimes into one program.
                  10. Add Preprocessing

                  Alternative 8: 62.4% accurate, 5.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\\ \mathbf{if}\;angle \leq 7.2 \cdot 10^{+42}:\\ \;\;\;\;\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\ \mathbf{elif}\;angle \leq 2.7 \cdot 10^{+70}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot angle, \mathsf{PI}\left(\right), \frac{-0.011111111111111112 \cdot \frac{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle}{a}}{-a}\right) \cdot \left(a \cdot a\right)\\ \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 10^{+275}\right):\\ \;\;\;\;\left(t\_0 \cdot angle\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t\_0\right)\\ \end{array} \end{array} \]
                  (FPCore (a b angle)
                   :precision binary64
                   (let* ((t_0 (* (fma (- a) a (* b b)) (PI))))
                     (if (<= angle 7.2e+42)
                       (*
                        (+ a b)
                        (*
                         (- b a)
                         (*
                          (fma
                           (* -2.2862368541380886e-7 (* angle angle))
                           (* (* (PI) (PI)) (PI))
                           (* 0.011111111111111112 (PI)))
                          angle)))
                       (if (<= angle 2.7e+70)
                         (*
                          (fma
                           (* -0.011111111111111112 angle)
                           (PI)
                           (/ (* -0.011111111111111112 (/ (* (* (PI) (* b b)) angle) a)) (- a)))
                          (* a a))
                         (if (or (<= angle 1.85e+197) (not (<= angle 1e+275)))
                           (* (* t_0 angle) -0.011111111111111112)
                           (* 0.011111111111111112 (* angle t_0)))))))
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := \mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\\
                  \mathbf{if}\;angle \leq 7.2 \cdot 10^{+42}:\\
                  \;\;\;\;\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\
                  
                  \mathbf{elif}\;angle \leq 2.7 \cdot 10^{+70}:\\
                  \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot angle, \mathsf{PI}\left(\right), \frac{-0.011111111111111112 \cdot \frac{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle}{a}}{-a}\right) \cdot \left(a \cdot a\right)\\
                  
                  \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 10^{+275}\right):\\
                  \;\;\;\;\left(t\_0 \cdot angle\right) \cdot -0.011111111111111112\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t\_0\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 4 regimes
                  2. if angle < 7.2000000000000002e42

                    1. Initial program 66.2%

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

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

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

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

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

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

                      \[\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.f6479.4

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

                      \[\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) \]
                    8. Step-by-step derivation
                      1. Applied rewrites79.4%

                        \[\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]

                      if 7.2000000000000002e42 < angle < 2.7e70

                      1. Initial program 34.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--.f6459.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 rewrites59.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 {a}^{2} \cdot \color{blue}{\left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                      7. Applied rewrites59.2%

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

                      if 2.7e70 < angle < 1.8500000000000002e197 or 9.9999999999999996e274 < angle

                      1. Initial program 27.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 rewrites27.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. 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(\frac{angle}{180} \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
                        2. add-cbrt-cubeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 1.8500000000000002e197 < angle < 9.9999999999999996e274

                      1. Initial program 18.7%

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

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 7.2 \cdot 10^{+42}:\\ \;\;\;\;\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\ \mathbf{elif}\;angle \leq 2.7 \cdot 10^{+70}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot angle, \mathsf{PI}\left(\right), \frac{-0.011111111111111112 \cdot \frac{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle}{a}}{-a}\right) \cdot \left(a \cdot a\right)\\ \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 10^{+275}\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\ \end{array} \]
                      9. Add Preprocessing

                      Alternative 9: 62.6% accurate, 7.7× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\\ \mathbf{if}\;angle \leq 100:\\ \;\;\;\;\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\ \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 10^{+275}\right):\\ \;\;\;\;\left(t\_0 \cdot angle\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t\_0\right)\\ \end{array} \end{array} \]
                      (FPCore (a b angle)
                       :precision binary64
                       (let* ((t_0 (* (fma (- a) a (* b b)) (PI))))
                         (if (<= angle 100.0)
                           (*
                            (+ a b)
                            (*
                             (- b a)
                             (*
                              (fma
                               (* -2.2862368541380886e-7 (* angle angle))
                               (* (* (PI) (PI)) (PI))
                               (* 0.011111111111111112 (PI)))
                              angle)))
                           (if (or (<= angle 1.85e+197) (not (<= angle 1e+275)))
                             (* (* t_0 angle) -0.011111111111111112)
                             (* 0.011111111111111112 (* angle t_0))))))
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := \mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\\
                      \mathbf{if}\;angle \leq 100:\\
                      \;\;\;\;\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\
                      
                      \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 10^{+275}\right):\\
                      \;\;\;\;\left(t\_0 \cdot angle\right) \cdot -0.011111111111111112\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t\_0\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if angle < 100

                        1. Initial program 66.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 rewrites82.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.f6480.5

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

                          \[\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) \]
                        8. Step-by-step derivation
                          1. Applied rewrites80.5%

                            \[\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \]

                          if 100 < angle < 1.8500000000000002e197 or 9.9999999999999996e274 < angle

                          1. Initial program 31.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 rewrites31.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-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 1.8500000000000002e197 < angle < 9.9999999999999996e274

                          1. Initial program 18.7%

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

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

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 100:\\ \;\;\;\;\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), \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right)\\ \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 10^{+275}\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\ \end{array} \]
                          9. Add Preprocessing

                          Alternative 10: 62.9% accurate, 9.6× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\\ \mathbf{if}\;angle \leq 1000:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\ \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 10^{+275}\right):\\ \;\;\;\;\left(t\_0 \cdot angle\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t\_0\right)\\ \end{array} \end{array} \]
                          (FPCore (a b angle)
                           :precision binary64
                           (let* ((t_0 (* (fma (- a) a (* b b)) (PI))))
                             (if (<= angle 1000.0)
                               (* (+ a b) (* (* (* (- b a) (PI)) angle) 0.011111111111111112))
                               (if (or (<= angle 1.85e+197) (not (<= angle 1e+275)))
                                 (* (* t_0 angle) -0.011111111111111112)
                                 (* 0.011111111111111112 (* angle t_0))))))
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := \mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\\
                          \mathbf{if}\;angle \leq 1000:\\
                          \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
                          
                          \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 10^{+275}\right):\\
                          \;\;\;\;\left(t\_0 \cdot angle\right) \cdot -0.011111111111111112\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t\_0\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if angle < 1e3

                            1. Initial program 66.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 rewrites82.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 \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                            6. Step-by-step derivation
                              1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                            if 1e3 < angle < 1.8500000000000002e197 or 9.9999999999999996e274 < angle

                            1. Initial program 31.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 rewrites31.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-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.8500000000000002e197 < angle < 9.9999999999999996e274

                            1. Initial program 18.7%

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

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

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

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 1000:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\ \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 10^{+275}\right):\\ \;\;\;\;\left(\left(\mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\ \end{array} \]
                            9. Add Preprocessing

                            Alternative 11: 62.6% accurate, 9.6× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\\ \mathbf{if}\;angle \leq 1000:\\ \;\;\;\;\left(a + b\right) \cdot \left(t\_0 \cdot 0.011111111111111112\right)\\ \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 1.08 \cdot 10^{+290}\right):\\ \;\;\;\;\left(a + b\right) \cdot \left(t\_0 \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\ \end{array} \end{array} \]
                            (FPCore (a b angle)
                             :precision binary64
                             (let* ((t_0 (* (* (- b a) (PI)) angle)))
                               (if (<= angle 1000.0)
                                 (* (+ a b) (* t_0 0.011111111111111112))
                                 (if (or (<= angle 1.85e+197) (not (<= angle 1.08e+290)))
                                   (* (+ a b) (* t_0 -0.011111111111111112))
                                   (* 0.011111111111111112 (* angle (* (fma (- a) a (* b b)) (PI))))))))
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_0 := \left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\\
                            \mathbf{if}\;angle \leq 1000:\\
                            \;\;\;\;\left(a + b\right) \cdot \left(t\_0 \cdot 0.011111111111111112\right)\\
                            
                            \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 1.08 \cdot 10^{+290}\right):\\
                            \;\;\;\;\left(a + b\right) \cdot \left(t\_0 \cdot -0.011111111111111112\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if angle < 1e3

                              1. Initial program 66.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 rewrites82.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 \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                              6. Step-by-step derivation
                                1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                              if 1e3 < angle < 1.8500000000000002e197 or 1.08e290 < angle

                              1. Initial program 30.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 rewrites30.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-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.8500000000000002e197 < angle < 1.08e290

                              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--.f6451.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 rewrites51.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 rewrites51.5%

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 1000:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\ \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197} \lor \neg \left(angle \leq 1.08 \cdot 10^{+290}\right):\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\mathsf{fma}\left(-a, a, b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\ \end{array} \]
                              9. Add Preprocessing

                              Alternative 12: 62.1% accurate, 11.6× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\\ \mathbf{if}\;angle \leq 1000:\\ \;\;\;\;\left(a + b\right) \cdot \left(t\_0 \cdot 0.011111111111111112\right)\\ \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197}:\\ \;\;\;\;\left(a + b\right) \cdot \left(t\_0 \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
                              (FPCore (a b angle)
                               :precision binary64
                               (let* ((t_0 (* (* (- b a) (PI)) angle)))
                                 (if (<= angle 1000.0)
                                   (* (+ a b) (* t_0 0.011111111111111112))
                                   (if (<= angle 1.85e+197)
                                     (* (+ a b) (* t_0 -0.011111111111111112))
                                     (* (* (* (PI) (* b b)) angle) 0.011111111111111112)))))
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_0 := \left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\\
                              \mathbf{if}\;angle \leq 1000:\\
                              \;\;\;\;\left(a + b\right) \cdot \left(t\_0 \cdot 0.011111111111111112\right)\\
                              
                              \mathbf{elif}\;angle \leq 1.85 \cdot 10^{+197}:\\
                              \;\;\;\;\left(a + b\right) \cdot \left(t\_0 \cdot -0.011111111111111112\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if angle < 1e3

                                1. Initial program 66.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 rewrites82.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 \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                                6. Step-by-step derivation
                                  1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                if 1e3 < angle < 1.8500000000000002e197

                                1. Initial program 33.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 rewrites33.5%

                                  \[\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-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 1.8500000000000002e197 < angle

                                1. Initial program 21.7%

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

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

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

                                Alternative 13: 62.9% accurate, 13.7× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 1000000000:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \]
                                (FPCore (a b angle)
                                 :precision binary64
                                 (if (<= angle 1000000000.0)
                                   (* (+ a b) (* (* (* (- b a) (PI)) angle) 0.011111111111111112))
                                   (* (* 0.011111111111111112 angle) (* (* (PI) (+ b a)) (- b a)))))
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;angle \leq 1000000000:\\
                                \;\;\;\;\left(a + b\right) \cdot \left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if angle < 1e9

                                  1. Initial program 66.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 rewrites82.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. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

                                  if 1e9 < angle

                                  1. Initial program 28.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 rewrites30.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. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 14: 62.8% accurate, 13.7× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 7.5 \cdot 10^{-40}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \]
                                (FPCore (a b angle)
                                 :precision binary64
                                 (if (<= angle 7.5e-40)
                                   (* (- b a) (* (+ b a) (* (* 0.011111111111111112 angle) (PI))))
                                   (* (* 0.011111111111111112 angle) (* (* (PI) (+ b a)) (- b a)))))
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;angle \leq 7.5 \cdot 10^{-40}:\\
                                \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if angle < 7.50000000000000069e-40

                                  1. Initial program 66.1%

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

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

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

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

                                      \[\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 7.50000000000000069e-40 < angle

                                    1. Initial program 36.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 15: 62.8% accurate, 13.7× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\\ \mathbf{if}\;angle \leq 2 \cdot 10^{-18}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \]
                                  (FPCore (a b angle)
                                   :precision binary64
                                   (let* ((t_0 (* (* 0.011111111111111112 angle) (PI))))
                                     (if (<= angle 2e-18)
                                       (* (- b a) (* (+ b a) t_0))
                                       (* t_0 (* (+ b a) (- b a))))))
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_0 := \left(0.011111111111111112 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\\
                                  \mathbf{if}\;angle \leq 2 \cdot 10^{-18}:\\
                                  \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot t\_0\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_0 \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 angle < 2.0000000000000001e-18

                                    1. Initial program 66.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--.f6465.0

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

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

                                        \[\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.0000000000000001e-18 < angle

                                      1. Initial program 31.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--.f6430.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 rewrites30.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)} \]
                                    7. Recombined 2 regimes into one program.
                                    8. Add Preprocessing

                                    Alternative 16: 38.9% accurate, 16.8× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 2 \cdot 10^{-26}:\\ \;\;\;\;\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\\ \end{array} \end{array} \]
                                    (FPCore (a b angle)
                                     :precision binary64
                                     (if (<= angle 2e-26)
                                       (* (* (* angle (PI)) (* -0.011111111111111112 a)) a)
                                       (* (* -0.011111111111111112 (* a a)) (* (PI) angle))))
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;angle \leq 2 \cdot 10^{-26}:\\
                                    \;\;\;\;\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right) \cdot a\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if angle < 2.0000000000000001e-26

                                      1. Initial program 66.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--.f6464.6

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

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

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

                                          if 2.0000000000000001e-26 < angle

                                          1. Initial program 33.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--.f6432.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 rewrites32.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 rewrites21.1%

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

                                          Alternative 17: 37.1% accurate, 16.8× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 8 \cdot 10^{-7}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\\ \end{array} \end{array} \]
                                          (FPCore (a b angle)
                                           :precision binary64
                                           (if (<= a 8e-7)
                                             (* (* -0.011111111111111112 (* a a)) (* (PI) angle))
                                             (* (* -0.011111111111111112 a) (* a (* angle (PI))))))
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;a \leq 8 \cdot 10^{-7}:\\
                                          \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if a < 7.9999999999999996e-7

                                            1. Initial program 62.7%

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

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

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

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

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

                                              if 7.9999999999999996e-7 < a

                                              1. Initial program 47.8%

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

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

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

                                                Alternative 18: 38.1% accurate, 21.6× speedup?

                                                \[\begin{array}{l} \\ \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \end{array} \]
                                                (FPCore (a b angle)
                                                 :precision binary64
                                                 (* (* -0.011111111111111112 a) (* a (* angle (PI)))))
                                                \begin{array}{l}
                                                
                                                \\
                                                \left(-0.011111111111111112 \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)
                                                \end{array}
                                                
                                                Derivation
                                                1. Initial program 58.7%

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

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

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

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

                                                      \[\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 2024363 
                                                    (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)))))