ab-angle->ABCF C

Percentage Accurate: 79.7% → 79.7%
Time: 11.7s
Alternatives: 14
Speedup: 1.0×

Specification

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

\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t\_0\right)}^{2} + {\left(b \cdot \sin t\_0\right)}^{2}
\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 14 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: 79.7% accurate, 1.0× speedup?

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

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

Alternative 1: 79.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := angle \cdot \mathsf{PI}\left(\right)\\
{\left(a \cdot \cos \left(\frac{t\_0}{-180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{t\_0}{180}\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\left(a \cdot \cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{-180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}^{2} \]
  8. Add Preprocessing

Alternative 2: 79.6% accurate, 1.0× speedup?

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

\\
{\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2} + {\left(a \cdot \cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{-180}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2} + {\left(a \cdot \cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{-180}\right)\right)}^{2} \]
  6. Add Preprocessing

Alternative 3: 79.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\\
{\left(\cos t\_0 \cdot a\right)}^{2} + {\left(\sin t\_0 \cdot b\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2} + {\left(\color{blue}{\cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot a\right)}^{2} \]
  7. Final simplification82.3%

    \[\leadsto {\left(\cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)}^{2} + {\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2} \]
  8. Add Preprocessing

Alternative 4: 79.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\\
{\left(\cos t\_0 \cdot a\right)}^{2} + {\left(\sin t\_0 \cdot b\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right)}^{2} + {\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}} \]
  8. Final simplification82.3%

    \[\leadsto {\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot a\right)}^{2} + {\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right)}^{2} \]
  9. Add Preprocessing

Alternative 5: 79.6% accurate, 1.3× speedup?

