raw-angle from scale-rotated-ellipse

Percentage Accurate: 13.8% → 55.1%
Time: 24.9s
Alternatives: 10
Speedup: 22.2×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{angle}{180} \cdot \mathsf{PI}\left(\right)\\ t_1 := \cos t\_0\\ t_2 := \sin t\_0\\ t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\ t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\ t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\ 180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\mathsf{PI}\left(\right)} \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* (/ angle 180.0) (PI)))
        (t_1 (cos t_0))
        (t_2 (sin t_0))
        (t_3
         (/
          (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
          y-scale))
        (t_4
         (/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
        (t_5
         (/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
   (*
    180.0
    (/
     (atan
      (/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
     (PI)))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \mathsf{PI}\left(\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\mathsf{PI}\left(\right)}
\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 10 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: 13.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{angle}{180} \cdot \mathsf{PI}\left(\right)\\ t_1 := \cos t\_0\\ t_2 := \sin t\_0\\ t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\ t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\ t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\ 180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\mathsf{PI}\left(\right)} \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* (/ angle 180.0) (PI)))
        (t_1 (cos t_0))
        (t_2 (sin t_0))
        (t_3
         (/
          (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_2) t_1) x-scale)
          y-scale))
        (t_4
         (/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) y-scale) y-scale))
        (t_5
         (/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) x-scale) x-scale)))
   (*
    180.0
    (/
     (atan
      (/ (- (- t_4 t_5) (sqrt (+ (pow (- t_5 t_4) 2.0) (pow t_3 2.0)))) t_3))
     (PI)))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \mathsf{PI}\left(\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_2\right) \cdot t\_1}{x-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{y-scale}}{y-scale}\\
t_5 := \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{x-scale}}{x-scale}\\
180 \cdot \frac{\tan^{-1} \left(\frac{\left(t\_4 - t\_5\right) - \sqrt{{\left(t\_5 - t\_4\right)}^{2} + {t\_3}^{2}}}{t\_3}\right)}{\mathsf{PI}\left(\right)}
\end{array}
\end{array}

Alternative 1: 55.1% accurate, 5.3× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := angle \cdot \mathsf{PI}\left(\right)\\ t_1 := 0.005555555555555556 \cdot t\_0\\ t_2 := \cos t\_1\\ \mathbf{if}\;b\_m \leq 2.35 \cdot 10^{-55}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{t\_2}\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{{t\_2}^{2}}{\sin t\_1 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, t\_0, 0.5 \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* angle (PI)))
        (t_1 (* 0.005555555555555556 t_0))
        (t_2 (cos t_1)))
   (if (<= b_m 2.35e-55)
     (* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 t_2))) (PI)))
     (*
      180.0
      (/
       (atan
        (*
         (/ (- y-scale) x-scale)
         (/
          (pow t_2 2.0)
          (* (sin t_1) (sin (fma 0.005555555555555556 t_0 (* 0.5 (PI))))))))
       (PI))))))
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
t_0 := angle \cdot \mathsf{PI}\left(\right)\\
t_1 := 0.005555555555555556 \cdot t\_0\\
t_2 := \cos t\_1\\
\mathbf{if}\;b\_m \leq 2.35 \cdot 10^{-55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{t\_2}\right)}{\mathsf{PI}\left(\right)}\\

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{{t\_2}^{2}}{\sin t\_1 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, t\_0, 0.5 \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 2.35e-55

    1. Initial program 11.4%

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
    5. Taylor expanded in a around inf

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
    6. Step-by-step derivation
      1. times-fracN/A

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
      3. lift-/.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
      4. quot-tanN/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      5. lower-tan.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      6. lift-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      7. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      8. lift-*.f6451.0

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
    7. Applied rewrites51.0%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    8. Step-by-step derivation
      1. lift-tan.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      2. lift-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      3. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      4. lift-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      5. tan-quotN/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      6. lower-/.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      7. lift-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      8. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      9. lift-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      10. lift-sin.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      11. lift-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      12. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      13. lift-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      14. lift-cos.f6451.0

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    9. Applied rewrites51.0%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    10. Taylor expanded in angle around 0

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      2. lift-PI.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      3. lift-*.f6452.5

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
    12. Applied rewrites52.5%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]

    if 2.35e-55 < b

    1. Initial program 19.1%

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(2 \cdot \left({a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)}{x-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right)}}{\mathsf{PI}\left(\right)} \]
    4. Applied rewrites33.9%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      3. lift-PI.f64N/A

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      5. sin-+PI/2-revN/A

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      7. lower-fma.f64N/A

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\sin \left(\mathsf{fma}\left(\frac{1}{180}, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      10. lower-/.f64N/A

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\sin \left(\mathsf{fma}\left(\frac{1}{180}, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      11. lift-PI.f6433.7

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
    6. Applied rewrites33.7%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\color{blue}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
    7. Taylor expanded in a around 0

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\frac{y-scale \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{x-scale \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
    8. Step-by-step derivation
      1. Applied rewrites61.1%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\left(\frac{y-scale}{x-scale} \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \mathsf{PI}\left(\right), 0.5 \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}\right)}{\mathsf{PI}\left(\right)} \]
    9. Recombined 2 regimes into one program.
    10. Final simplification54.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.35 \cdot 10^{-55}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \mathsf{PI}\left(\right), 0.5 \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \]
    11. Add Preprocessing

    Alternative 2: 55.8% accurate, 7.5× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := angle \cdot \mathsf{PI}\left(\right)\\ t_1 := 0.005555555555555556 \cdot t\_0\\ t_2 := \cos t\_1\\ t_3 := \sin t\_1\\ \mathbf{if}\;b\_m \leq 5.9 \cdot 10^{-59}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{t\_2}\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{elif}\;b\_m \leq 5.5 \cdot 10^{+120}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b\_m \cdot b\_m\right)}{\sin \left(\mathsf{fma}\left(0.005555555555555556, t\_0, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(t\_3 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{t\_2}{t\_3}\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    (FPCore (a b_m angle x-scale y-scale)
     :precision binary64
     (let* ((t_0 (* angle (PI)))
            (t_1 (* 0.005555555555555556 t_0))
            (t_2 (cos t_1))
            (t_3 (sin t_1)))
       (if (<= b_m 5.9e-59)
         (* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_1 t_2))) (PI)))
         (if (<= b_m 5.5e+120)
           (*
            180.0
            (/
             (atan
              (*
               -0.5
               (*
                (/ y-scale x-scale)
                (/
                 (* 2.0 (* b_m b_m))
                 (*
                  (sin (fma 0.005555555555555556 t_0 (/ (PI) 2.0)))
                  (* t_3 (- (* b_m b_m) (* a a))))))))
             (PI)))
           (* 180.0 (/ (atan (* (/ (- y-scale) x-scale) (/ t_2 t_3))) (PI)))))))
    \begin{array}{l}
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    t_0 := angle \cdot \mathsf{PI}\left(\right)\\
    t_1 := 0.005555555555555556 \cdot t\_0\\
    t_2 := \cos t\_1\\
    t_3 := \sin t\_1\\
    \mathbf{if}\;b\_m \leq 5.9 \cdot 10^{-59}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_1}{t\_2}\right)}{\mathsf{PI}\left(\right)}\\
    
    \mathbf{elif}\;b\_m \leq 5.5 \cdot 10^{+120}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b\_m \cdot b\_m\right)}{\sin \left(\mathsf{fma}\left(0.005555555555555556, t\_0, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(t\_3 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{t\_2}{t\_3}\right)}{\mathsf{PI}\left(\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < 5.8999999999999998e-59

      1. Initial program 11.4%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
      5. Taylor expanded in a around inf

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
      6. Step-by-step derivation
        1. times-fracN/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
        3. lift-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
        4. quot-tanN/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        5. lower-tan.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        6. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        7. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        8. lift-*.f6451.0

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      7. Applied rewrites51.0%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      8. Step-by-step derivation
        1. lift-tan.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        2. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        3. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        4. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        5. tan-quotN/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        6. lower-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        7. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        8. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        9. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        10. lift-sin.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        11. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        12. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        13. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        14. lift-cos.f6451.0

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      9. Applied rewrites51.0%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      10. Taylor expanded in angle around 0

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      11. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        2. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        3. lift-*.f6452.5

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      12. Applied rewrites52.5%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]

      if 5.8999999999999998e-59 < b < 5.50000000000000003e120

      1. Initial program 41.4%

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        3. lift-PI.f64N/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        5. sin-+PI/2-revN/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        7. lower-fma.f64N/A

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\sin \left(\mathsf{fma}\left(\frac{1}{180}, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        10. lower-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\sin \left(\mathsf{fma}\left(\frac{1}{180}, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        11. lift-PI.f6462.9

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      6. Applied rewrites62.9%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\color{blue}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      7. Taylor expanded in angle around 0

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot {b}^{2}}{\color{blue}{\sin \left(\mathsf{fma}\left(\frac{1}{180}, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      8. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot {b}^{2}}{\sin \left(\mathsf{fma}\left(\frac{1}{180}, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        2. pow2N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b \cdot b\right)}{\sin \left(\mathsf{fma}\left(\frac{1}{180}, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        3. lift-*.f6466.8

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b \cdot b\right)}{\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      9. Applied rewrites66.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b \cdot b\right)}{\color{blue}{\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]

      if 5.50000000000000003e120 < b

      1. Initial program 0.0%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(2 \cdot \left({a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)}{x-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right)}}{\mathsf{PI}\left(\right)} \]
      4. Applied rewrites8.8%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
      5. Taylor expanded in a around 0

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
      6. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
        2. times-fracN/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)\right)}{\mathsf{PI}\left(\right)} \]
        4. lift-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)\right)}{\mathsf{PI}\left(\right)} \]
        5. lower-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      7. Applied rewrites58.9%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}\right)}{\mathsf{PI}\left(\right)} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification55.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 5.9 \cdot 10^{-59}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{+120}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b \cdot b\right)}{\sin \left(\mathsf{fma}\left(0.005555555555555556, angle \cdot \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 3: 56.0% accurate, 8.5× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\\ \mathbf{if}\;b\_m \leq 10^{+75}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{\cos t\_0}{\sin t\_0}\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    (FPCore (a b_m angle x-scale y-scale)
     :precision binary64
     (let* ((t_0 (* 0.005555555555555556 (* angle (PI)))))
       (if (<= b_m 1e+75)
         (* 180.0 (/ (atan (* (/ y-scale x-scale) (tan t_0))) (PI)))
         (*
          180.0
          (/ (atan (* (/ (- y-scale) x-scale) (/ (cos t_0) (sin t_0)))) (PI))))))
    \begin{array}{l}
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    t_0 := 0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\\
    \mathbf{if}\;b\_m \leq 10^{+75}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\mathsf{PI}\left(\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{\cos t\_0}{\sin t\_0}\right)}{\mathsf{PI}\left(\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 9.99999999999999927e74

      1. Initial program 13.8%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(2 \cdot \left({a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)}{x-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right)}}{\mathsf{PI}\left(\right)} \]
      4. Applied rewrites31.7%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
      5. Taylor expanded in a around inf

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
      6. Step-by-step derivation
        1. times-fracN/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
        3. lift-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
        4. quot-tanN/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        5. lower-tan.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        6. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        7. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        8. lift-*.f6451.0

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      7. Applied rewrites51.0%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]

      if 9.99999999999999927e74 < b

      1. Initial program 11.1%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
      5. Taylor expanded in a around 0

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
      6. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
        2. times-fracN/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)\right)}{\mathsf{PI}\left(\right)} \]
        4. lift-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)\right)}{\mathsf{PI}\left(\right)} \]
        5. lower-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      7. Applied rewrites60.5%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}\right)}{\mathsf{PI}\left(\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 10^{+75}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-y-scale}{x-scale} \cdot \frac{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 53.9% accurate, 10.4× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\\ \mathbf{if}\;b\_m \leq 2.9 \cdot 10^{-58}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_0}{\cos t\_0}\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{elif}\;b\_m \leq 8.8 \cdot 10^{+101}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b\_m \cdot b\_m\right)}{1 \cdot \left(\sin t\_0 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    (FPCore (a b_m angle x-scale y-scale)
     :precision binary64
     (let* ((t_0 (* 0.005555555555555556 (* angle (PI)))))
       (if (<= b_m 2.9e-58)
         (* 180.0 (/ (atan (* (/ y-scale x-scale) (/ t_0 (cos t_0)))) (PI)))
         (if (<= b_m 8.8e+101)
           (*
            180.0
            (/
             (atan
              (*
               -0.5
               (*
                (/ y-scale x-scale)
                (/
                 (* 2.0 (* b_m b_m))
                 (* 1.0 (* (sin t_0) (- (* b_m b_m) (* a a))))))))
             (PI)))
           (*
            180.0
            (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale (PI)))))) (PI)))))))
    \begin{array}{l}
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    t_0 := 0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\\
    \mathbf{if}\;b\_m \leq 2.9 \cdot 10^{-58}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{t\_0}{\cos t\_0}\right)}{\mathsf{PI}\left(\right)}\\
    
    \mathbf{elif}\;b\_m \leq 8.8 \cdot 10^{+101}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b\_m \cdot b\_m\right)}{1 \cdot \left(\sin t\_0 \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < 2.8999999999999999e-58

      1. Initial program 11.4%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
      5. Taylor expanded in a around inf

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
      6. Step-by-step derivation
        1. times-fracN/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
        3. lift-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
        4. quot-tanN/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        5. lower-tan.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        6. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        7. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        8. lift-*.f6451.0

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
      7. Applied rewrites51.0%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      8. Step-by-step derivation
        1. lift-tan.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        2. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        3. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        4. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
        5. tan-quotN/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        6. lower-/.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        7. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        8. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        9. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        10. lift-sin.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        11. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        12. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        13. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        14. lift-cos.f6451.0

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      9. Applied rewrites51.0%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      10. Taylor expanded in angle around 0

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      11. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        2. lift-PI.f64N/A

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
        3. lift-*.f6452.5

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
      12. Applied rewrites52.5%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]

      if 2.8999999999999999e-58 < b < 8.8000000000000003e101

      1. Initial program 47.9%

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
      5. Taylor expanded in angle around 0

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{1 \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
      6. Step-by-step derivation
        1. Applied rewrites66.1%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{1 \cdot \left(\color{blue}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        2. Taylor expanded in angle around 0

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot {b}^{2}}{\color{blue}{1} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot {b}^{2}}{1 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
          2. pow2N/A

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b \cdot b\right)}{1 \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
          3. lift-*.f6462.6

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b \cdot b\right)}{1 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        4. Applied rewrites62.6%

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{2 \cdot \left(b \cdot b\right)}{\color{blue}{1} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]

        if 8.8000000000000003e101 < b

        1. Initial program 2.5%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(2 \cdot \frac{{a}^{2}}{{y-scale}^{2}} - 2 \cdot \frac{{b}^{2}}{{x-scale}^{2}}\right)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)}}{\mathsf{PI}\left(\right)} \]
        4. Step-by-step derivation
          1. Applied rewrites5.4%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(90 \cdot \left(\frac{x-scale}{angle} \cdot \frac{y-scale \cdot \left(2 \cdot \frac{a \cdot a}{y-scale \cdot y-scale} - 2 \cdot \frac{b \cdot b}{x-scale \cdot x-scale}\right)}{\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
          2. Taylor expanded in a around 0

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \color{blue}{\frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
          3. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{\color{blue}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
            2. lower-/.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \color{blue}{\left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
            3. lower-*.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)}{\mathsf{PI}\left(\right)} \]
            4. lower-*.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
            5. lift-PI.f6460.5

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
          4. Applied rewrites60.5%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \color{blue}{\frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
        5. Recombined 3 regimes into one program.
        6. Add Preprocessing

        Alternative 5: 53.7% accurate, 12.8× speedup?

        \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 2.9 \cdot 10^{+75}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \end{array} \]
        b_m = (fabs.f64 b)
        (FPCore (a b_m angle x-scale y-scale)
         :precision binary64
         (if (<= b_m 2.9e+75)
           (*
            180.0
            (/
             (atan
              (* (/ y-scale x-scale) (tan (* 0.005555555555555556 (* angle (PI))))))
             (PI)))
           (*
            180.0
            (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale (PI)))))) (PI)))))
        \begin{array}{l}
        b_m = \left|b\right|
        
        \\
        \begin{array}{l}
        \mathbf{if}\;b\_m \leq 2.9 \cdot 10^{+75}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if b < 2.8999999999999998e75

          1. Initial program 13.8%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(2 \cdot \left({a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)}{x-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right)}}{\mathsf{PI}\left(\right)} \]
          4. Applied rewrites31.7%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
          5. Taylor expanded in a around inf

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
          6. Step-by-step derivation
            1. times-fracN/A

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
            3. lift-/.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
            4. quot-tanN/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
            5. lower-tan.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
            6. lift-*.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
            7. lift-PI.f64N/A

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
            8. lift-*.f6451.0

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
          7. Applied rewrites51.0%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]

          if 2.8999999999999998e75 < b

          1. Initial program 11.1%

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(2 \cdot \frac{{a}^{2}}{{y-scale}^{2}} - 2 \cdot \frac{{b}^{2}}{{x-scale}^{2}}\right)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)}}{\mathsf{PI}\left(\right)} \]
          4. Step-by-step derivation
            1. Applied rewrites11.5%

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(90 \cdot \left(\frac{x-scale}{angle} \cdot \frac{y-scale \cdot \left(2 \cdot \frac{a \cdot a}{y-scale \cdot y-scale} - 2 \cdot \frac{b \cdot b}{x-scale \cdot x-scale}\right)}{\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
            2. Taylor expanded in a around 0

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \color{blue}{\frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{\color{blue}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
              2. lower-/.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \color{blue}{\left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
              3. lower-*.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)}{\mathsf{PI}\left(\right)} \]
              4. lower-*.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
              5. lift-PI.f6462.7

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
            4. Applied rewrites62.7%

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \color{blue}{\frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
          5. Recombined 2 regimes into one program.
          6. Add Preprocessing

          Alternative 6: 52.3% accurate, 16.4× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 3 \cdot 10^{-59}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{elif}\;b\_m \leq 1.05 \cdot 10^{+153}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b\_m \cdot b\_m}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (if (<= b_m 3e-59)
             (*
              180.0
              (/
               (atan (* (/ y-scale x-scale) (* 0.005555555555555556 (* angle (PI)))))
               (PI)))
             (if (<= b_m 1.05e+153)
               (*
                180.0
                (/
                 (atan
                  (*
                   -0.5
                   (*
                    (/ y-scale x-scale)
                    (*
                     360.0
                     (/ (* b_m b_m) (* angle (* (PI) (- (* b_m b_m) (* a a)))))))))
                 (PI)))
               (*
                180.0
                (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale (PI)))))) (PI))))))
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;b\_m \leq 3 \cdot 10^{-59}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)}\\
          
          \mathbf{elif}\;b\_m \leq 1.05 \cdot 10^{+153}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b\_m \cdot b\_m}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if b < 3.0000000000000001e-59

            1. Initial program 11.4%

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
            5. Taylor expanded in a around inf

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
            6. Step-by-step derivation
              1. times-fracN/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
              3. lift-/.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
              4. quot-tanN/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              5. lower-tan.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              6. lift-*.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              7. lift-PI.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              8. lift-*.f6451.0

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
            7. Applied rewrites51.0%

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
            8. Taylor expanded in angle around 0

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
            9. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              2. lift-PI.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              3. lift-*.f6449.4

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
            10. Applied rewrites49.4%

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]

            if 3.0000000000000001e-59 < b < 1.05000000000000008e153

            1. Initial program 36.4%

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
            5. Taylor expanded in angle around 0

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \color{blue}{\frac{{b}^{2}}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{{b}^{2}}{\color{blue}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              2. lower-/.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{{b}^{2}}{angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              3. pow2N/A

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              7. pow2N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - {a}^{2}\right)\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              8. lift-*.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - {a}^{2}\right)\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              9. pow2N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              10. lift-*.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              11. lift-*.f64N/A

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              12. lift-PI.f6467.7

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - \color{blue}{a} \cdot a\right)\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
            7. Applied rewrites67.7%

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \color{blue}{\frac{b \cdot b}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]

            if 1.05000000000000008e153 < b

            1. Initial program 0.0%

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(90 \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(2 \cdot \frac{{a}^{2}}{{y-scale}^{2}} - 2 \cdot \frac{{b}^{2}}{{x-scale}^{2}}\right)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)}}{\mathsf{PI}\left(\right)} \]
            4. Step-by-step derivation
              1. Applied rewrites0.0%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(90 \cdot \left(\frac{x-scale}{angle} \cdot \frac{y-scale \cdot \left(2 \cdot \frac{a \cdot a}{y-scale \cdot y-scale} - 2 \cdot \frac{b \cdot b}{x-scale \cdot x-scale}\right)}{\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
              2. Taylor expanded in a around 0

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \color{blue}{\frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
              3. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{\color{blue}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                2. lower-/.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \color{blue}{\left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                3. lower-*.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)}{\mathsf{PI}\left(\right)} \]
                4. lower-*.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
                5. lift-PI.f6456.7

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
              4. Applied rewrites56.7%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \color{blue}{\frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
            5. Recombined 3 regimes into one program.
            6. Add Preprocessing

            Alternative 7: 52.6% accurate, 21.3× speedup?

            \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 5.8 \cdot 10^{+52}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \end{array} \]
            b_m = (fabs.f64 b)
            (FPCore (a b_m angle x-scale y-scale)
             :precision binary64
             (if (<= b_m 5.8e+52)
               (*
                180.0
                (/
                 (atan (* (/ y-scale x-scale) (* 0.005555555555555556 (* angle (PI)))))
                 (PI)))
               (*
                180.0
                (/ (atan (* -180.0 (/ y-scale (* angle (* x-scale (PI)))))) (PI)))))
            \begin{array}{l}
            b_m = \left|b\right|
            
            \\
            \begin{array}{l}
            \mathbf{if}\;b\_m \leq 5.8 \cdot 10^{+52}:\\
            \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if b < 5.8e52

              1. Initial program 13.4%

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(2 \cdot \left({a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)}{x-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right)}}{\mathsf{PI}\left(\right)} \]
              4. Applied rewrites31.5%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
              5. Taylor expanded in a around inf

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
              6. Step-by-step derivation
                1. times-fracN/A

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                3. lift-/.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                4. quot-tanN/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                5. lower-tan.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                6. lift-*.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                7. lift-PI.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                8. lift-*.f6451.0

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              7. Applied rewrites51.0%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
              8. Taylor expanded in angle around 0

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                2. lift-PI.f64N/A

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                3. lift-*.f6449.1

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
              10. Applied rewrites49.1%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]

              if 5.8e52 < b

              1. Initial program 12.8%

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(90 \cdot \left(\frac{x-scale}{angle} \cdot \frac{y-scale \cdot \left(2 \cdot \frac{a \cdot a}{y-scale \cdot y-scale} - 2 \cdot \frac{b \cdot b}{x-scale \cdot x-scale}\right)}{\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
                2. Taylor expanded in a around 0

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \color{blue}{\frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                3. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{\color{blue}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                  2. lower-/.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \color{blue}{\left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                  3. lower-*.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)}{\mathsf{PI}\left(\right)} \]
                  4. lower-*.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
                  5. lift-PI.f6464.3

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
                4. Applied rewrites64.3%

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \color{blue}{\frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
              5. Recombined 2 regimes into one program.
              6. Add Preprocessing

              Alternative 8: 28.3% accurate, 21.3× speedup?

              \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;a \leq 1.55 \cdot 10^{-249}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)}\\ \end{array} \end{array} \]
              b_m = (fabs.f64 b)
              (FPCore (a b_m angle x-scale y-scale)
               :precision binary64
               (if (<= a 1.55e-249)
                 (* 180.0 (/ (atan (* -180.0 (/ x-scale (* angle (* y-scale (PI)))))) (PI)))
                 (*
                  180.0
                  (/
                   (atan (* (/ y-scale x-scale) (* 0.005555555555555556 (* angle (PI)))))
                   (PI)))))
              \begin{array}{l}
              b_m = \left|b\right|
              
              \\
              \begin{array}{l}
              \mathbf{if}\;a \leq 1.55 \cdot 10^{-249}:\\
              \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\\
              
              \mathbf{else}:\\
              \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if a < 1.54999999999999993e-249

                1. Initial program 17.1%

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(90 \cdot \left(\frac{x-scale}{angle} \cdot \frac{y-scale \cdot \left(2 \cdot \frac{a \cdot a}{y-scale \cdot y-scale} - 2 \cdot \frac{b \cdot b}{x-scale \cdot x-scale}\right)}{\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
                  2. Taylor expanded in a around inf

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \color{blue}{\frac{x-scale}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                  3. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{\color{blue}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                    2. lower-/.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \color{blue}{\left(y-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                    3. lower-*.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)}{\mathsf{PI}\left(\right)} \]
                    4. lower-*.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
                    5. lift-PI.f6417.8

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
                  4. Applied rewrites17.8%

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \color{blue}{\frac{x-scale}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]

                  if 1.54999999999999993e-249 < a

                  1. Initial program 8.9%

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-1}{2} \cdot \frac{y-scale \cdot \left(2 \cdot \left({a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)}{x-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right)}}{\mathsf{PI}\left(\right)} \]
                  4. Applied rewrites24.6%

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
                  5. Taylor expanded in a around inf

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                  6. Step-by-step derivation
                    1. times-fracN/A

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                    3. lift-/.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                    4. quot-tanN/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                    5. lower-tan.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                    6. lift-*.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                    7. lift-PI.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                    8. lift-*.f6455.1

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  7. Applied rewrites55.1%

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
                  8. Taylor expanded in angle around 0

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  9. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                    2. lift-PI.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                    3. lift-*.f6456.3

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  10. Applied rewrites56.3%

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                5. Recombined 2 regimes into one program.
                6. Add Preprocessing

                Alternative 9: 44.4% accurate, 22.2× speedup?

                \[\begin{array}{l} b_m = \left|b\right| \\ 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \end{array} \]
                b_m = (fabs.f64 b)
                (FPCore (a b_m angle x-scale y-scale)
                 :precision binary64
                 (*
                  180.0
                  (/
                   (atan (* (/ y-scale x-scale) (* 0.005555555555555556 (* angle (PI)))))
                   (PI))))
                \begin{array}{l}
                b_m = \left|b\right|
                
                \\
                180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)}
                \end{array}
                
                Derivation
                1. Initial program 13.3%

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
                5. Taylor expanded in a around inf

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                6. Step-by-step derivation
                  1. times-fracN/A

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                  3. lift-/.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                  4. quot-tanN/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  5. lower-tan.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  7. lift-PI.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  8. lift-*.f6448.7

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                7. Applied rewrites48.7%

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
                8. Taylor expanded in angle around 0

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                9. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  2. lift-PI.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  3. lift-*.f6446.6

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                10. Applied rewrites46.6%

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                11. Add Preprocessing

                Alternative 10: 39.5% accurate, 22.2× speedup?

                \[\begin{array}{l} b_m = \left|b\right| \\ 180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{x-scale}\right)}{\mathsf{PI}\left(\right)} \end{array} \]
                b_m = (fabs.f64 b)
                (FPCore (a b_m angle x-scale y-scale)
                 :precision binary64
                 (*
                  180.0
                  (/
                   (atan (* 0.005555555555555556 (/ (* angle (* y-scale (PI))) x-scale)))
                   (PI))))
                \begin{array}{l}
                b_m = \left|b\right|
                
                \\
                180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{x-scale}\right)}{\mathsf{PI}\left(\right)}
                \end{array}
                
                Derivation
                1. Initial program 13.3%

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(2, {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}, 2 \cdot {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{2}\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)}}{\mathsf{PI}\left(\right)} \]
                5. Taylor expanded in a around inf

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                6. Step-by-step derivation
                  1. times-fracN/A

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\color{blue}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                  3. lift-/.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\cos \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}\right)}{\mathsf{PI}\left(\right)} \]
                  4. quot-tanN/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  5. lower-tan.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  7. lift-PI.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                  8. lift-*.f6448.7

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{\mathsf{PI}\left(\right)} \]
                7. Applied rewrites48.7%

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}{\mathsf{PI}\left(\right)} \]
                8. Taylor expanded in angle around 0

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{180} \cdot \frac{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{x-scale}}\right)}{\mathsf{PI}\left(\right)} \]
                9. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{180} \cdot \frac{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{x-scale}\right)}{\mathsf{PI}\left(\right)} \]
                  2. lower-/.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{180} \cdot \frac{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{x-scale}\right)}{\mathsf{PI}\left(\right)} \]
                  3. lift-*.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{180} \cdot \frac{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{x-scale}\right)}{\mathsf{PI}\left(\right)} \]
                  4. lift-PI.f64N/A

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{1}{180} \cdot \frac{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{x-scale}\right)}{\mathsf{PI}\left(\right)} \]
                  5. lift-*.f6441.1

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{x-scale}\right)}{\mathsf{PI}\left(\right)} \]
                10. Applied rewrites41.1%

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(0.005555555555555556 \cdot \frac{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{x-scale}}\right)}{\mathsf{PI}\left(\right)} \]
                11. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2025054 
                (FPCore (a b angle x-scale y-scale)
                  :name "raw-angle from scale-rotated-ellipse"
                  :precision binary64
                  (* 180.0 (/ (atan (/ (- (- (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) (PI)))) 2.0) (pow (* b (sin (* (/ angle 180.0) (PI)))) 2.0)) y-scale) y-scale) (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) (PI)))) 2.0) (pow (* b (cos (* (/ angle 180.0) (PI)))) 2.0)) x-scale) x-scale)) (sqrt (+ (pow (- (/ (/ (+ (pow (* a (sin (* (/ angle 180.0) (PI)))) 2.0) (pow (* b (cos (* (/ angle 180.0) (PI)))) 2.0)) x-scale) x-scale) (/ (/ (+ (pow (* a (cos (* (/ angle 180.0) (PI)))) 2.0) (pow (* b (sin (* (/ angle 180.0) (PI)))) 2.0)) y-scale) y-scale)) 2.0) (pow (/ (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) (PI)))) (cos (* (/ angle 180.0) (PI)))) x-scale) y-scale) 2.0)))) (/ (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) (PI)))) (cos (* (/ angle 180.0) (PI)))) x-scale) y-scale))) (PI))))