\[\begin{array}{l} \\ {\left(1 \cdot a\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+ (pow (* 1.0 a) 2.0) (pow (* b (sin (/ (* angle (PI)) 180.0))) 2.0)))
\begin{array}{l}

\\
{\left(1 \cdot a\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(\sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot b\right)}^{2} + {\left(\color{blue}{1} \cdot a\right)}^{2} \]
    2. Final simplification82.1%

      \[\leadsto {\left(1 \cdot a\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}^{2} \]
    3. Add Preprocessing

    Alternative 6: 79.6% accurate, 1.9× speedup?

    \[\begin{array}{l} \\ {\left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2} + a \cdot a \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (+ (pow (* (sin (* (/ angle 180.0) (PI))) b) 2.0) (* a a)))
    \begin{array}{l}
    
    \\
    {\left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2} + a \cdot a
    \end{array}
    
    Derivation
    1. Initial program 82.2%

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

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

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

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

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

      \[\leadsto {\left(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2} + a \cdot a \]
    7. Add Preprocessing

    Alternative 7: 64.9% accurate, 2.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\ \;\;\;\;{\left(\cos \left(-0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot a\right)}^{2}\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), angle \cdot angle, a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left({\left(b \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= b 4.7e-91)
       (pow (* (cos (* -0.005555555555555556 (* angle (PI)))) a) 2.0)
       (if (<= b 2.15e+161)
         (fma
          (* (* (* b b) 3.08641975308642e-5) (* (PI) (PI)))
          (* angle angle)
          (* a a))
         (* (* (* (pow (* b angle) 2.0) 3.08641975308642e-5) (PI)) (PI)))))
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\
    \;\;\;\;{\left(\cos \left(-0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot a\right)}^{2}\\
    
    \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\
    \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), angle \cdot angle, a \cdot a\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left({\left(b \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < 4.70000000000000006e-91

      1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

          \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
        10. pow-to-expN/A

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

          \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
        12. lower-log.f6436.7

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

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

          \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
        15. lower-*.f6436.7

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

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

        \[\leadsto \color{blue}{{\left({\left(a \cdot \cos \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{\log \mathsf{E}\left(\right)}\right)}^{2}} \]
      6. Step-by-step derivation
        1. lower-pow.f64N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto {\left(\cos \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{-1}{180}\right) \cdot a\right)}^{2} \]
        11. lower-PI.f6461.8

          \[\leadsto {\left(\cos \left(\left(\color{blue}{\mathsf{PI}\left(\right)} \cdot angle\right) \cdot -0.005555555555555556\right) \cdot a\right)}^{2} \]
      7. Applied rewrites61.8%

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

      if 4.70000000000000006e-91 < b < 2.15e161

      1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

          \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
        10. pow-to-expN/A

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

          \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
        12. lower-log.f6429.9

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

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

          \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
        15. lower-*.f6429.9

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

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

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

          \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
        2. e-exp-1N/A

          \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
        3. log-EN/A

          \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
        4. exp-prodN/A

          \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
        5. log-EN/A

          \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
        6. *-lft-identityN/A

          \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
        7. rem-exp-logN/A

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
      7. Applied rewrites45.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
      8. Taylor expanded in b around inf

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right), angle \cdot angle, a \cdot a\right) \]
      9. Step-by-step derivation
        1. Applied rewrites63.5%

          \[\leadsto \mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(b \cdot b\right)\right), angle \cdot angle, a \cdot a\right) \]

        if 2.15e161 < b

        1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

            \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
          10. pow-to-expN/A

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

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

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

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

            \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
          15. lower-*.f6440.8

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

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

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

            \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
          2. e-exp-1N/A

            \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
          3. log-EN/A

            \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
          4. exp-prodN/A

            \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
          5. log-EN/A

            \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
          6. *-lft-identityN/A

            \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
          7. rem-exp-logN/A

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
        7. Applied rewrites43.8%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
        8. Taylor expanded in b around inf

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

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

              \[\leadsto \left(\left({\left(b \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) \]
          3. Recombined 3 regimes into one program.
          4. Final simplification66.4%

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\ \;\;\;\;{\left(\cos \left(-0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot a\right)}^{2}\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), angle \cdot angle, a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left({\left(b \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 8: 65.0% accurate, 3.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\ \;\;\;\;a \cdot a\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), angle \cdot angle, a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left({\left(b \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\\ \end{array} \end{array} \]
          (FPCore (a b angle)
           :precision binary64
           (if (<= b 4.7e-91)
             (* a a)
             (if (<= b 2.15e+161)
               (fma
                (* (* (* b b) 3.08641975308642e-5) (* (PI) (PI)))
                (* angle angle)
                (* a a))
               (* (* (* (pow (* b angle) 2.0) 3.08641975308642e-5) (PI)) (PI)))))
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\
          \;\;\;\;a \cdot a\\
          
          \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\
          \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), angle \cdot angle, a \cdot a\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\left({\left(b \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if b < 4.70000000000000006e-91

            1. Initial program 79.7%

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

              \[\leadsto \color{blue}{{a}^{2}} \]
            4. Step-by-step derivation
              1. unpow2N/A

                \[\leadsto \color{blue}{a \cdot a} \]
              2. lower-*.f6461.8

                \[\leadsto \color{blue}{a \cdot a} \]
            5. Applied rewrites61.8%

              \[\leadsto \color{blue}{a \cdot a} \]

            if 4.70000000000000006e-91 < b < 2.15e161

            1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

                \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
              10. pow-to-expN/A

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

                \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
              12. lower-log.f6429.9

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

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

                \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
              15. lower-*.f6429.9

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

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

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

                \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
              2. e-exp-1N/A

                \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
              3. log-EN/A

                \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
              4. exp-prodN/A

                \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
              5. log-EN/A

                \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
              6. *-lft-identityN/A

                \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
              7. rem-exp-logN/A

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
            7. Applied rewrites45.6%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
            8. Taylor expanded in b around inf

              \[\leadsto \mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right), angle \cdot angle, a \cdot a\right) \]
            9. Step-by-step derivation
              1. Applied rewrites63.5%

                \[\leadsto \mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(b \cdot b\right)\right), angle \cdot angle, a \cdot a\right) \]

              if 2.15e161 < b

              1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

                  \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                10. pow-to-expN/A

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

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

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

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

                  \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                15. lower-*.f6440.8

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

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

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

                  \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
                2. e-exp-1N/A

                  \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
                3. log-EN/A

                  \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
                4. exp-prodN/A

                  \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
                5. log-EN/A

                  \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
                6. *-lft-identityN/A

                  \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
                7. rem-exp-logN/A

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
              7. Applied rewrites43.8%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
              8. Taylor expanded in b around inf

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

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

                    \[\leadsto \left(\left({\left(b \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) \]
                3. Recombined 3 regimes into one program.
                4. Final simplification66.4%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\ \;\;\;\;a \cdot a\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), angle \cdot angle, a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left({\left(b \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 9: 65.0% accurate, 3.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\ \;\;\;\;a \cdot a\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), angle \cdot angle, a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(b \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\\ \end{array} \end{array} \]
                (FPCore (a b angle)
                 :precision binary64
                 (if (<= b 4.7e-91)
                   (* a a)
                   (if (<= b 2.15e+161)
                     (fma
                      (* (* (* b b) 3.08641975308642e-5) (* (PI) (PI)))
                      (* angle angle)
                      (* a a))
                     (* (pow (* (* b angle) (PI)) 2.0) 3.08641975308642e-5))))
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\
                \;\;\;\;a \cdot a\\
                
                \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\
                \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), angle \cdot angle, a \cdot a\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;{\left(\left(b \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if b < 4.70000000000000006e-91

                  1. Initial program 79.7%

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

                    \[\leadsto \color{blue}{{a}^{2}} \]
                  4. Step-by-step derivation
                    1. unpow2N/A

                      \[\leadsto \color{blue}{a \cdot a} \]
                    2. lower-*.f6461.8

                      \[\leadsto \color{blue}{a \cdot a} \]
                  5. Applied rewrites61.8%

                    \[\leadsto \color{blue}{a \cdot a} \]

                  if 4.70000000000000006e-91 < b < 2.15e161

                  1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

                      \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                    10. pow-to-expN/A

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

                      \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                    12. lower-log.f6429.9

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

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

                      \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                    15. lower-*.f6429.9

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

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

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

                      \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
                    2. e-exp-1N/A

                      \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
                    3. log-EN/A

                      \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
                    4. exp-prodN/A

                      \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
                    5. log-EN/A

                      \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
                    6. *-lft-identityN/A

                      \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
                    7. rem-exp-logN/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
                  7. Applied rewrites45.6%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
                  8. Taylor expanded in b around inf

                    \[\leadsto \mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right), angle \cdot angle, a \cdot a\right) \]
                  9. Step-by-step derivation
                    1. Applied rewrites63.5%

                      \[\leadsto \mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(b \cdot b\right)\right), angle \cdot angle, a \cdot a\right) \]

                    if 2.15e161 < b

                    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

                        \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                      10. pow-to-expN/A

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

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

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

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

                        \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                      15. lower-*.f6440.8

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

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

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

                        \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
                      2. e-exp-1N/A

                        \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
                      3. log-EN/A

                        \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
                      4. exp-prodN/A

                        \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
                      5. log-EN/A

                        \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
                      6. *-lft-identityN/A

                        \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
                      7. rem-exp-logN/A

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
                    7. Applied rewrites43.8%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
                    8. Taylor expanded in b around inf

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

                        \[\leadsto \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(\left(angle \cdot angle\right) \cdot b\right) \cdot b\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \]
                      2. Step-by-step derivation
                        1. Applied rewrites86.6%

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\ \;\;\;\;a \cdot a\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), angle \cdot angle, a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(b \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\\ \end{array} \]
                      5. Add Preprocessing

                      Alternative 10: 64.6% accurate, 9.1× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\\ \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\ \;\;\;\;a \cdot a\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot t\_0, angle \cdot angle, a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(b \cdot angle\right) \cdot angle\right) \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot t\_0\\ \end{array} \end{array} \]
                      (FPCore (a b angle)
                       :precision binary64
                       (let* ((t_0 (* (PI) (PI))))
                         (if (<= b 4.7e-91)
                           (* a a)
                           (if (<= b 2.15e+161)
                             (fma (* (* (* b b) 3.08641975308642e-5) t_0) (* angle angle) (* a a))
                             (* (* (* (* (* b angle) angle) b) 3.08641975308642e-5) t_0)))))
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\\
                      \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\
                      \;\;\;\;a \cdot a\\
                      
                      \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\
                      \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot t\_0, angle \cdot angle, a \cdot a\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(\left(\left(\left(b \cdot angle\right) \cdot angle\right) \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot t\_0\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if b < 4.70000000000000006e-91

                        1. Initial program 79.7%

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

                          \[\leadsto \color{blue}{{a}^{2}} \]
                        4. Step-by-step derivation
                          1. unpow2N/A

                            \[\leadsto \color{blue}{a \cdot a} \]
                          2. lower-*.f6461.8

                            \[\leadsto \color{blue}{a \cdot a} \]
                        5. Applied rewrites61.8%

                          \[\leadsto \color{blue}{a \cdot a} \]

                        if 4.70000000000000006e-91 < b < 2.15e161

                        1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

                            \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                          10. pow-to-expN/A

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

                            \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                          12. lower-log.f6429.9

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

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

                            \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                          15. lower-*.f6429.9

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

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

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

                            \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
                          2. e-exp-1N/A

                            \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
                          3. log-EN/A

                            \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
                          4. exp-prodN/A

                            \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
                          5. log-EN/A

                            \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
                          6. *-lft-identityN/A

                            \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
                          7. rem-exp-logN/A

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
                        7. Applied rewrites45.6%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
                        8. Taylor expanded in b around inf

                          \[\leadsto \mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{1}{32400} \cdot {b}^{2}\right), angle \cdot angle, a \cdot a\right) \]
                        9. Step-by-step derivation
                          1. Applied rewrites63.5%

                            \[\leadsto \mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(b \cdot b\right)\right), angle \cdot angle, a \cdot a\right) \]

                          if 2.15e161 < b

                          1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

                              \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                            10. pow-to-expN/A

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

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

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

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

                              \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                            15. lower-*.f6440.8

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

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

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

                              \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
                            2. e-exp-1N/A

                              \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
                            3. log-EN/A

                              \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
                            4. exp-prodN/A

                              \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
                            5. log-EN/A

                              \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
                            6. *-lft-identityN/A

                              \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
                            7. rem-exp-logN/A

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

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
                          7. Applied rewrites43.8%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
                          8. Taylor expanded in b around inf

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

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

                                \[\leadsto \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(\left(b \cdot angle\right) \cdot angle\right) \cdot b\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification65.7%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.7 \cdot 10^{-91}:\\ \;\;\;\;a \cdot a\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{+161}:\\ \;\;\;\;\mathsf{fma}\left(\left(\left(b \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), angle \cdot angle, a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(b \cdot angle\right) \cdot angle\right) \cdot b\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 11: 62.6% accurate, 12.1× speedup?

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

                              1. Initial program 78.7%

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

                                \[\leadsto \color{blue}{{a}^{2}} \]
                              4. Step-by-step derivation
                                1. unpow2N/A

                                  \[\leadsto \color{blue}{a \cdot a} \]
                                2. lower-*.f6459.2

                                  \[\leadsto \color{blue}{a \cdot a} \]
                              5. Applied rewrites59.2%

                                \[\leadsto \color{blue}{a \cdot a} \]

                              if 1.21999999999999993e166 < b

                              1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

                                  \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                10. pow-to-expN/A

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

                                  \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                12. lower-log.f6441.8

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

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

                                  \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                15. lower-*.f6441.8

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

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

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

                                  \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
                                2. e-exp-1N/A

                                  \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
                                3. log-EN/A

                                  \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
                                4. exp-prodN/A

                                  \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
                                5. log-EN/A

                                  \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
                                6. *-lft-identityN/A

                                  \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
                                7. rem-exp-logN/A

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

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
                              7. Applied rewrites44.8%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
                              8. Taylor expanded in b around inf

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

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

                                    \[\leadsto \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(\left(b \cdot angle\right) \cdot angle\right) \cdot b\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \]
                                3. Recombined 2 regimes into one program.
                                4. Final simplification63.4%

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

                                Alternative 12: 61.0% accurate, 12.1× speedup?

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

                                  1. Initial program 78.9%

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

                                    \[\leadsto \color{blue}{{a}^{2}} \]
                                  4. Step-by-step derivation
                                    1. unpow2N/A

                                      \[\leadsto \color{blue}{a \cdot a} \]
                                    2. lower-*.f6459.2

                                      \[\leadsto \color{blue}{a \cdot a} \]
                                  5. Applied rewrites59.2%

                                    \[\leadsto \color{blue}{a \cdot a} \]

                                  if 2.8999999999999999e172 < b

                                  1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                    10. pow-to-expN/A

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

                                      \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                    12. lower-log.f6443.8

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

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

                                      \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                    15. lower-*.f6443.8

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

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

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

                                      \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
                                    2. e-exp-1N/A

                                      \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
                                    3. log-EN/A

                                      \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
                                    4. exp-prodN/A

                                      \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
                                    5. log-EN/A

                                      \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
                                    6. *-lft-identityN/A

                                      \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
                                    7. rem-exp-logN/A

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

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
                                  7. Applied rewrites44.5%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
                                  8. Taylor expanded in b around inf

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

                                      \[\leadsto \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(\left(angle \cdot angle\right) \cdot b\right) \cdot b\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \]
                                  10. Recombined 2 regimes into one program.
                                  11. Final simplification61.2%

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

                                  Alternative 13: 61.0% accurate, 12.1× speedup?

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

                                    1. Initial program 78.9%

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

                                      \[\leadsto \color{blue}{{a}^{2}} \]
                                    4. Step-by-step derivation
                                      1. unpow2N/A

                                        \[\leadsto \color{blue}{a \cdot a} \]
                                      2. lower-*.f6459.2

                                        \[\leadsto \color{blue}{a \cdot a} \]
                                    5. Applied rewrites59.2%

                                      \[\leadsto \color{blue}{a \cdot a} \]

                                    if 2.8999999999999999e172 < b

                                    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

                                        \[\leadsto {\left({\mathsf{E}\left(\right)}^{\color{blue}{\log \left(e^{\log \left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot 1}\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                      10. pow-to-expN/A

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

                                        \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(a \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                      12. lower-log.f6443.8

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

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

                                        \[\leadsto {\left({\mathsf{E}\left(\right)}^{\log \color{blue}{\left(\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot a\right)}}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                      15. lower-*.f6443.8

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

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

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

                                        \[\leadsto \color{blue}{\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} + {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2} \]
                                      2. e-exp-1N/A

                                        \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\color{blue}{\left(e^{1}\right)}}^{\log a}\right)}^{2} \]
                                      3. log-EN/A

                                        \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left({\left(e^{\color{blue}{\log \mathsf{E}\left(\right)}}\right)}^{\log a}\right)}^{2} \]
                                      4. exp-prodN/A

                                        \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{\left(e^{\log \mathsf{E}\left(\right) \cdot \log a}\right)}}^{2} \]
                                      5. log-EN/A

                                        \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{1} \cdot \log a}\right)}^{2} \]
                                      6. *-lft-identityN/A

                                        \[\leadsto \left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\left(e^{\color{blue}{\log a}}\right)}^{2} \]
                                      7. rem-exp-logN/A

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

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{32400} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\log \mathsf{E}\left(\right) \cdot {\left({\mathsf{E}\left(\right)}^{\log a}\right)}^{2}\right)\right) + \frac{1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), {angle}^{2}, {a}^{2}\right)} \]
                                    7. Applied rewrites44.5%

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot b, b, -3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right), angle \cdot angle, a \cdot a\right)} \]
                                    8. Taylor expanded in b around inf

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

                                        \[\leadsto \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(\left(angle \cdot angle\right) \cdot b\right) \cdot b\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)} \]
                                      2. Taylor expanded in b around 0

                                        \[\leadsto \left(\frac{1}{32400} \cdot \left({angle}^{2} \cdot {b}^{2}\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites71.7%

                                          \[\leadsto \left(\left(\left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot angle\right)\right) \cdot b\right) \cdot b\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \]
                                      4. Recombined 2 regimes into one program.
                                      5. Final simplification61.2%

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

                                      Alternative 14: 56.9% accurate, 74.7× speedup?

                                      \[\begin{array}{l} \\ a \cdot a \end{array} \]
                                      (FPCore (a b angle) :precision binary64 (* a a))
                                      double code(double a, double b, double angle) {
                                      	return a * a;
                                      }
                                      
                                      real(8) function code(a, b, angle)
                                          real(8), intent (in) :: a
                                          real(8), intent (in) :: b
                                          real(8), intent (in) :: angle
                                          code = a * a
                                      end function
                                      
                                      public static double code(double a, double b, double angle) {
                                      	return a * a;
                                      }
                                      
                                      def code(a, b, angle):
                                      	return a * a
                                      
                                      function code(a, b, angle)
                                      	return Float64(a * a)
                                      end
                                      
                                      function tmp = code(a, b, angle)
                                      	tmp = a * a;
                                      end
                                      
                                      code[a_, b_, angle_] := N[(a * a), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      a \cdot a
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 82.2%

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

                                        \[\leadsto \color{blue}{{a}^{2}} \]
                                      4. Step-by-step derivation
                                        1. unpow2N/A

                                          \[\leadsto \color{blue}{a \cdot a} \]
                                        2. lower-*.f6454.3

                                          \[\leadsto \color{blue}{a \cdot a} \]
                                      5. Applied rewrites54.3%

                                        \[\leadsto \color{blue}{a \cdot a} \]
                                      6. Add Preprocessing

                                      Reproduce

                                      ?
                                      herbie shell --seed 2024270 
                                      (FPCore (a b angle)
                                        :name "ab-angle->ABCF C"
                                        :precision binary64
                                        (+ (pow (* a (cos (* (PI) (/ angle 180.0)))) 2.0) (pow (* b (sin (* (PI) (/ angle 180.0)))) 2.0)))