raw-angle from scale-rotated-ellipse

Percentage Accurate: 17.1% → 57.5%
Time: 45.9s
Alternatives: 20
Speedup: 26.0×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{angle}{180} \cdot \pi\\ 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)}{\pi} \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))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = (angle / 180.0) * ((double) M_PI);
	double t_1 = cos(t_0);
	double t_2 = sin(t_0);
	double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
	double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
	double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
	return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = (angle / 180.0) * Math.PI;
	double t_1 = Math.cos(t_0);
	double t_2 = Math.sin(t_0);
	double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
	double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
	double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
	return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = (angle / 180.0) * math.pi
	t_1 = math.cos(t_0)
	t_2 = math.sin(t_0)
	t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale
	t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale
	t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale
	return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(Float64(angle / 180.0) * pi)
	t_1 = cos(t_0)
	t_2 = sin(t_0)
	t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale)
	t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale)
	t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale)
	return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi))
end
function tmp = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = (angle / 180.0) * pi;
	t_1 = cos(t_0);
	t_2 = sin(t_0);
	t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
	t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale;
	t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale;
	tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi);
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
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)}{\pi}
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 17.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{angle}{180} \cdot \pi\\ 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)}{\pi} \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))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = (angle / 180.0) * ((double) M_PI);
	double t_1 = cos(t_0);
	double t_2 = sin(t_0);
	double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
	double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
	double t_5 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
	return 180.0 * (atan((((t_4 - t_5) - sqrt((pow((t_5 - t_4), 2.0) + pow(t_3, 2.0)))) / t_3)) / ((double) M_PI));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = (angle / 180.0) * Math.PI;
	double t_1 = Math.cos(t_0);
	double t_2 = Math.sin(t_0);
	double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
	double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale;
	double t_5 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale;
	return 180.0 * (Math.atan((((t_4 - t_5) - Math.sqrt((Math.pow((t_5 - t_4), 2.0) + Math.pow(t_3, 2.0)))) / t_3)) / Math.PI);
}
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = (angle / 180.0) * math.pi
	t_1 = math.cos(t_0)
	t_2 = math.sin(t_0)
	t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale
	t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / y_45_scale) / y_45_scale
	t_5 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / x_45_scale) / x_45_scale
	return 180.0 * (math.atan((((t_4 - t_5) - math.sqrt((math.pow((t_5 - t_4), 2.0) + math.pow(t_3, 2.0)))) / t_3)) / math.pi)
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(Float64(angle / 180.0) * pi)
	t_1 = cos(t_0)
	t_2 = sin(t_0)
	t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale)
	t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale)
	t_5 = Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale)
	return Float64(180.0 * Float64(atan(Float64(Float64(Float64(t_4 - t_5) - sqrt(Float64((Float64(t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi))
end
function tmp = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = (angle / 180.0) * pi;
	t_1 = cos(t_0);
	t_2 = sin(t_0);
	t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_2) * t_1) / x_45_scale) / y_45_scale;
	t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / y_45_scale) / y_45_scale;
	t_5 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / x_45_scale) / x_45_scale;
	tmp = 180.0 * (atan((((t_4 - t_5) - sqrt((((t_5 - t_4) ^ 2.0) + (t_3 ^ 2.0)))) / t_3)) / pi);
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[Power[N[(a * t$95$2), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, N[(180.0 * N[(N[ArcTan[N[(N[(N[(t$95$4 - t$95$5), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(t$95$5 - t$95$4), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
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)}{\pi}
\end{array}
\end{array}

Alternative 1: 57.5% accurate, 5.5× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \sin t\_0\\ t_2 := \cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\ \mathbf{if}\;b\_m \leq 9 \cdot 10^{-98}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos t\_0}\right)}{\pi}\\ \mathbf{elif}\;b\_m \leq 1.35 \cdot 10^{-28}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \left(\frac{2 \cdot \left(b\_m \cdot \left(b\_m \cdot \frac{t\_2 + 1}{2}\right) + \left(a \cdot a\right) \cdot \left(0.5 + t\_2 \cdot -0.5\right)\right)}{x-scale \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)} \cdot \frac{y-scale}{b\_m \cdot b\_m - a \cdot a}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\sqrt{1 + \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)} \cdot \frac{\frac{y-scale \cdot \sqrt{0.5}}{0 - x-scale}}{t\_1}\right)}{\pi}\\ \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)))
        (t_1 (sin t_0))
        (t_2 (cos (* (* angle PI) 0.011111111111111112))))
   (if (<= b_m 9e-98)
     (/ (* 180.0 (atan (/ (* y-scale t_1) (* x-scale (cos t_0))))) PI)
     (if (<= b_m 1.35e-28)
       (/
        (*
         180.0
         (atan
          (*
           -0.5
           (*
            (/
             (*
              2.0
              (+
               (* b_m (* b_m (/ (+ t_2 1.0) 2.0)))
               (* (* a a) (+ 0.5 (* t_2 -0.5)))))
             (* x-scale (sin (* angle (/ PI 180.0)))))
            (/ y-scale (- (* b_m b_m) (* a a)))))))
        PI)
       (/
        (*
         180.0
         (atan
          (*
           (sqrt (+ 1.0 (cos (* angle (* PI 0.011111111111111112)))))
           (/ (/ (* y-scale (sqrt 0.5)) (- 0.0 x-scale)) t_1))))
        PI)))))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = sin(t_0);
	double t_2 = cos(((angle * ((double) M_PI)) * 0.011111111111111112));
	double tmp;
	if (b_m <= 9e-98) {
		tmp = (180.0 * atan(((y_45_scale * t_1) / (x_45_scale * cos(t_0))))) / ((double) M_PI);
	} else if (b_m <= 1.35e-28) {
		tmp = (180.0 * atan((-0.5 * (((2.0 * ((b_m * (b_m * ((t_2 + 1.0) / 2.0))) + ((a * a) * (0.5 + (t_2 * -0.5))))) / (x_45_scale * sin((angle * (((double) M_PI) / 180.0))))) * (y_45_scale / ((b_m * b_m) - (a * a))))))) / ((double) M_PI);
	} else {
		tmp = (180.0 * atan((sqrt((1.0 + cos((angle * (((double) M_PI) * 0.011111111111111112))))) * (((y_45_scale * sqrt(0.5)) / (0.0 - x_45_scale)) / t_1)))) / ((double) M_PI);
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.sin(t_0);
	double t_2 = Math.cos(((angle * Math.PI) * 0.011111111111111112));
	double tmp;
	if (b_m <= 9e-98) {
		tmp = (180.0 * Math.atan(((y_45_scale * t_1) / (x_45_scale * Math.cos(t_0))))) / Math.PI;
	} else if (b_m <= 1.35e-28) {
		tmp = (180.0 * Math.atan((-0.5 * (((2.0 * ((b_m * (b_m * ((t_2 + 1.0) / 2.0))) + ((a * a) * (0.5 + (t_2 * -0.5))))) / (x_45_scale * Math.sin((angle * (Math.PI / 180.0))))) * (y_45_scale / ((b_m * b_m) - (a * a))))))) / Math.PI;
	} else {
		tmp = (180.0 * Math.atan((Math.sqrt((1.0 + Math.cos((angle * (Math.PI * 0.011111111111111112))))) * (((y_45_scale * Math.sqrt(0.5)) / (0.0 - x_45_scale)) / t_1)))) / Math.PI;
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle, x_45_scale, y_45_scale):
	t_0 = 0.005555555555555556 * (angle * math.pi)
	t_1 = math.sin(t_0)
	t_2 = math.cos(((angle * math.pi) * 0.011111111111111112))
	tmp = 0
	if b_m <= 9e-98:
		tmp = (180.0 * math.atan(((y_45_scale * t_1) / (x_45_scale * math.cos(t_0))))) / math.pi
	elif b_m <= 1.35e-28:
		tmp = (180.0 * math.atan((-0.5 * (((2.0 * ((b_m * (b_m * ((t_2 + 1.0) / 2.0))) + ((a * a) * (0.5 + (t_2 * -0.5))))) / (x_45_scale * math.sin((angle * (math.pi / 180.0))))) * (y_45_scale / ((b_m * b_m) - (a * a))))))) / math.pi
	else:
		tmp = (180.0 * math.atan((math.sqrt((1.0 + math.cos((angle * (math.pi * 0.011111111111111112))))) * (((y_45_scale * math.sqrt(0.5)) / (0.0 - x_45_scale)) / t_1)))) / math.pi
	return tmp
b_m = abs(b)
function code(a, b_m, angle, x_45_scale, y_45_scale)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_1 = sin(t_0)
	t_2 = cos(Float64(Float64(angle * pi) * 0.011111111111111112))
	tmp = 0.0
	if (b_m <= 9e-98)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * t_1) / Float64(x_45_scale * cos(t_0))))) / pi);
	elseif (b_m <= 1.35e-28)
		tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(Float64(Float64(2.0 * Float64(Float64(b_m * Float64(b_m * Float64(Float64(t_2 + 1.0) / 2.0))) + Float64(Float64(a * a) * Float64(0.5 + Float64(t_2 * -0.5))))) / Float64(x_45_scale * sin(Float64(angle * Float64(pi / 180.0))))) * Float64(y_45_scale / Float64(Float64(b_m * b_m) - Float64(a * a))))))) / pi);
	else
		tmp = Float64(Float64(180.0 * atan(Float64(sqrt(Float64(1.0 + cos(Float64(angle * Float64(pi * 0.011111111111111112))))) * Float64(Float64(Float64(y_45_scale * sqrt(0.5)) / Float64(0.0 - x_45_scale)) / t_1)))) / pi);
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
	t_0 = 0.005555555555555556 * (angle * pi);
	t_1 = sin(t_0);
	t_2 = cos(((angle * pi) * 0.011111111111111112));
	tmp = 0.0;
	if (b_m <= 9e-98)
		tmp = (180.0 * atan(((y_45_scale * t_1) / (x_45_scale * cos(t_0))))) / pi;
	elseif (b_m <= 1.35e-28)
		tmp = (180.0 * atan((-0.5 * (((2.0 * ((b_m * (b_m * ((t_2 + 1.0) / 2.0))) + ((a * a) * (0.5 + (t_2 * -0.5))))) / (x_45_scale * sin((angle * (pi / 180.0))))) * (y_45_scale / ((b_m * b_m) - (a * a))))))) / pi;
	else
		tmp = (180.0 * atan((sqrt((1.0 + cos((angle * (pi * 0.011111111111111112))))) * (((y_45_scale * sqrt(0.5)) / (0.0 - x_45_scale)) / t_1)))) / pi;
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 9e-98], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 1.35e-28], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(N[(N[(2.0 * N[(N[(b$95$m * N[(b$95$m * N[(N[(t$95$2 + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * a), $MachinePrecision] * N[(0.5 + N[(t$95$2 * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Sin[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale / N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[Sqrt[N[(1.0 + N[Cos[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(y$45$scale * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\
\mathbf{if}\;b\_m \leq 9 \cdot 10^{-98}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos t\_0}\right)}{\pi}\\

\mathbf{elif}\;b\_m \leq 1.35 \cdot 10^{-28}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \left(\frac{2 \cdot \left(b\_m \cdot \left(b\_m \cdot \frac{t\_2 + 1}{2}\right) + \left(a \cdot a\right) \cdot \left(0.5 + t\_2 \cdot -0.5\right)\right)}{x-scale \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)} \cdot \frac{y-scale}{b\_m \cdot b\_m - a \cdot a}\right)\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\sqrt{1 + \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)} \cdot \frac{\frac{y-scale \cdot \sqrt{0.5}}{0 - x-scale}}{t\_1}\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 8.99999999999999994e-98

    1. Initial program 19.4%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
    2. Simplified18.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    5. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    6. Simplified29.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      3. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. PI-lowering-PI.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. cos-lowering-cos.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. PI-lowering-PI.f6445.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    9. Simplified45.9%

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

    if 8.99999999999999994e-98 < b < 1.3499999999999999e-28

    1. Initial program 22.7%

      \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
    2. Simplified29.4%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    5. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    6. Simplified39.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{pow.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{\_.f64}\left(b, a\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    8. Step-by-step derivation
      1. Simplified50.2%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{y-scale \cdot \left(2 \cdot \left(\left(b \cdot b\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(a \cdot a\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)\right)}{x-scale \cdot \left(\left(\color{blue}{1} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)}\right)}{\pi} \]
      2. Applied egg-rr48.5%

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

      if 1.3499999999999999e-28 < b

      1. Initial program 14.8%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
      2. Simplified11.1%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. Simplified30.6%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. PI-lowering-PI.f6459.8%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Simplified59.8%

        \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
      10. Step-by-step derivation
        1. unpow1N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{1}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{\left(\frac{1}{2} + \frac{1}{2}\right)}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. pow-prod-upN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{\frac{1}{2}} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. pow-prod-downN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. Applied egg-rr66.1%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{y-scale \cdot \color{blue}{{\left(\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}\right)}^{0.5}}}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi} \]
      12. Taylor expanded in y-scale around 0

        \[\leadsto \color{blue}{180 \cdot \frac{\tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale \cdot \sqrt{\frac{1}{2}}}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{1 + \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)}} \]
      13. Step-by-step derivation
        1. associate-*r/N/A

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

          \[\leadsto \mathsf{/.f64}\left(\left(180 \cdot \tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale \cdot \sqrt{\frac{1}{2}}}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sqrt{1 + \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      14. Simplified69.5%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\sqrt{1 + \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)} \cdot \left(0 - \frac{\frac{y-scale \cdot \sqrt{0.5}}{x-scale}}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\right)}{\pi}} \]
    9. Recombined 3 regimes into one program.
    10. Final simplification51.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 9 \cdot 10^{-98}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{-28}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \left(\frac{2 \cdot \left(b \cdot \left(b \cdot \frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}\right) + \left(a \cdot a\right) \cdot \left(0.5 + \cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot -0.5\right)\right)}{x-scale \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)} \cdot \frac{y-scale}{b \cdot b - a \cdot a}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\sqrt{1 + \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)} \cdot \frac{\frac{y-scale \cdot \sqrt{0.5}}{0 - x-scale}}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\ \end{array} \]
    11. Add Preprocessing

    Alternative 2: 57.0% accurate, 4.6× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;b\_m \leq 3.1 \cdot 10^{-65}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot {\left(\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}\right)}^{0.5}}{\sin \left(\sqrt{\pi} \cdot \left(\frac{angle}{180} \cdot \sqrt{\pi}\right)\right) \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \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 3.1e-65)
         (/ (* 180.0 (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0))))) PI)
         (/
          (*
           180.0
           (atan
            (/
             (*
              y-scale
              (pow
               (/ (+ (cos (* (* angle PI) 0.011111111111111112)) 1.0) 2.0)
               0.5))
             (*
              (sin (* (sqrt PI) (* (/ angle 180.0) (sqrt PI))))
              (- 0.0 x-scale)))))
          PI))))
    b_m = fabs(b);
    double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
    	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
    	double tmp;
    	if (b_m <= 3.1e-65) {
    		tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / ((double) M_PI);
    	} else {
    		tmp = (180.0 * atan(((y_45_scale * pow(((cos(((angle * ((double) M_PI)) * 0.011111111111111112)) + 1.0) / 2.0), 0.5)) / (sin((sqrt(((double) M_PI)) * ((angle / 180.0) * sqrt(((double) M_PI))))) * (0.0 - x_45_scale))))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    b_m = Math.abs(b);
    public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
    	double t_0 = 0.005555555555555556 * (angle * Math.PI);
    	double tmp;
    	if (b_m <= 3.1e-65) {
    		tmp = (180.0 * Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0))))) / Math.PI;
    	} else {
    		tmp = (180.0 * Math.atan(((y_45_scale * Math.pow(((Math.cos(((angle * Math.PI) * 0.011111111111111112)) + 1.0) / 2.0), 0.5)) / (Math.sin((Math.sqrt(Math.PI) * ((angle / 180.0) * Math.sqrt(Math.PI)))) * (0.0 - x_45_scale))))) / Math.PI;
    	}
    	return tmp;
    }
    
    b_m = math.fabs(b)
    def code(a, b_m, angle, x_45_scale, y_45_scale):
    	t_0 = 0.005555555555555556 * (angle * math.pi)
    	tmp = 0
    	if b_m <= 3.1e-65:
    		tmp = (180.0 * math.atan(((y_45_scale * math.sin(t_0)) / (x_45_scale * math.cos(t_0))))) / math.pi
    	else:
    		tmp = (180.0 * math.atan(((y_45_scale * math.pow(((math.cos(((angle * math.pi) * 0.011111111111111112)) + 1.0) / 2.0), 0.5)) / (math.sin((math.sqrt(math.pi) * ((angle / 180.0) * math.sqrt(math.pi)))) * (0.0 - x_45_scale))))) / math.pi
    	return tmp
    
    b_m = abs(b)
    function code(a, b_m, angle, x_45_scale, y_45_scale)
    	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
    	tmp = 0.0
    	if (b_m <= 3.1e-65)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0))))) / pi);
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * (Float64(Float64(cos(Float64(Float64(angle * pi) * 0.011111111111111112)) + 1.0) / 2.0) ^ 0.5)) / Float64(sin(Float64(sqrt(pi) * Float64(Float64(angle / 180.0) * sqrt(pi)))) * Float64(0.0 - x_45_scale))))) / pi);
    	end
    	return tmp
    end
    
    b_m = abs(b);
    function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
    	t_0 = 0.005555555555555556 * (angle * pi);
    	tmp = 0.0;
    	if (b_m <= 3.1e-65)
    		tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / pi;
    	else
    		tmp = (180.0 * atan(((y_45_scale * (((cos(((angle * pi) * 0.011111111111111112)) + 1.0) / 2.0) ^ 0.5)) / (sin((sqrt(pi) * ((angle / 180.0) * sqrt(pi)))) * (0.0 - x_45_scale))))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 3.1e-65], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Power[N[(N[(N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision] / 2.0), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(angle / 180.0), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
    
    \begin{array}{l}
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
    \mathbf{if}\;b\_m \leq 3.1 \cdot 10^{-65}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot {\left(\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}\right)}^{0.5}}{\sin \left(\sqrt{\pi} \cdot \left(\frac{angle}{180} \cdot \sqrt{\pi}\right)\right) \cdot \left(0 - x-scale\right)}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 3.10000000000000016e-65

      1. Initial program 19.4%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
      2. Simplified18.7%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. Simplified30.2%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. PI-lowering-PI.f64N/A

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. cos-lowering-cos.f64N/A

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. PI-lowering-PI.f6445.7%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Simplified45.7%

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

      if 3.10000000000000016e-65 < b

      1. Initial program 16.1%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
      2. Simplified14.6%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. Simplified31.8%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. PI-lowering-PI.f6452.9%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Simplified52.9%

        \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
      10. Step-by-step derivation
        1. unpow1N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{1}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{\left(\frac{1}{2} + \frac{1}{2}\right)}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. pow-prod-upN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{\frac{1}{2}} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. pow-prod-downN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. Applied egg-rr57.8%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{y-scale \cdot \color{blue}{{\left(\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}\right)}^{0.5}}}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi} \]
      12. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. add-sqr-sqrtN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. associate-*r*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \frac{1}{180}\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \frac{1}{180}\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. div-invN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{angle}{180}\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \left(\sqrt{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        12. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. PI-lowering-PI.f6459.1%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right), 1\right), 2\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      13. Applied egg-rr59.1%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{y-scale \cdot {\left(\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}\right)}^{0.5}}{x-scale \cdot \sin \color{blue}{\left(\left(\frac{angle}{180} \cdot \sqrt{\pi}\right) \cdot \sqrt{\pi}\right)}}\right)}{\pi} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification49.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 3.1 \cdot 10^{-65}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot {\left(\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}\right)}^{0.5}}{\sin \left(\sqrt{\pi} \cdot \left(\frac{angle}{180} \cdot \sqrt{\pi}\right)\right) \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 3: 58.0% accurate, 6.8× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;b\_m \leq 9 \cdot 10^{-58}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{\sqrt{\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}}}{\frac{x-scale}{y-scale}}}{0 - \sin \left(\frac{angle}{\frac{180}{\pi}}\right)}\right)}{\pi}\\ \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 9e-58)
         (/ (* 180.0 (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0))))) PI)
         (/
          (*
           180.0
           (atan
            (/
             (/
              (sqrt (/ (+ (cos (* (* angle PI) 0.011111111111111112)) 1.0) 2.0))
              (/ x-scale y-scale))
             (- 0.0 (sin (/ angle (/ 180.0 PI)))))))
          PI))))
    b_m = fabs(b);
    double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
    	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
    	double tmp;
    	if (b_m <= 9e-58) {
    		tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / ((double) M_PI);
    	} else {
    		tmp = (180.0 * atan(((sqrt(((cos(((angle * ((double) M_PI)) * 0.011111111111111112)) + 1.0) / 2.0)) / (x_45_scale / y_45_scale)) / (0.0 - sin((angle / (180.0 / ((double) M_PI)))))))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    b_m = Math.abs(b);
    public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
    	double t_0 = 0.005555555555555556 * (angle * Math.PI);
    	double tmp;
    	if (b_m <= 9e-58) {
    		tmp = (180.0 * Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0))))) / Math.PI;
    	} else {
    		tmp = (180.0 * Math.atan(((Math.sqrt(((Math.cos(((angle * Math.PI) * 0.011111111111111112)) + 1.0) / 2.0)) / (x_45_scale / y_45_scale)) / (0.0 - Math.sin((angle / (180.0 / Math.PI))))))) / Math.PI;
    	}
    	return tmp;
    }
    
    b_m = math.fabs(b)
    def code(a, b_m, angle, x_45_scale, y_45_scale):
    	t_0 = 0.005555555555555556 * (angle * math.pi)
    	tmp = 0
    	if b_m <= 9e-58:
    		tmp = (180.0 * math.atan(((y_45_scale * math.sin(t_0)) / (x_45_scale * math.cos(t_0))))) / math.pi
    	else:
    		tmp = (180.0 * math.atan(((math.sqrt(((math.cos(((angle * math.pi) * 0.011111111111111112)) + 1.0) / 2.0)) / (x_45_scale / y_45_scale)) / (0.0 - math.sin((angle / (180.0 / math.pi))))))) / math.pi
    	return tmp
    
    b_m = abs(b)
    function code(a, b_m, angle, x_45_scale, y_45_scale)
    	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
    	tmp = 0.0
    	if (b_m <= 9e-58)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0))))) / pi);
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(sqrt(Float64(Float64(cos(Float64(Float64(angle * pi) * 0.011111111111111112)) + 1.0) / 2.0)) / Float64(x_45_scale / y_45_scale)) / Float64(0.0 - sin(Float64(angle / Float64(180.0 / pi))))))) / pi);
    	end
    	return tmp
    end
    
    b_m = abs(b);
    function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
    	t_0 = 0.005555555555555556 * (angle * pi);
    	tmp = 0.0;
    	if (b_m <= 9e-58)
    		tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / pi;
    	else
    		tmp = (180.0 * atan(((sqrt(((cos(((angle * pi) * 0.011111111111111112)) + 1.0) / 2.0)) / (x_45_scale / y_45_scale)) / (0.0 - sin((angle / (180.0 / pi))))))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 9e-58], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[Sqrt[N[(N[(N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] / N[(x$45$scale / y$45$scale), $MachinePrecision]), $MachinePrecision] / N[(0.0 - N[Sin[N[(angle / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
    
    \begin{array}{l}
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
    \mathbf{if}\;b\_m \leq 9 \cdot 10^{-58}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{\sqrt{\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}}}{\frac{x-scale}{y-scale}}}{0 - \sin \left(\frac{angle}{\frac{180}{\pi}}\right)}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 9.0000000000000006e-58

      1. Initial program 19.1%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
      2. Simplified18.9%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. Simplified30.3%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. PI-lowering-PI.f64N/A

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. cos-lowering-cos.f64N/A

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. PI-lowering-PI.f6446.1%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Simplified46.1%

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

      if 9.0000000000000006e-58 < b

      1. Initial program 16.9%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
      2. Simplified13.5%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. Simplified31.4%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. PI-lowering-PI.f6455.1%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Simplified55.1%

        \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
      10. Step-by-step derivation
        1. unpow1N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{1}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{\left(\frac{1}{2} + \frac{1}{2}\right)}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. pow-prod-upN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{\frac{1}{2}} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. pow-prod-downN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \left({\left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{pow.f64}\left(\left({\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. Applied egg-rr60.5%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{y-scale \cdot \color{blue}{{\left(\frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) + 1}{2}\right)}^{0.5}}}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi} \]
      12. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\frac{\frac{y-scale \cdot {\left(\frac{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right) + 1}{2}\right)}^{\frac{1}{2}}}{x-scale}}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{y-scale \cdot {\left(\frac{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right) + 1}{2}\right)}^{\frac{1}{2}}}{x-scale}\right), \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      13. Applied egg-rr62.6%

        \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\color{blue}{\frac{\frac{\sqrt{\frac{1 + \cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}{2}}}{\frac{x-scale}{y-scale}}}{\sin \left(\frac{angle}{\frac{180}{\pi}}\right)}}\right)}{\pi} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification50.1%

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

    Alternative 4: 57.7% accurate, 9.1× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;b\_m \leq 1.08 \cdot 10^{-83}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0 - \frac{y-scale}{x-scale}}{\tan t\_0}\right)}{\pi}\\ \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 1.08e-83)
         (/ (* 180.0 (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0))))) PI)
         (/ (* 180.0 (atan (/ (- 0.0 (/ y-scale x-scale)) (tan t_0)))) PI))))
    b_m = fabs(b);
    double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
    	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
    	double tmp;
    	if (b_m <= 1.08e-83) {
    		tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / ((double) M_PI);
    	} else {
    		tmp = (180.0 * atan(((0.0 - (y_45_scale / x_45_scale)) / tan(t_0)))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    b_m = Math.abs(b);
    public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
    	double t_0 = 0.005555555555555556 * (angle * Math.PI);
    	double tmp;
    	if (b_m <= 1.08e-83) {
    		tmp = (180.0 * Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0))))) / Math.PI;
    	} else {
    		tmp = (180.0 * Math.atan(((0.0 - (y_45_scale / x_45_scale)) / Math.tan(t_0)))) / Math.PI;
    	}
    	return tmp;
    }
    
    b_m = math.fabs(b)
    def code(a, b_m, angle, x_45_scale, y_45_scale):
    	t_0 = 0.005555555555555556 * (angle * math.pi)
    	tmp = 0
    	if b_m <= 1.08e-83:
    		tmp = (180.0 * math.atan(((y_45_scale * math.sin(t_0)) / (x_45_scale * math.cos(t_0))))) / math.pi
    	else:
    		tmp = (180.0 * math.atan(((0.0 - (y_45_scale / x_45_scale)) / math.tan(t_0)))) / math.pi
    	return tmp
    
    b_m = abs(b)
    function code(a, b_m, angle, x_45_scale, y_45_scale)
    	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
    	tmp = 0.0
    	if (b_m <= 1.08e-83)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0))))) / pi);
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 - Float64(y_45_scale / x_45_scale)) / tan(t_0)))) / pi);
    	end
    	return tmp
    end
    
    b_m = abs(b);
    function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
    	t_0 = 0.005555555555555556 * (angle * pi);
    	tmp = 0.0;
    	if (b_m <= 1.08e-83)
    		tmp = (180.0 * atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0))))) / pi;
    	else
    		tmp = (180.0 * atan(((0.0 - (y_45_scale / x_45_scale)) / tan(t_0)))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.08e-83], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
    
    \begin{array}{l}
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
    \mathbf{if}\;b\_m \leq 1.08 \cdot 10^{-83}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0 - \frac{y-scale}{x-scale}}{\tan t\_0}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 1.08e-83

      1. Initial program 19.2%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
      2. Simplified18.9%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. Simplified30.1%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. PI-lowering-PI.f64N/A

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. cos-lowering-cos.f64N/A

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. PI-lowering-PI.f6445.9%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Simplified45.9%

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

      if 1.08e-83 < b

      1. Initial program 16.9%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
      2. Simplified14.0%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. Simplified31.9%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. PI-lowering-PI.f6453.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Simplified53.5%

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\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)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{y-scale}{x-scale}\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\frac{1}{\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)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\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)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. div-invN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. div-invN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        12. quot-tanN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \tan \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        14. associate-/l*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        16. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        17. PI-lowering-PI.f6453.2%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. Applied egg-rr53.2%

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\left(180 \cdot \tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale}{x-scale \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      14. Simplified56.4%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(0 - \frac{\frac{y-scale}{x-scale}}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification48.7%

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

    Alternative 5: 57.7% accurate, 9.1× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;b\_m \leq 1.55 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0 - \frac{y-scale}{x-scale}}{\tan t\_0}\right)}{\pi}\\ \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 1.55e-83)
         (* 180.0 (/ (atan (/ (* y-scale (sin t_0)) (* x-scale (cos t_0)))) PI))
         (/ (* 180.0 (atan (/ (- 0.0 (/ y-scale x-scale)) (tan t_0)))) PI))))
    b_m = fabs(b);
    double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
    	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
    	double tmp;
    	if (b_m <= 1.55e-83) {
    		tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0)))) / ((double) M_PI));
    	} else {
    		tmp = (180.0 * atan(((0.0 - (y_45_scale / x_45_scale)) / tan(t_0)))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    b_m = Math.abs(b);
    public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
    	double t_0 = 0.005555555555555556 * (angle * Math.PI);
    	double tmp;
    	if (b_m <= 1.55e-83) {
    		tmp = 180.0 * (Math.atan(((y_45_scale * Math.sin(t_0)) / (x_45_scale * Math.cos(t_0)))) / Math.PI);
    	} else {
    		tmp = (180.0 * Math.atan(((0.0 - (y_45_scale / x_45_scale)) / Math.tan(t_0)))) / Math.PI;
    	}
    	return tmp;
    }
    
    b_m = math.fabs(b)
    def code(a, b_m, angle, x_45_scale, y_45_scale):
    	t_0 = 0.005555555555555556 * (angle * math.pi)
    	tmp = 0
    	if b_m <= 1.55e-83:
    		tmp = 180.0 * (math.atan(((y_45_scale * math.sin(t_0)) / (x_45_scale * math.cos(t_0)))) / math.pi)
    	else:
    		tmp = (180.0 * math.atan(((0.0 - (y_45_scale / x_45_scale)) / math.tan(t_0)))) / math.pi
    	return tmp
    
    b_m = abs(b)
    function code(a, b_m, angle, x_45_scale, y_45_scale)
    	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
    	tmp = 0.0
    	if (b_m <= 1.55e-83)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * sin(t_0)) / Float64(x_45_scale * cos(t_0)))) / pi));
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 - Float64(y_45_scale / x_45_scale)) / tan(t_0)))) / pi);
    	end
    	return tmp
    end
    
    b_m = abs(b);
    function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
    	t_0 = 0.005555555555555556 * (angle * pi);
    	tmp = 0.0;
    	if (b_m <= 1.55e-83)
    		tmp = 180.0 * (atan(((y_45_scale * sin(t_0)) / (x_45_scale * cos(t_0)))) / pi);
    	else
    		tmp = (180.0 * atan(((0.0 - (y_45_scale / x_45_scale)) / tan(t_0)))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.55e-83], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
    
    \begin{array}{l}
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
    \mathbf{if}\;b\_m \leq 1.55 \cdot 10^{-83}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \sin t\_0}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0 - \frac{y-scale}{x-scale}}{\tan t\_0}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 1.54999999999999996e-83

      1. Initial program 19.2%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
      2. Add Preprocessing
      3. Taylor expanded in x-scale around 0

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \frac{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)}{{x-scale}^{2}}\right)}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\frac{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)}{{x-scale}^{2}}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{neg.f64}\left(\left(\frac{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)}{{x-scale}^{2}}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\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), \left({x-scale}^{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      5. Simplified23.6%

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

        \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(\frac{y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      7. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        3. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        6. PI-lowering-PI.f64N/A

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

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        8. cos-lowering-cos.f64N/A

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

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
        11. PI-lowering-PI.f6445.9%

          \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
      8. Simplified45.9%

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

      if 1.54999999999999996e-83 < b

      1. Initial program 16.9%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
      2. Simplified14.0%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. Simplified31.9%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. PI-lowering-PI.f6453.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      9. Simplified53.5%

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\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)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{y-scale}{x-scale}\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\frac{1}{\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)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\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)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. div-invN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. div-invN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        12. quot-tanN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \tan \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. tan-lowering-tan.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        14. associate-/l*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        16. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        17. PI-lowering-PI.f6453.2%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      11. Applied egg-rr53.2%

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\left(180 \cdot \tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale}{x-scale \cdot \tan \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
      14. Simplified56.4%

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

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

    Alternative 6: 57.6% accurate, 13.4× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 2.1 \cdot 10^{-57}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}\right) \cdot \left(0 - 180\right)}{\pi}\\ \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    (FPCore (a b_m angle x-scale y-scale)
     :precision binary64
     (if (<= b_m 2.1e-57)
       (/
        (*
         180.0
         (atan
          (/ (* y-scale (sin (* 0.005555555555555556 (* angle PI)))) x-scale)))
        PI)
       (/
        (*
         (atan (/ (/ y-scale x-scale) (tan (/ angle (/ 180.0 PI)))))
         (- 0.0 180.0))
        PI)))
    b_m = fabs(b);
    double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
    	double tmp;
    	if (b_m <= 2.1e-57) {
    		tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI))))) / x_45_scale))) / ((double) M_PI);
    	} else {
    		tmp = (atan(((y_45_scale / x_45_scale) / tan((angle / (180.0 / ((double) M_PI)))))) * (0.0 - 180.0)) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    b_m = Math.abs(b);
    public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
    	double tmp;
    	if (b_m <= 2.1e-57) {
    		tmp = (180.0 * Math.atan(((y_45_scale * Math.sin((0.005555555555555556 * (angle * Math.PI)))) / x_45_scale))) / Math.PI;
    	} else {
    		tmp = (Math.atan(((y_45_scale / x_45_scale) / Math.tan((angle / (180.0 / Math.PI))))) * (0.0 - 180.0)) / Math.PI;
    	}
    	return tmp;
    }
    
    b_m = math.fabs(b)
    def code(a, b_m, angle, x_45_scale, y_45_scale):
    	tmp = 0
    	if b_m <= 2.1e-57:
    		tmp = (180.0 * math.atan(((y_45_scale * math.sin((0.005555555555555556 * (angle * math.pi)))) / x_45_scale))) / math.pi
    	else:
    		tmp = (math.atan(((y_45_scale / x_45_scale) / math.tan((angle / (180.0 / math.pi))))) * (0.0 - 180.0)) / math.pi
    	return tmp
    
    b_m = abs(b)
    function code(a, b_m, angle, x_45_scale, y_45_scale)
    	tmp = 0.0
    	if (b_m <= 2.1e-57)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) / x_45_scale))) / pi);
    	else
    		tmp = Float64(Float64(atan(Float64(Float64(y_45_scale / x_45_scale) / tan(Float64(angle / Float64(180.0 / pi))))) * Float64(0.0 - 180.0)) / pi);
    	end
    	return tmp
    end
    
    b_m = abs(b);
    function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
    	tmp = 0.0;
    	if (b_m <= 2.1e-57)
    		tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * pi)))) / x_45_scale))) / pi;
    	else
    		tmp = (atan(((y_45_scale / x_45_scale) / tan((angle / (180.0 / pi))))) * (0.0 - 180.0)) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2.1e-57], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / N[Tan[N[(angle / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - 180.0), $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
    
    \begin{array}{l}
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b\_m \leq 2.1 \cdot 10^{-57}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}\right) \cdot \left(0 - 180\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 2.0999999999999999e-57

      1. Initial program 19.1%

        \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
      2. Simplified18.9%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      6. Simplified30.3%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{pow.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{\_.f64}\left(b, a\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Step-by-step derivation
        1. Simplified31.6%

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          3. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          6. PI-lowering-PI.f6445.2%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        4. Simplified45.2%

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

        if 2.0999999999999999e-57 < b

        1. Initial program 16.9%

          \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
        2. Simplified13.5%

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. Simplified31.4%

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          5. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          8. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          10. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          11. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          13. PI-lowering-PI.f6455.1%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. Simplified55.1%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\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)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{y-scale}{x-scale}\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          4. clear-numN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\frac{1}{\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)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\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)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          7. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          8. div-invN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          10. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          11. div-invN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          12. quot-tanN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \tan \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          13. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          14. associate-/l*N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          16. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          17. PI-lowering-PI.f6454.7%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. Applied egg-rr54.7%

          \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\color{blue}{\frac{y-scale}{x-scale} \cdot \frac{1}{\tan \left(angle \cdot \frac{\pi}{180}\right)}}\right)}{\pi} \]
        12. Step-by-step derivation
          1. atan-negN/A

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\left(\frac{y-scale}{x-scale} \cdot \frac{1}{\tan \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          4. un-div-invN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{y-scale}{x-scale}}{\tan \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{y-scale}{x-scale}\right), \tan \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \tan \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          7. tan-lowering-tan.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          8. clear-numN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\left(angle \cdot \frac{1}{\frac{180}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          9. un-div-invN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\left(\frac{angle}{\frac{180}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\mathsf{/.f64}\left(angle, \left(\frac{180}{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          12. PI-lowering-PI.f6456.3%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{neg.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. Applied egg-rr56.3%

          \[\leadsto \frac{180 \cdot \color{blue}{\left(-\tan^{-1} \left(\frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}\right)\right)}}{\pi} \]
      9. Recombined 2 regimes into one program.
      10. Final simplification47.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.1 \cdot 10^{-57}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan^{-1} \left(\frac{\frac{y-scale}{x-scale}}{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}\right) \cdot \left(0 - 180\right)}{\pi}\\ \end{array} \]
      11. Add Preprocessing

      Alternative 7: 57.3% accurate, 13.4× speedup?

      \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 3.7 \cdot 10^{-57}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{y-scale}{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}}{0 - x-scale}\right)}{\pi}\\ \end{array} \end{array} \]
      b_m = (fabs.f64 b)
      (FPCore (a b_m angle x-scale y-scale)
       :precision binary64
       (if (<= b_m 3.7e-57)
         (/
          (*
           180.0
           (atan
            (/ (* y-scale (sin (* 0.005555555555555556 (* angle PI)))) x-scale)))
          PI)
         (/
          (*
           180.0
           (atan (/ (/ y-scale (tan (/ angle (/ 180.0 PI)))) (- 0.0 x-scale))))
          PI)))
      b_m = fabs(b);
      double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
      	double tmp;
      	if (b_m <= 3.7e-57) {
      		tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI))))) / x_45_scale))) / ((double) M_PI);
      	} else {
      		tmp = (180.0 * atan(((y_45_scale / tan((angle / (180.0 / ((double) M_PI))))) / (0.0 - x_45_scale)))) / ((double) M_PI);
      	}
      	return tmp;
      }
      
      b_m = Math.abs(b);
      public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
      	double tmp;
      	if (b_m <= 3.7e-57) {
      		tmp = (180.0 * Math.atan(((y_45_scale * Math.sin((0.005555555555555556 * (angle * Math.PI)))) / x_45_scale))) / Math.PI;
      	} else {
      		tmp = (180.0 * Math.atan(((y_45_scale / Math.tan((angle / (180.0 / Math.PI)))) / (0.0 - x_45_scale)))) / Math.PI;
      	}
      	return tmp;
      }
      
      b_m = math.fabs(b)
      def code(a, b_m, angle, x_45_scale, y_45_scale):
      	tmp = 0
      	if b_m <= 3.7e-57:
      		tmp = (180.0 * math.atan(((y_45_scale * math.sin((0.005555555555555556 * (angle * math.pi)))) / x_45_scale))) / math.pi
      	else:
      		tmp = (180.0 * math.atan(((y_45_scale / math.tan((angle / (180.0 / math.pi)))) / (0.0 - x_45_scale)))) / math.pi
      	return tmp
      
      b_m = abs(b)
      function code(a, b_m, angle, x_45_scale, y_45_scale)
      	tmp = 0.0
      	if (b_m <= 3.7e-57)
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) / x_45_scale))) / pi);
      	else
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / tan(Float64(angle / Float64(180.0 / pi)))) / Float64(0.0 - x_45_scale)))) / pi);
      	end
      	return tmp
      end
      
      b_m = abs(b);
      function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
      	tmp = 0.0;
      	if (b_m <= 3.7e-57)
      		tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * pi)))) / x_45_scale))) / pi;
      	else
      		tmp = (180.0 * atan(((y_45_scale / tan((angle / (180.0 / pi)))) / (0.0 - x_45_scale)))) / pi;
      	end
      	tmp_2 = tmp;
      end
      
      b_m = N[Abs[b], $MachinePrecision]
      code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 3.7e-57], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / N[Tan[N[(angle / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
      
      \begin{array}{l}
      b_m = \left|b\right|
      
      \\
      \begin{array}{l}
      \mathbf{if}\;b\_m \leq 3.7 \cdot 10^{-57}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{y-scale}{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}}{0 - x-scale}\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 3.7e-57

        1. Initial program 19.1%

          \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
        2. Simplified18.9%

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. Simplified30.3%

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{pow.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{\_.f64}\left(b, a\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. Step-by-step derivation
          1. Simplified31.6%

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            3. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. PI-lowering-PI.f6445.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          4. Simplified45.2%

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

          if 3.7e-57 < b

          1. Initial program 16.9%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
          2. Simplified13.5%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          5. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          6. Simplified31.4%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          8. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. neg-lowering-neg.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            10. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. PI-lowering-PI.f6455.1%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          9. Simplified55.1%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\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)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{y-scale}{x-scale}\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            4. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\frac{1}{\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)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\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)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            7. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. div-invN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. div-invN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            12. quot-tanN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \tan \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            14. associate-/l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            16. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            17. PI-lowering-PI.f6454.7%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          11. Applied egg-rr54.7%

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\color{blue}{\frac{y-scale}{x-scale} \cdot \frac{1}{\tan \left(angle \cdot \frac{\pi}{180}\right)}}\right)}{\pi} \]
          12. Step-by-step derivation
            1. associate-*l/N/A

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \frac{1}{\tan \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)}\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            3. un-div-invN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{y-scale}{\tan \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)}\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, \tan \left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, \mathsf{tan.f64}\left(\left(angle \cdot \frac{1}{\frac{180}{\mathsf{PI}\left(\right)}}\right)\right)\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            7. un-div-invN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, \mathsf{tan.f64}\left(\left(\frac{angle}{\frac{180}{\mathsf{PI}\left(\right)}}\right)\right)\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, \mathsf{tan.f64}\left(\mathsf{/.f64}\left(angle, \left(\frac{180}{\mathsf{PI}\left(\right)}\right)\right)\right)\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, \mathsf{tan.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            10. PI-lowering-PI.f6453.1%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(y-scale, \mathsf{tan.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          13. Applied egg-rr53.1%

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\color{blue}{\frac{\frac{y-scale}{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}}{x-scale}}\right)}{\pi} \]
        9. Recombined 2 regimes into one program.
        10. Final simplification47.1%

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 3.7 \cdot 10^{-57}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{y-scale}{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}}{0 - x-scale}\right)}{\pi}\\ \end{array} \]
        11. Add Preprocessing

        Alternative 8: 55.9% accurate, 13.5× speedup?

        \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 2.45 \cdot 10^{-57}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\ \mathbf{elif}\;b\_m \leq 2.1 \cdot 10^{+128}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(5.7155921353452215 \cdot 10^{-8} \cdot \left(0 - \pi \cdot \pi\right)\right)}{\pi \cdot \pi} - \frac{180}{\pi}}{angle}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\ \end{array} \end{array} \]
        b_m = (fabs.f64 b)
        (FPCore (a b_m angle x-scale y-scale)
         :precision binary64
         (if (<= b_m 2.45e-57)
           (/
            (*
             180.0
             (atan
              (/ (* y-scale (sin (* 0.005555555555555556 (* angle PI)))) x-scale)))
            PI)
           (if (<= b_m 2.1e+128)
             (/
              (*
               180.0
               (atan
                (*
                 (/ y-scale x-scale)
                 (/
                  (-
                   (*
                    (* -32400.0 (* angle angle))
                    (/ (* PI (* 5.7155921353452215e-8 (- 0.0 (* PI PI)))) (* PI PI)))
                   (/ 180.0 PI))
                  angle))))
              PI)
             (*
              180.0
              (/
               (atan
                (/ -1.0 (/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-scale)))
               PI)))))
        b_m = fabs(b);
        double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
        	double tmp;
        	if (b_m <= 2.45e-57) {
        		tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI))))) / x_45_scale))) / ((double) M_PI);
        	} else if (b_m <= 2.1e+128) {
        		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((((double) M_PI) * (5.7155921353452215e-8 * (0.0 - (((double) M_PI) * ((double) M_PI))))) / (((double) M_PI) * ((double) M_PI)))) - (180.0 / ((double) M_PI))) / angle)))) / ((double) M_PI);
        	} else {
        		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_45_scale))) / ((double) M_PI));
        	}
        	return tmp;
        }
        
        b_m = Math.abs(b);
        public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
        	double tmp;
        	if (b_m <= 2.45e-57) {
        		tmp = (180.0 * Math.atan(((y_45_scale * Math.sin((0.005555555555555556 * (angle * Math.PI)))) / x_45_scale))) / Math.PI;
        	} else if (b_m <= 2.1e+128) {
        		tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((Math.PI * (5.7155921353452215e-8 * (0.0 - (Math.PI * Math.PI)))) / (Math.PI * Math.PI))) - (180.0 / Math.PI)) / angle)))) / Math.PI;
        	} else {
        		tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_45_scale))) / Math.PI);
        	}
        	return tmp;
        }
        
        b_m = math.fabs(b)
        def code(a, b_m, angle, x_45_scale, y_45_scale):
        	tmp = 0
        	if b_m <= 2.45e-57:
        		tmp = (180.0 * math.atan(((y_45_scale * math.sin((0.005555555555555556 * (angle * math.pi)))) / x_45_scale))) / math.pi
        	elif b_m <= 2.1e+128:
        		tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((math.pi * (5.7155921353452215e-8 * (0.0 - (math.pi * math.pi)))) / (math.pi * math.pi))) - (180.0 / math.pi)) / angle)))) / math.pi
        	else:
        		tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_45_scale))) / math.pi)
        	return tmp
        
        b_m = abs(b)
        function code(a, b_m, angle, x_45_scale, y_45_scale)
        	tmp = 0.0
        	if (b_m <= 2.45e-57)
        		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) / x_45_scale))) / pi);
        	elseif (b_m <= 2.1e+128)
        		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(Float64(Float64(Float64(-32400.0 * Float64(angle * angle)) * Float64(Float64(pi * Float64(5.7155921353452215e-8 * Float64(0.0 - Float64(pi * pi)))) / Float64(pi * pi))) - Float64(180.0 / pi)) / angle)))) / pi);
        	else
        		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_45_scale))) / pi));
        	end
        	return tmp
        end
        
        b_m = abs(b);
        function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
        	tmp = 0.0;
        	if (b_m <= 2.45e-57)
        		tmp = (180.0 * atan(((y_45_scale * sin((0.005555555555555556 * (angle * pi)))) / x_45_scale))) / pi;
        	elseif (b_m <= 2.1e+128)
        		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((pi * (5.7155921353452215e-8 * (0.0 - (pi * pi)))) / (pi * pi))) - (180.0 / pi)) / angle)))) / pi;
        	else
        		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_45_scale))) / pi);
        	end
        	tmp_2 = tmp;
        end
        
        b_m = N[Abs[b], $MachinePrecision]
        code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2.45e-57], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 2.1e+128], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(N[(N[(-32400.0 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * N[(5.7155921353452215e-8 * N[(0.0 - N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        b_m = \left|b\right|
        
        \\
        \begin{array}{l}
        \mathbf{if}\;b\_m \leq 2.45 \cdot 10^{-57}:\\
        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\
        
        \mathbf{elif}\;b\_m \leq 2.1 \cdot 10^{+128}:\\
        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(5.7155921353452215 \cdot 10^{-8} \cdot \left(0 - \pi \cdot \pi\right)\right)}{\pi \cdot \pi} - \frac{180}{\pi}}{angle}\right)}{\pi}\\
        
        \mathbf{else}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if b < 2.44999999999999994e-57

          1. Initial program 19.1%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
          2. Simplified18.9%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          5. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          6. Simplified30.3%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{pow.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{\_.f64}\left(b, a\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          8. Step-by-step derivation
            1. Simplified31.6%

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. PI-lowering-PI.f6445.2%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            4. Simplified45.2%

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

            if 2.44999999999999994e-57 < b < 2.1e128

            1. Initial program 24.9%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified22.0%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified45.9%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6442.8%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified42.8%

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\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)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{y-scale}{x-scale}\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. clear-numN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\frac{1}{\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)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\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)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. quot-tanN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \tan \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. tan-lowering-tan.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              14. associate-/l*N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              16. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              17. PI-lowering-PI.f6442.5%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. Applied egg-rr42.5%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \color{blue}{\left(\frac{-32400 \cdot \frac{{angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot {\mathsf{PI}\left(\right)}^{3} - \frac{-1}{11664000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)}{{\mathsf{PI}\left(\right)}^{2}} + 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}}{angle}\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(\left(-32400 \cdot \frac{{angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot {\mathsf{PI}\left(\right)}^{3} - \frac{-1}{11664000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)}{{\mathsf{PI}\left(\right)}^{2}} + 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}\right), angle\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            14. Simplified47.6%

              \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{y-scale}{x-scale} \cdot \color{blue}{\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle}}\right)}{\pi} \]

            if 2.1e128 < b

            1. Initial program 4.2%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified0.0%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified8.5%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6474.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified74.6%

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            10. Step-by-step derivation
              1. associate-/l*N/A

                \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}} \]
              2. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
            11. Applied egg-rr74.0%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{\left(\frac{1}{180} \cdot \frac{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}{y-scale}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            13. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \left(\frac{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}{y-scale} \cdot \frac{1}{180}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              2. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \left(\frac{\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{180}}{y-scale}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\left(\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              8. PI-lowering-PI.f6478.8%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            14. Simplified78.8%

              \[\leadsto \frac{\tan^{-1} \left(\frac{-1}{\color{blue}{\frac{\left(angle \cdot \left(\pi \cdot x-scale\right)\right) \cdot 0.005555555555555556}{y-scale}}}\right)}{\pi} \cdot 180 \]
          9. Recombined 3 regimes into one program.
          10. Final simplification48.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.45 \cdot 10^{-57}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale}\right)}{\pi}\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{+128}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(5.7155921353452215 \cdot 10^{-8} \cdot \left(0 - \pi \cdot \pi\right)\right)}{\pi \cdot \pi} - \frac{180}{\pi}}{angle}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\ \end{array} \]
          11. Add Preprocessing

          Alternative 9: 42.6% accurate, 19.9× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(5.7155921353452215 \cdot 10^{-8} \cdot \left(0 - \pi \cdot \pi\right)\right)}{\pi \cdot \pi} - \frac{180}{\pi}}{angle}\right)}{\pi}\\ \mathbf{if}\;b\_m \leq 4.1 \cdot 10^{-162}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;b\_m \leq 1.25 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{angle}}{\left(b\_m \cdot b\_m - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\ \mathbf{elif}\;b\_m \leq 1.35 \cdot 10^{+128}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\ \end{array} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (let* ((t_0
                   (/
                    (*
                     180.0
                     (atan
                      (*
                       (/ y-scale x-scale)
                       (/
                        (-
                         (*
                          (* -32400.0 (* angle angle))
                          (/
                           (* PI (* 5.7155921353452215e-8 (- 0.0 (* PI PI))))
                           (* PI PI)))
                         (/ 180.0 PI))
                        angle))))
                    PI)))
             (if (<= b_m 4.1e-162)
               t_0
               (if (<= b_m 1.25e-83)
                 (*
                  180.0
                  (/
                   (atan
                    (*
                     -180.0
                     (/
                      (/ (* y-scale (* b_m b_m)) angle)
                      (* (- (* b_m b_m) (* a a)) (* PI x-scale)))))
                   PI))
                 (if (<= b_m 1.35e+128)
                   t_0
                   (*
                    180.0
                    (/
                     (atan
                      (/
                       -1.0
                       (/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-scale)))
                     PI)))))))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double t_0 = (180.0 * atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((((double) M_PI) * (5.7155921353452215e-8 * (0.0 - (((double) M_PI) * ((double) M_PI))))) / (((double) M_PI) * ((double) M_PI)))) - (180.0 / ((double) M_PI))) / angle)))) / ((double) M_PI);
          	double tmp;
          	if (b_m <= 4.1e-162) {
          		tmp = t_0;
          	} else if (b_m <= 1.25e-83) {
          		tmp = 180.0 * (atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
          	} else if (b_m <= 1.35e+128) {
          		tmp = t_0;
          	} else {
          		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_45_scale))) / ((double) M_PI));
          	}
          	return tmp;
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double t_0 = (180.0 * Math.atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((Math.PI * (5.7155921353452215e-8 * (0.0 - (Math.PI * Math.PI)))) / (Math.PI * Math.PI))) - (180.0 / Math.PI)) / angle)))) / Math.PI;
          	double tmp;
          	if (b_m <= 4.1e-162) {
          		tmp = t_0;
          	} else if (b_m <= 1.25e-83) {
          		tmp = 180.0 * (Math.atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (Math.PI * x_45_scale))))) / Math.PI);
          	} else if (b_m <= 1.35e+128) {
          		tmp = t_0;
          	} else {
          		tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_45_scale))) / Math.PI);
          	}
          	return tmp;
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	t_0 = (180.0 * math.atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((math.pi * (5.7155921353452215e-8 * (0.0 - (math.pi * math.pi)))) / (math.pi * math.pi))) - (180.0 / math.pi)) / angle)))) / math.pi
          	tmp = 0
          	if b_m <= 4.1e-162:
          		tmp = t_0
          	elif b_m <= 1.25e-83:
          		tmp = 180.0 * (math.atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (math.pi * x_45_scale))))) / math.pi)
          	elif b_m <= 1.35e+128:
          		tmp = t_0
          	else:
          		tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_45_scale))) / math.pi)
          	return tmp
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	t_0 = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(Float64(Float64(Float64(-32400.0 * Float64(angle * angle)) * Float64(Float64(pi * Float64(5.7155921353452215e-8 * Float64(0.0 - Float64(pi * pi)))) / Float64(pi * pi))) - Float64(180.0 / pi)) / angle)))) / pi)
          	tmp = 0.0
          	if (b_m <= 4.1e-162)
          		tmp = t_0;
          	elseif (b_m <= 1.25e-83)
          		tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) / angle) / Float64(Float64(Float64(b_m * b_m) - Float64(a * a)) * Float64(pi * x_45_scale))))) / pi));
          	elseif (b_m <= 1.35e+128)
          		tmp = t_0;
          	else
          		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_45_scale))) / pi));
          	end
          	return tmp
          end
          
          b_m = abs(b);
          function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
          	t_0 = (180.0 * atan(((y_45_scale / x_45_scale) * ((((-32400.0 * (angle * angle)) * ((pi * (5.7155921353452215e-8 * (0.0 - (pi * pi)))) / (pi * pi))) - (180.0 / pi)) / angle)))) / pi;
          	tmp = 0.0;
          	if (b_m <= 4.1e-162)
          		tmp = t_0;
          	elseif (b_m <= 1.25e-83)
          		tmp = 180.0 * (atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (pi * x_45_scale))))) / pi);
          	elseif (b_m <= 1.35e+128)
          		tmp = t_0;
          	else
          		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_45_scale))) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(N[(N[(-32400.0 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * N[(5.7155921353452215e-8 * N[(0.0 - N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[b$95$m, 4.1e-162], t$95$0, If[LessEqual[b$95$m, 1.25e-83], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision] / N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.35e+128], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \begin{array}{l}
          t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(5.7155921353452215 \cdot 10^{-8} \cdot \left(0 - \pi \cdot \pi\right)\right)}{\pi \cdot \pi} - \frac{180}{\pi}}{angle}\right)}{\pi}\\
          \mathbf{if}\;b\_m \leq 4.1 \cdot 10^{-162}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;b\_m \leq 1.25 \cdot 10^{-83}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{angle}}{\left(b\_m \cdot b\_m - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
          
          \mathbf{elif}\;b\_m \leq 1.35 \cdot 10^{+128}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if b < 4.10000000000000019e-162 or 1.25e-83 < b < 1.35000000000000001e128

            1. Initial program 19.6%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified17.9%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified31.7%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6446.8%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified46.8%

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\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)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{y-scale}{x-scale}\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. clear-numN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\frac{1}{\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)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\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)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. quot-tanN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \tan \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. tan-lowering-tan.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              14. associate-/l*N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              16. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              17. PI-lowering-PI.f6449.1%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. Applied egg-rr49.1%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \color{blue}{\left(\frac{-32400 \cdot \frac{{angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot {\mathsf{PI}\left(\right)}^{3} - \frac{-1}{11664000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)}{{\mathsf{PI}\left(\right)}^{2}} + 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}}{angle}\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(\left(-32400 \cdot \frac{{angle}^{2} \cdot \left(\frac{-1}{34992000} \cdot {\mathsf{PI}\left(\right)}^{3} - \frac{-1}{11664000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)}{{\mathsf{PI}\left(\right)}^{2}} + 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}\right), angle\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            14. Simplified46.7%

              \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{y-scale}{x-scale} \cdot \color{blue}{\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle}}\right)}{\pi} \]

            if 4.10000000000000019e-162 < b < 1.25e-83

            1. Initial program 25.8%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Add Preprocessing
            3. Taylor expanded in angle around 0

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{90 \cdot \left(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)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(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)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. Simplified29.7%

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

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

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \left(\frac{{b}^{2} \cdot y-scale}{angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. associate-/r*N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \left(\frac{\frac{{b}^{2} \cdot y-scale}{angle}}{x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\left(\frac{{b}^{2} \cdot y-scale}{angle}\right), \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left({b}^{2} \cdot y-scale\right), angle\right), \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({b}^{2}\right), y-scale\right), angle\right), \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(b \cdot b\right), y-scale\right), angle\right), \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              8. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \left(\left(x-scale \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\left(x-scale \cdot \mathsf{PI}\left(\right)\right), \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI}\left(\right)\right), \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              11. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              12. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              13. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              14. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              15. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              16. *-lowering-*.f6458.7%

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. Simplified58.7%

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

            if 1.35000000000000001e128 < b

            1. Initial program 4.2%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified0.0%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified8.5%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6474.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified74.6%

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            10. Step-by-step derivation
              1. associate-/l*N/A

                \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}} \]
              2. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
            11. Applied egg-rr74.0%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{\left(\frac{1}{180} \cdot \frac{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}{y-scale}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            13. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \left(\frac{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}{y-scale} \cdot \frac{1}{180}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              2. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \left(\frac{\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{180}}{y-scale}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\left(\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              8. PI-lowering-PI.f6478.8%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            14. Simplified78.8%

              \[\leadsto \frac{\tan^{-1} \left(\frac{-1}{\color{blue}{\frac{\left(angle \cdot \left(\pi \cdot x-scale\right)\right) \cdot 0.005555555555555556}{y-scale}}}\right)}{\pi} \cdot 180 \]
          3. Recombined 3 regimes into one program.
          4. Final simplification50.5%

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.1 \cdot 10^{-162}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(5.7155921353452215 \cdot 10^{-8} \cdot \left(0 - \pi \cdot \pi\right)\right)}{\pi \cdot \pi} - \frac{180}{\pi}}{angle}\right)}{\pi}\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-83}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale \cdot \left(b \cdot b\right)}{angle}}{\left(b \cdot b - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+128}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(5.7155921353452215 \cdot 10^{-8} \cdot \left(0 - \pi \cdot \pi\right)\right)}{\pi \cdot \pi} - \frac{180}{\pi}}{angle}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 10: 41.9% accurate, 20.7× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{\left(angle \cdot angle\right) \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot \left(0 - -0.001851851851851852\right)\right) - 180 \cdot \frac{\frac{y-scale}{x-scale}}{\pi}}{angle}\right)}{\pi}\\ \mathbf{if}\;b\_m \leq 3.1 \cdot 10^{-163}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;b\_m \leq 1.5 \cdot 10^{+71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{-180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(b\_m \cdot b\_m - a \cdot a\right)}\right)}{\pi}\\ \mathbf{elif}\;b\_m \leq 9.2 \cdot 10^{+127}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\ \end{array} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (let* ((t_0
                   (/
                    (*
                     180.0
                     (atan
                      (/
                       (-
                        (*
                         (* angle angle)
                         (* (/ (* y-scale PI) x-scale) (- 0.0 -0.001851851851851852)))
                        (* 180.0 (/ (/ y-scale x-scale) PI)))
                       angle)))
                    PI)))
             (if (<= b_m 3.1e-163)
               t_0
               (if (<= b_m 1.5e+71)
                 (*
                  180.0
                  (/
                   (atan
                    (/
                     (/ (* -180.0 (* y-scale (* b_m b_m))) x-scale)
                     (* (* angle PI) (- (* b_m b_m) (* a a)))))
                   PI))
                 (if (<= b_m 9.2e+127)
                   t_0
                   (*
                    180.0
                    (/
                     (atan
                      (/
                       -1.0
                       (/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-scale)))
                     PI)))))))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double t_0 = (180.0 * atan(((((angle * angle) * (((y_45_scale * ((double) M_PI)) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * ((y_45_scale / x_45_scale) / ((double) M_PI)))) / angle))) / ((double) M_PI);
          	double tmp;
          	if (b_m <= 3.1e-163) {
          		tmp = t_0;
          	} else if (b_m <= 1.5e+71) {
          		tmp = 180.0 * (atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * ((double) M_PI)) * ((b_m * b_m) - (a * a))))) / ((double) M_PI));
          	} else if (b_m <= 9.2e+127) {
          		tmp = t_0;
          	} else {
          		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_45_scale))) / ((double) M_PI));
          	}
          	return tmp;
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double t_0 = (180.0 * Math.atan(((((angle * angle) * (((y_45_scale * Math.PI) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * ((y_45_scale / x_45_scale) / Math.PI))) / angle))) / Math.PI;
          	double tmp;
          	if (b_m <= 3.1e-163) {
          		tmp = t_0;
          	} else if (b_m <= 1.5e+71) {
          		tmp = 180.0 * (Math.atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * Math.PI) * ((b_m * b_m) - (a * a))))) / Math.PI);
          	} else if (b_m <= 9.2e+127) {
          		tmp = t_0;
          	} else {
          		tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_45_scale))) / Math.PI);
          	}
          	return tmp;
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	t_0 = (180.0 * math.atan(((((angle * angle) * (((y_45_scale * math.pi) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * ((y_45_scale / x_45_scale) / math.pi))) / angle))) / math.pi
          	tmp = 0
          	if b_m <= 3.1e-163:
          		tmp = t_0
          	elif b_m <= 1.5e+71:
          		tmp = 180.0 * (math.atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * math.pi) * ((b_m * b_m) - (a * a))))) / math.pi)
          	elif b_m <= 9.2e+127:
          		tmp = t_0
          	else:
          		tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_45_scale))) / math.pi)
          	return tmp
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	t_0 = Float64(Float64(180.0 * atan(Float64(Float64(Float64(Float64(angle * angle) * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * Float64(0.0 - -0.001851851851851852))) - Float64(180.0 * Float64(Float64(y_45_scale / x_45_scale) / pi))) / angle))) / pi)
          	tmp = 0.0
          	if (b_m <= 3.1e-163)
          		tmp = t_0;
          	elseif (b_m <= 1.5e+71)
          		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-180.0 * Float64(y_45_scale * Float64(b_m * b_m))) / x_45_scale) / Float64(Float64(angle * pi) * Float64(Float64(b_m * b_m) - Float64(a * a))))) / pi));
          	elseif (b_m <= 9.2e+127)
          		tmp = t_0;
          	else
          		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_45_scale))) / pi));
          	end
          	return tmp
          end
          
          b_m = abs(b);
          function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
          	t_0 = (180.0 * atan(((((angle * angle) * (((y_45_scale * pi) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * ((y_45_scale / x_45_scale) / pi))) / angle))) / pi;
          	tmp = 0.0;
          	if (b_m <= 3.1e-163)
          		tmp = t_0;
          	elseif (b_m <= 1.5e+71)
          		tmp = 180.0 * (atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * pi) * ((b_m * b_m) - (a * a))))) / pi);
          	elseif (b_m <= 9.2e+127)
          		tmp = t_0;
          	else
          		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_45_scale))) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * N[(0.0 - -0.001851851851851852), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(180.0 * N[(N[(y$45$scale / x$45$scale), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[b$95$m, 3.1e-163], t$95$0, If[LessEqual[b$95$m, 1.5e+71], N[(180.0 * N[(N[ArcTan[N[(N[(N[(-180.0 * N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 9.2e+127], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \begin{array}{l}
          t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{\left(angle \cdot angle\right) \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot \left(0 - -0.001851851851851852\right)\right) - 180 \cdot \frac{\frac{y-scale}{x-scale}}{\pi}}{angle}\right)}{\pi}\\
          \mathbf{if}\;b\_m \leq 3.1 \cdot 10^{-163}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;b\_m \leq 1.5 \cdot 10^{+71}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{-180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(b\_m \cdot b\_m - a \cdot a\right)}\right)}{\pi}\\
          
          \mathbf{elif}\;b\_m \leq 9.2 \cdot 10^{+127}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if b < 3.09999999999999975e-163 or 1.50000000000000006e71 < b < 9.2000000000000007e127

            1. Initial program 18.0%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified15.9%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified30.1%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6449.2%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified49.2%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\color{blue}{\left(\frac{180 \cdot \frac{y-scale}{x-scale \cdot \mathsf{PI}\left(\right)} + {angle}^{2} \cdot \left(\frac{-1}{360} \cdot \frac{y-scale \cdot \mathsf{PI}\left(\right)}{x-scale} - \frac{-1}{1080} \cdot \frac{y-scale \cdot \mathsf{PI}\left(\right)}{x-scale}\right)}{angle}\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(180 \cdot \frac{y-scale}{x-scale \cdot \mathsf{PI}\left(\right)} + {angle}^{2} \cdot \left(\frac{-1}{360} \cdot \frac{y-scale \cdot \mathsf{PI}\left(\right)}{x-scale} - \frac{-1}{1080} \cdot \frac{y-scale \cdot \mathsf{PI}\left(\right)}{x-scale}\right)\right), angle\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            12. Simplified43.1%

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

            if 3.09999999999999975e-163 < b < 1.50000000000000006e71

            1. Initial program 27.7%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Add Preprocessing
            3. Taylor expanded in angle around 0

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{90 \cdot \left(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)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(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)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. Simplified27.7%

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-180 \cdot \frac{{b}^{2} \cdot y-scale}{x-scale}\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{-180 \cdot \left({b}^{2} \cdot y-scale\right)}{x-scale}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-180 \cdot \left({b}^{2} \cdot y-scale\right)\right), x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \left({b}^{2} \cdot y-scale\right)\right), x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\left({b}^{2}\right), y-scale\right)\right), x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\left(b \cdot b\right), y-scale\right)\right), x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. *-lowering-*.f6436.1%

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right)\right), x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. Simplified36.1%

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

            if 9.2000000000000007e127 < b

            1. Initial program 4.2%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified0.0%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified8.5%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6474.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified74.6%

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            10. Step-by-step derivation
              1. associate-/l*N/A

                \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}} \]
              2. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
            11. Applied egg-rr74.0%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{\left(\frac{1}{180} \cdot \frac{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}{y-scale}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            13. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \left(\frac{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}{y-scale} \cdot \frac{1}{180}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              2. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \left(\frac{\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{180}}{y-scale}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\left(\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              8. PI-lowering-PI.f6478.8%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            14. Simplified78.8%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 3.1 \cdot 10^{-163}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(angle \cdot angle\right) \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot \left(0 - -0.001851851851851852\right)\right) - 180 \cdot \frac{\frac{y-scale}{x-scale}}{\pi}}{angle}\right)}{\pi}\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{+71}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{-180 \cdot \left(y-scale \cdot \left(b \cdot b\right)\right)}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(b \cdot b - a \cdot a\right)}\right)}{\pi}\\ \mathbf{elif}\;b \leq 9.2 \cdot 10^{+127}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(angle \cdot angle\right) \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot \left(0 - -0.001851851851851852\right)\right) - 180 \cdot \frac{\frac{y-scale}{x-scale}}{\pi}}{angle}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 11: 42.4% accurate, 21.8× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 3.7 \cdot 10^{-171}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\ \mathbf{elif}\;b\_m \leq 6 \cdot 10^{+104}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{-180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(b\_m \cdot b\_m - a \cdot a\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\ \end{array} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (if (<= b_m 3.7e-171)
             (/
              (* 180.0 (atan (* (/ 180.0 (* angle PI)) (- 0.0 (/ y-scale x-scale)))))
              PI)
             (if (<= b_m 6e+104)
               (*
                180.0
                (/
                 (atan
                  (/
                   (/ (* -180.0 (* y-scale (* b_m b_m))) x-scale)
                   (* (* angle PI) (- (* b_m b_m) (* a a)))))
                 PI))
               (*
                180.0
                (/
                 (atan
                  (/ -1.0 (/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-scale)))
                 PI)))))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double tmp;
          	if (b_m <= 3.7e-171) {
          		tmp = (180.0 * atan(((180.0 / (angle * ((double) M_PI))) * (0.0 - (y_45_scale / x_45_scale))))) / ((double) M_PI);
          	} else if (b_m <= 6e+104) {
          		tmp = 180.0 * (atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * ((double) M_PI)) * ((b_m * b_m) - (a * a))))) / ((double) M_PI));
          	} else {
          		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_45_scale))) / ((double) M_PI));
          	}
          	return tmp;
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double tmp;
          	if (b_m <= 3.7e-171) {
          		tmp = (180.0 * Math.atan(((180.0 / (angle * Math.PI)) * (0.0 - (y_45_scale / x_45_scale))))) / Math.PI;
          	} else if (b_m <= 6e+104) {
          		tmp = 180.0 * (Math.atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * Math.PI) * ((b_m * b_m) - (a * a))))) / Math.PI);
          	} else {
          		tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_45_scale))) / Math.PI);
          	}
          	return tmp;
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	tmp = 0
          	if b_m <= 3.7e-171:
          		tmp = (180.0 * math.atan(((180.0 / (angle * math.pi)) * (0.0 - (y_45_scale / x_45_scale))))) / math.pi
          	elif b_m <= 6e+104:
          		tmp = 180.0 * (math.atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * math.pi) * ((b_m * b_m) - (a * a))))) / math.pi)
          	else:
          		tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_45_scale))) / math.pi)
          	return tmp
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 0.0
          	if (b_m <= 3.7e-171)
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(180.0 / Float64(angle * pi)) * Float64(0.0 - Float64(y_45_scale / x_45_scale))))) / pi);
          	elseif (b_m <= 6e+104)
          		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-180.0 * Float64(y_45_scale * Float64(b_m * b_m))) / x_45_scale) / Float64(Float64(angle * pi) * Float64(Float64(b_m * b_m) - Float64(a * a))))) / pi));
          	else
          		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_45_scale))) / pi));
          	end
          	return tmp
          end
          
          b_m = abs(b);
          function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 0.0;
          	if (b_m <= 3.7e-171)
          		tmp = (180.0 * atan(((180.0 / (angle * pi)) * (0.0 - (y_45_scale / x_45_scale))))) / pi;
          	elseif (b_m <= 6e+104)
          		tmp = 180.0 * (atan((((-180.0 * (y_45_scale * (b_m * b_m))) / x_45_scale) / ((angle * pi) * ((b_m * b_m) - (a * a))))) / pi);
          	else
          		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_45_scale))) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 3.7e-171], N[(N[(180.0 * N[ArcTan[N[(N[(180.0 / N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 6e+104], N[(180.0 * N[(N[ArcTan[N[(N[(N[(-180.0 * N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;b\_m \leq 3.7 \cdot 10^{-171}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
          
          \mathbf{elif}\;b\_m \leq 6 \cdot 10^{+104}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{-180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(b\_m \cdot b\_m - a \cdot a\right)}\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if b < 3.70000000000000012e-171

            1. Initial program 18.2%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified16.5%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified28.2%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6448.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified48.6%

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\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)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{y-scale}{x-scale}\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. clear-numN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\frac{1}{\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)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\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)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. quot-tanN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \tan \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. tan-lowering-tan.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              14. associate-/l*N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              16. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              17. PI-lowering-PI.f6451.0%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. Applied egg-rr51.0%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \color{blue}{\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. PI-lowering-PI.f6443.3%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            14. Simplified43.3%

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

            if 3.70000000000000012e-171 < b < 5.99999999999999937e104

            1. Initial program 25.2%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Add Preprocessing
            3. Taylor expanded in angle around 0

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{90 \cdot \left(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)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(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)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. Simplified23.6%

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-180 \cdot \frac{{b}^{2} \cdot y-scale}{x-scale}\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{-180 \cdot \left({b}^{2} \cdot y-scale\right)}{x-scale}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-180 \cdot \left({b}^{2} \cdot y-scale\right)\right), x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \left({b}^{2} \cdot y-scale\right)\right), x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\left({b}^{2}\right), y-scale\right)\right), x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\left(b \cdot b\right), y-scale\right)\right), x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. *-lowering-*.f6437.5%

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right)\right), x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. Simplified37.5%

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

            if 5.99999999999999937e104 < b

            1. Initial program 7.1%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified0.0%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified18.9%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6475.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified75.6%

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            10. Step-by-step derivation
              1. associate-/l*N/A

                \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}} \]
              2. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
            11. Applied egg-rr74.3%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{\left(\frac{1}{180} \cdot \frac{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}{y-scale}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            13. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \left(\frac{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}{y-scale} \cdot \frac{1}{180}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              2. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \left(\frac{\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{180}}{y-scale}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\left(\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              8. PI-lowering-PI.f6478.4%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            14. Simplified78.4%

              \[\leadsto \frac{\tan^{-1} \left(\frac{-1}{\color{blue}{\frac{\left(angle \cdot \left(\pi \cdot x-scale\right)\right) \cdot 0.005555555555555556}{y-scale}}}\right)}{\pi} \cdot 180 \]
          3. Recombined 3 regimes into one program.
          4. Final simplification45.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 3.7 \cdot 10^{-171}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+104}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{-180 \cdot \left(y-scale \cdot \left(b \cdot b\right)\right)}{x-scale}}{\left(angle \cdot \pi\right) \cdot \left(b \cdot b - a \cdot a\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 12: 42.4% accurate, 21.8× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 4.1 \cdot 10^{-171}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\ \mathbf{elif}\;b\_m \leq 7 \cdot 10^{+104}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{\left(angle \cdot x-scale\right) \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\ \end{array} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (if (<= b_m 4.1e-171)
             (/
              (* 180.0 (atan (* (/ 180.0 (* angle PI)) (- 0.0 (/ y-scale x-scale)))))
              PI)
             (if (<= b_m 7e+104)
               (*
                180.0
                (/
                 (atan
                  (/
                   (* -180.0 (* y-scale (* b_m b_m)))
                   (* (* angle x-scale) (* PI (- (* b_m b_m) (* a a))))))
                 PI))
               (*
                180.0
                (/
                 (atan
                  (/ -1.0 (/ (* 0.005555555555555556 (* angle (* PI x-scale))) y-scale)))
                 PI)))))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double tmp;
          	if (b_m <= 4.1e-171) {
          		tmp = (180.0 * atan(((180.0 / (angle * ((double) M_PI))) * (0.0 - (y_45_scale / x_45_scale))))) / ((double) M_PI);
          	} else if (b_m <= 7e+104) {
          		tmp = 180.0 * (atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * (((double) M_PI) * ((b_m * b_m) - (a * a)))))) / ((double) M_PI));
          	} else {
          		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (((double) M_PI) * x_45_scale))) / y_45_scale))) / ((double) M_PI));
          	}
          	return tmp;
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double tmp;
          	if (b_m <= 4.1e-171) {
          		tmp = (180.0 * Math.atan(((180.0 / (angle * Math.PI)) * (0.0 - (y_45_scale / x_45_scale))))) / Math.PI;
          	} else if (b_m <= 7e+104) {
          		tmp = 180.0 * (Math.atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * (Math.PI * ((b_m * b_m) - (a * a)))))) / Math.PI);
          	} else {
          		tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * (Math.PI * x_45_scale))) / y_45_scale))) / Math.PI);
          	}
          	return tmp;
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	tmp = 0
          	if b_m <= 4.1e-171:
          		tmp = (180.0 * math.atan(((180.0 / (angle * math.pi)) * (0.0 - (y_45_scale / x_45_scale))))) / math.pi
          	elif b_m <= 7e+104:
          		tmp = 180.0 * (math.atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * (math.pi * ((b_m * b_m) - (a * a)))))) / math.pi)
          	else:
          		tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * (math.pi * x_45_scale))) / y_45_scale))) / math.pi)
          	return tmp
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 0.0
          	if (b_m <= 4.1e-171)
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(180.0 / Float64(angle * pi)) * Float64(0.0 - Float64(y_45_scale / x_45_scale))))) / pi);
          	elseif (b_m <= 7e+104)
          		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-180.0 * Float64(y_45_scale * Float64(b_m * b_m))) / Float64(Float64(angle * x_45_scale) * Float64(pi * Float64(Float64(b_m * b_m) - Float64(a * a)))))) / pi));
          	else
          		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * Float64(pi * x_45_scale))) / y_45_scale))) / pi));
          	end
          	return tmp
          end
          
          b_m = abs(b);
          function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 0.0;
          	if (b_m <= 4.1e-171)
          		tmp = (180.0 * atan(((180.0 / (angle * pi)) * (0.0 - (y_45_scale / x_45_scale))))) / pi;
          	elseif (b_m <= 7e+104)
          		tmp = 180.0 * (atan(((-180.0 * (y_45_scale * (b_m * b_m))) / ((angle * x_45_scale) * (pi * ((b_m * b_m) - (a * a)))))) / pi);
          	else
          		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * (pi * x_45_scale))) / y_45_scale))) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 4.1e-171], N[(N[(180.0 * N[ArcTan[N[(N[(180.0 / N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 7e+104], N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 * N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(angle * x$45$scale), $MachinePrecision] * N[(Pi * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;b\_m \leq 4.1 \cdot 10^{-171}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
          
          \mathbf{elif}\;b\_m \leq 7 \cdot 10^{+104}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180 \cdot \left(y-scale \cdot \left(b\_m \cdot b\_m\right)\right)}{\left(angle \cdot x-scale\right) \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if b < 4.1e-171

            1. Initial program 18.2%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified16.5%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified28.2%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6448.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified48.6%

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\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)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{y-scale}{x-scale}\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. clear-numN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\frac{1}{\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)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\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)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. quot-tanN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \tan \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. tan-lowering-tan.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              14. associate-/l*N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              16. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              17. PI-lowering-PI.f6451.0%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. Applied egg-rr51.0%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \color{blue}{\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. PI-lowering-PI.f6443.3%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            14. Simplified43.3%

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

            if 4.1e-171 < b < 7.0000000000000003e104

            1. Initial program 25.2%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Add Preprocessing
            3. Taylor expanded in x-scale around 0

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \frac{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)}{{x-scale}^{2}}\right)}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\frac{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)}{{x-scale}^{2}}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{neg.f64}\left(\left(\frac{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)}{{x-scale}^{2}}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\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), \left({x-scale}^{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. Simplified31.7%

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{-\frac{2 \cdot \left(\left(b \cdot b\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(a \cdot a\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{x-scale \cdot x-scale}}}{\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            6. Applied egg-rr31.7%

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-180 \cdot \frac{{b}^{2} \cdot y-scale}{angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot \left({b}^{2} \cdot y-scale\right)}{angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot \left({b}^{2} \cdot y-scale\right)}{angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - {a}^{2}\right)\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot \left({b}^{2} \cdot y-scale\right)}{angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. difference-of-squaresN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot \left({b}^{2} \cdot y-scale\right)}{angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot \left({b}^{2} \cdot y-scale\right)}{angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(-180 \cdot \left({b}^{2} \cdot y-scale\right)\right), \left(angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \left({b}^{2} \cdot y-scale\right)\right), \left(angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              8. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \left(y-scale \cdot {b}^{2}\right)\right), \left(angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(y-scale, \left({b}^{2}\right)\right)\right), \left(angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              10. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(y-scale, \left(b \cdot b\right)\right)\right), \left(angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(y-scale, \mathsf{*.f64}\left(b, b\right)\right)\right), \left(angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              12. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(y-scale, \mathsf{*.f64}\left(b, b\right)\right)\right), \left(\left(angle \cdot x-scale\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              13. +-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(y-scale, \mathsf{*.f64}\left(b, b\right)\right)\right), \left(\left(angle \cdot x-scale\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              14. difference-of-squaresN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(y-scale, \mathsf{*.f64}\left(b, b\right)\right)\right), \left(\left(angle \cdot x-scale\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              15. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(y-scale, \mathsf{*.f64}\left(b, b\right)\right)\right), \left(\left(angle \cdot x-scale\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - a \cdot a\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              16. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(y-scale, \mathsf{*.f64}\left(b, b\right)\right)\right), \left(\left(angle \cdot x-scale\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. Simplified39.0%

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

            if 7.0000000000000003e104 < b

            1. Initial program 7.1%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified0.0%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified18.9%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6475.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified75.6%

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            10. Step-by-step derivation
              1. associate-/l*N/A

                \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}} \]
              2. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
            11. Applied egg-rr74.3%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{\left(\frac{1}{180} \cdot \frac{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}{y-scale}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            13. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \left(\frac{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}{y-scale} \cdot \frac{1}{180}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              2. associate-*l/N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \left(\frac{\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{180}}{y-scale}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\left(\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              8. PI-lowering-PI.f6478.4%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), x-scale\right)\right), \frac{1}{180}\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            14. Simplified78.4%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.1 \cdot 10^{-171}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+104}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180 \cdot \left(y-scale \cdot \left(b \cdot b\right)\right)}{\left(angle \cdot x-scale\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\frac{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot x-scale\right)\right)}{y-scale}}\right)}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 13: 42.1% accurate, 21.8× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 3.9 \cdot 10^{-171}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\ \mathbf{elif}\;b\_m \leq 2.3 \cdot 10^{+56}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{angle}}{\left(b\_m \cdot b\_m - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot \left(0 - x-scale\right)\right)}\right)}{\pi}\\ \end{array} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (if (<= b_m 3.9e-171)
             (/
              (* 180.0 (atan (* (/ 180.0 (* angle PI)) (- 0.0 (/ y-scale x-scale)))))
              PI)
             (if (<= b_m 2.3e+56)
               (*
                180.0
                (/
                 (atan
                  (*
                   -180.0
                   (/
                    (/ (* y-scale (* b_m b_m)) angle)
                    (* (- (* b_m b_m) (* a a)) (* PI x-scale)))))
                 PI))
               (/
                (* 180.0 (atan (* 180.0 (/ y-scale (* angle (* PI (- 0.0 x-scale)))))))
                PI))))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double tmp;
          	if (b_m <= 3.9e-171) {
          		tmp = (180.0 * atan(((180.0 / (angle * ((double) M_PI))) * (0.0 - (y_45_scale / x_45_scale))))) / ((double) M_PI);
          	} else if (b_m <= 2.3e+56) {
          		tmp = 180.0 * (atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (((double) M_PI) * x_45_scale))))) / ((double) M_PI));
          	} else {
          		tmp = (180.0 * atan((180.0 * (y_45_scale / (angle * (((double) M_PI) * (0.0 - x_45_scale))))))) / ((double) M_PI);
          	}
          	return tmp;
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double tmp;
          	if (b_m <= 3.9e-171) {
          		tmp = (180.0 * Math.atan(((180.0 / (angle * Math.PI)) * (0.0 - (y_45_scale / x_45_scale))))) / Math.PI;
          	} else if (b_m <= 2.3e+56) {
          		tmp = 180.0 * (Math.atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (Math.PI * x_45_scale))))) / Math.PI);
          	} else {
          		tmp = (180.0 * Math.atan((180.0 * (y_45_scale / (angle * (Math.PI * (0.0 - x_45_scale))))))) / Math.PI;
          	}
          	return tmp;
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	tmp = 0
          	if b_m <= 3.9e-171:
          		tmp = (180.0 * math.atan(((180.0 / (angle * math.pi)) * (0.0 - (y_45_scale / x_45_scale))))) / math.pi
          	elif b_m <= 2.3e+56:
          		tmp = 180.0 * (math.atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (math.pi * x_45_scale))))) / math.pi)
          	else:
          		tmp = (180.0 * math.atan((180.0 * (y_45_scale / (angle * (math.pi * (0.0 - x_45_scale))))))) / math.pi
          	return tmp
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 0.0
          	if (b_m <= 3.9e-171)
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(180.0 / Float64(angle * pi)) * Float64(0.0 - Float64(y_45_scale / x_45_scale))))) / pi);
          	elseif (b_m <= 2.3e+56)
          		tmp = Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(Float64(y_45_scale * Float64(b_m * b_m)) / angle) / Float64(Float64(Float64(b_m * b_m) - Float64(a * a)) * Float64(pi * x_45_scale))))) / pi));
          	else
          		tmp = Float64(Float64(180.0 * atan(Float64(180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * Float64(0.0 - x_45_scale))))))) / pi);
          	end
          	return tmp
          end
          
          b_m = abs(b);
          function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 0.0;
          	if (b_m <= 3.9e-171)
          		tmp = (180.0 * atan(((180.0 / (angle * pi)) * (0.0 - (y_45_scale / x_45_scale))))) / pi;
          	elseif (b_m <= 2.3e+56)
          		tmp = 180.0 * (atan((-180.0 * (((y_45_scale * (b_m * b_m)) / angle) / (((b_m * b_m) - (a * a)) * (pi * x_45_scale))))) / pi);
          	else
          		tmp = (180.0 * atan((180.0 * (y_45_scale / (angle * (pi * (0.0 - x_45_scale))))))) / pi;
          	end
          	tmp_2 = tmp;
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 3.9e-171], N[(N[(180.0 * N[ArcTan[N[(N[(180.0 / N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b$95$m, 2.3e+56], N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(N[(y$45$scale * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision] / N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(180.0 * N[(y$45$scale / N[(angle * N[(Pi * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;b\_m \leq 3.9 \cdot 10^{-171}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\
          
          \mathbf{elif}\;b\_m \leq 2.3 \cdot 10^{+56}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale \cdot \left(b\_m \cdot b\_m\right)}{angle}}{\left(b\_m \cdot b\_m - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot \left(0 - x-scale\right)\right)}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if b < 3.8999999999999998e-171

            1. Initial program 18.2%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified16.5%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified28.2%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6448.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified48.6%

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\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)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{y-scale}{x-scale}\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. clear-numN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\frac{1}{\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)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\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)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. quot-tanN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \tan \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. tan-lowering-tan.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              14. associate-/l*N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              16. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              17. PI-lowering-PI.f6451.0%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. Applied egg-rr51.0%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \color{blue}{\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. PI-lowering-PI.f6443.3%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            14. Simplified43.3%

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

            if 3.8999999999999998e-171 < b < 2.30000000000000015e56

            1. Initial program 29.8%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Add Preprocessing
            3. Taylor expanded in angle around 0

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{90 \cdot \left(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)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(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)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. Simplified25.7%

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

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

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \left(\frac{{b}^{2} \cdot y-scale}{angle \cdot \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. associate-/r*N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \left(\frac{\frac{{b}^{2} \cdot y-scale}{angle}}{x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\left(\frac{{b}^{2} \cdot y-scale}{angle}\right), \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left({b}^{2} \cdot y-scale\right), angle\right), \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({b}^{2}\right), y-scale\right), angle\right), \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(b \cdot b\right), y-scale\right), angle\right), \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \left(x-scale \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              8. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \left(\left(x-scale \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\left(x-scale \cdot \mathsf{PI}\left(\right)\right), \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI}\left(\right)\right), \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              11. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              12. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              13. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              14. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              15. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              16. *-lowering-*.f6436.0%

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), y-scale\right), angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. Simplified36.0%

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

            if 2.30000000000000015e56 < b

            1. Initial program 5.5%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified2.8%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified25.3%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6471.1%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified71.1%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\color{blue}{\left(180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \left(\frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \mathsf{/.f64}\left(y-scale, \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \mathsf{/.f64}\left(y-scale, \mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \mathsf{/.f64}\left(y-scale, \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot x-scale\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \mathsf{/.f64}\left(y-scale, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), x-scale\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. PI-lowering-PI.f6470.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \mathsf{/.f64}\left(y-scale, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), x-scale\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            12. Simplified70.6%

              \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\color{blue}{180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}}\right)}{\pi} \]
          3. Recombined 3 regimes into one program.
          4. Final simplification45.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 3.9 \cdot 10^{-171}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+56}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{y-scale \cdot \left(b \cdot b\right)}{angle}}{\left(b \cdot b - a \cdot a\right) \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot \left(0 - x-scale\right)\right)}\right)}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 14: 38.7% accurate, 23.3× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 1.18 \cdot 10^{+21}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale \cdot \left(180 \cdot \left(b\_m \cdot b\_m\right)\right)}{angle \cdot \left(\pi \cdot x-scale\right)}}{a \cdot a}\right)}{\pi}\\ \end{array} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (if (<= angle 1.18e+21)
             (*
              180.0
              (/
               (atan
                (/ -1.0 (* (* 0.005555555555555556 (* angle PI)) (/ x-scale y-scale))))
               PI))
             (*
              180.0
              (/
               (atan
                (/
                 (/ (* y-scale (* 180.0 (* b_m b_m))) (* angle (* PI x-scale)))
                 (* a a)))
               PI))))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double tmp;
          	if (angle <= 1.18e+21) {
          		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * ((double) M_PI))) * (x_45_scale / y_45_scale)))) / ((double) M_PI));
          	} else {
          		tmp = 180.0 * (atan((((y_45_scale * (180.0 * (b_m * b_m))) / (angle * (((double) M_PI) * x_45_scale))) / (a * a))) / ((double) M_PI));
          	}
          	return tmp;
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double tmp;
          	if (angle <= 1.18e+21) {
          		tmp = 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * Math.PI)) * (x_45_scale / y_45_scale)))) / Math.PI);
          	} else {
          		tmp = 180.0 * (Math.atan((((y_45_scale * (180.0 * (b_m * b_m))) / (angle * (Math.PI * x_45_scale))) / (a * a))) / Math.PI);
          	}
          	return tmp;
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	tmp = 0
          	if angle <= 1.18e+21:
          		tmp = 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * math.pi)) * (x_45_scale / y_45_scale)))) / math.pi)
          	else:
          		tmp = 180.0 * (math.atan((((y_45_scale * (180.0 * (b_m * b_m))) / (angle * (math.pi * x_45_scale))) / (a * a))) / math.pi)
          	return tmp
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 0.0
          	if (angle <= 1.18e+21)
          		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * pi)) * Float64(x_45_scale / y_45_scale)))) / pi));
          	else
          		tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(y_45_scale * Float64(180.0 * Float64(b_m * b_m))) / Float64(angle * Float64(pi * x_45_scale))) / Float64(a * a))) / pi));
          	end
          	return tmp
          end
          
          b_m = abs(b);
          function tmp_2 = code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 0.0;
          	if (angle <= 1.18e+21)
          		tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * pi)) * (x_45_scale / y_45_scale)))) / pi);
          	else
          		tmp = 180.0 * (atan((((y_45_scale * (180.0 * (b_m * b_m))) / (angle * (pi * x_45_scale))) / (a * a))) / pi);
          	end
          	tmp_2 = tmp;
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[angle, 1.18e+21], N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(x$45$scale / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(y$45$scale * N[(180.0 * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;angle \leq 1.18 \cdot 10^{+21}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{y-scale \cdot \left(180 \cdot \left(b\_m \cdot b\_m\right)\right)}{angle \cdot \left(\pi \cdot x-scale\right)}}{a \cdot a}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if angle < 1.18e21

            1. Initial program 18.6%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Simplified17.7%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. Simplified31.0%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              5. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6450.8%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. Simplified50.8%

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            10. Step-by-step derivation
              1. associate-/l*N/A

                \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}} \]
              2. *-commutativeN/A

                \[\leadsto \frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
            11. Applied egg-rr53.4%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(x-scale, y-scale\right), \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            13. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(x-scale, y-scale\right), \mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(x-scale, y-scale\right), \mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              3. PI-lowering-PI.f6449.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(x-scale, y-scale\right), \mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            14. Simplified49.0%

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

            if 1.18e21 < angle

            1. Initial program 18.5%

              \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
            2. Add Preprocessing
            3. Taylor expanded in x-scale around 0

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \frac{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)}{{x-scale}^{2}}\right)}, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\frac{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)}{{x-scale}^{2}}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{neg.f64}\left(\left(\frac{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)}{{x-scale}^{2}}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\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), \left({x-scale}^{2}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(b, 2\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), x-scale\right), y-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. Simplified25.0%

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

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-180 \cdot \frac{{b}^{2} \cdot \left(x-scale \cdot y-scale\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)}, \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{-180 \cdot \left({b}^{2} \cdot \left(x-scale \cdot y-scale\right)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-180 \cdot \left({b}^{2} \cdot \left(x-scale \cdot y-scale\right)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \left({b}^{2} \cdot \left(x-scale \cdot y-scale\right)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \left(\left({b}^{2} \cdot x-scale\right) \cdot y-scale\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\left({b}^{2} \cdot x-scale\right), y-scale\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\left(x-scale \cdot {b}^{2}\right), y-scale\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \left({b}^{2}\right)\right), y-scale\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              8. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \left(b \cdot b\right)\right), y-scale\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              10. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right)\right), \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right)\right), \mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \left({b}^{2} - {a}^{2}\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), \left({b}^{2} - {a}^{2}\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              13. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \left({b}^{2} - {a}^{2}\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              14. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              15. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\left(b \cdot b\right), \left({a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              17. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              18. *-lowering-*.f6410.7%

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, x-scale\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. Simplified10.7%

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(180 \cdot \frac{{b}^{2} \cdot y-scale}{{a}^{2} \cdot \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            11. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{180 \cdot \left({b}^{2} \cdot y-scale\right)}{{a}^{2} \cdot \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{180 \cdot \left({b}^{2} \cdot y-scale\right)}{\left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{2}}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              3. associate-/r*N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{\frac{180 \cdot \left({b}^{2} \cdot y-scale\right)}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}{{a}^{2}}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              4. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{180 \cdot \frac{{b}^{2} \cdot y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}}{{a}^{2}}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(180 \cdot \frac{{b}^{2} \cdot y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              6. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(\frac{180 \cdot \left({b}^{2} \cdot y-scale\right)}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              7. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(180 \cdot \left({b}^{2} \cdot y-scale\right)\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              8. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(180 \cdot {b}^{2}\right) \cdot y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(180 \cdot {b}^{2}\right), y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(180, \left({b}^{2}\right)\right), y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              11. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(180, \left(b \cdot b\right)\right), y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(180, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              13. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(180, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right), \mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(180, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right), \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot x-scale\right)\right)\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(180, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), x-scale\right)\right)\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              16. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(180, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), x-scale\right)\right)\right), \left({a}^{2}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              17. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(180, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), x-scale\right)\right)\right), \left(a \cdot a\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              18. *-lowering-*.f6429.5%

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(180, \mathsf{*.f64}\left(b, b\right)\right), y-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), x-scale\right)\right)\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            12. Simplified29.5%

              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{\frac{\left(180 \cdot \left(b \cdot b\right)\right) \cdot y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}}{a \cdot a}\right)}}{\pi} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification45.6%

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

          Alternative 15: 40.1% accurate, 25.6× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)}{\pi} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (*
            180.0
            (/
             (atan
              (/ -1.0 (* (* 0.005555555555555556 (* angle PI)) (/ x-scale y-scale))))
             PI)))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * ((double) M_PI))) * (x_45_scale / y_45_scale)))) / ((double) M_PI));
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return 180.0 * (Math.atan((-1.0 / ((0.005555555555555556 * (angle * Math.PI)) * (x_45_scale / y_45_scale)))) / Math.PI);
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	return 180.0 * (math.atan((-1.0 / ((0.005555555555555556 * (angle * math.pi)) * (x_45_scale / y_45_scale)))) / math.pi)
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	return Float64(180.0 * Float64(atan(Float64(-1.0 / Float64(Float64(0.005555555555555556 * Float64(angle * pi)) * Float64(x_45_scale / y_45_scale)))) / pi))
          end
          
          b_m = abs(b);
          function tmp = code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 180.0 * (atan((-1.0 / ((0.005555555555555556 * (angle * pi)) * (x_45_scale / y_45_scale)))) / pi);
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-1.0 / N[(N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(x$45$scale / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)}{\pi}
          \end{array}
          
          Derivation
          1. Initial program 18.6%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
          2. Simplified17.6%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          5. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          6. Simplified30.6%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          8. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. neg-lowering-neg.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            10. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. PI-lowering-PI.f6448.3%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          9. Simplified48.3%

            \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
          10. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto 180 \cdot \color{blue}{\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}} \]
            2. *-commutativeN/A

              \[\leadsto \frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)} \cdot \color{blue}{180} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\mathsf{neg}\left(\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)\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
          11. Applied egg-rr50.2%

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(x-scale, y-scale\right), \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
          13. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(x-scale, y-scale\right), \mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(x-scale, y-scale\right), \mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
            3. PI-lowering-PI.f6443.7%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(x-scale, y-scale\right), \mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
          14. Simplified43.7%

            \[\leadsto \frac{\tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}}\right)}{\pi} \cdot 180 \]
          15. Final simplification43.7%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \frac{x-scale}{y-scale}}\right)}{\pi} \]
          16. Add Preprocessing

          Alternative 16: 39.8% accurate, 25.6× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (/
            (* 180.0 (atan (* (/ 180.0 (* angle PI)) (- 0.0 (/ y-scale x-scale)))))
            PI))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return (180.0 * atan(((180.0 / (angle * ((double) M_PI))) * (0.0 - (y_45_scale / x_45_scale))))) / ((double) M_PI);
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return (180.0 * Math.atan(((180.0 / (angle * Math.PI)) * (0.0 - (y_45_scale / x_45_scale))))) / Math.PI;
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	return (180.0 * math.atan(((180.0 / (angle * math.pi)) * (0.0 - (y_45_scale / x_45_scale))))) / math.pi
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	return Float64(Float64(180.0 * atan(Float64(Float64(180.0 / Float64(angle * pi)) * Float64(0.0 - Float64(y_45_scale / x_45_scale))))) / pi)
          end
          
          b_m = abs(b);
          function tmp = code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = (180.0 * atan(((180.0 / (angle * pi)) * (0.0 - (y_45_scale / x_45_scale))))) / pi;
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(N[(180.0 * N[ArcTan[N[(N[(180.0 / N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi}
          \end{array}
          
          Derivation
          1. Initial program 18.6%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
          2. Simplified17.6%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          5. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          6. Simplified30.6%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          8. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. neg-lowering-neg.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            10. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. PI-lowering-PI.f6448.3%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          9. Simplified48.3%

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\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)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\frac{y-scale}{x-scale}\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            4. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \left(\frac{1}{\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)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\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)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            7. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. div-invN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. div-invN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \left(\frac{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}{\cos \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            12. quot-tanN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \tan \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. tan-lowering-tan.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            14. associate-/l*N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\left(angle \cdot \frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            16. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            17. PI-lowering-PI.f6450.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(1, \mathsf{tan.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          11. Applied egg-rr50.2%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \color{blue}{\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          13. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            3. PI-lowering-PI.f6443.6%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{/.f64}\left(180, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          14. Simplified43.6%

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\frac{y-scale}{x-scale} \cdot \color{blue}{\frac{180}{angle \cdot \pi}}\right)}{\pi} \]
          15. Final simplification43.6%

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{180}{angle \cdot \pi} \cdot \left(0 - \frac{y-scale}{x-scale}\right)\right)}{\pi} \]
          16. Add Preprocessing

          Alternative 17: 37.8% accurate, 25.6× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \frac{180 \cdot \tan^{-1} \left(180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot \left(0 - x-scale\right)\right)}\right)}{\pi} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (/
            (* 180.0 (atan (* 180.0 (/ y-scale (* angle (* PI (- 0.0 x-scale)))))))
            PI))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return (180.0 * atan((180.0 * (y_45_scale / (angle * (((double) M_PI) * (0.0 - x_45_scale))))))) / ((double) M_PI);
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return (180.0 * Math.atan((180.0 * (y_45_scale / (angle * (Math.PI * (0.0 - x_45_scale))))))) / Math.PI;
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	return (180.0 * math.atan((180.0 * (y_45_scale / (angle * (math.pi * (0.0 - x_45_scale))))))) / math.pi
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	return Float64(Float64(180.0 * atan(Float64(180.0 * Float64(y_45_scale / Float64(angle * Float64(pi * Float64(0.0 - x_45_scale))))))) / pi)
          end
          
          b_m = abs(b);
          function tmp = code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = (180.0 * atan((180.0 * (y_45_scale / (angle * (pi * (0.0 - x_45_scale))))))) / pi;
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(N[(180.0 * N[ArcTan[N[(180.0 * N[(y$45$scale / N[(angle * N[(Pi * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \frac{180 \cdot \tan^{-1} \left(180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot \left(0 - x-scale\right)\right)}\right)}{\pi}
          \end{array}
          
          Derivation
          1. Initial program 18.6%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
          2. Simplified17.6%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          5. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(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)\right), \left(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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          6. Simplified30.6%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \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)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          8. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. neg-lowering-neg.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\left(\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)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \left(x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            10. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. PI-lowering-PI.f6448.3%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          9. Simplified48.3%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\color{blue}{\left(180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          11. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \left(\frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \mathsf{/.f64}\left(y-scale, \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \mathsf{/.f64}\left(y-scale, \mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \mathsf{/.f64}\left(y-scale, \mathsf{*.f64}\left(angle, \left(\mathsf{PI}\left(\right) \cdot x-scale\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \mathsf{/.f64}\left(y-scale, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), x-scale\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. PI-lowering-PI.f6441.9%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(180, \mathsf{/.f64}\left(y-scale, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), x-scale\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          12. Simplified41.9%

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(-\color{blue}{180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot x-scale\right)}}\right)}{\pi} \]
          13. Final simplification41.9%

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(180 \cdot \frac{y-scale}{angle \cdot \left(\pi \cdot \left(0 - x-scale\right)\right)}\right)}{\pi} \]
          14. Add Preprocessing

          Alternative 18: 37.8% accurate, 26.0× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (* 180.0 (/ (atan (/ (* y-scale -180.0) (* angle (* PI x-scale)))) PI)))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return 180.0 * (atan(((y_45_scale * -180.0) / (angle * (((double) M_PI) * x_45_scale)))) / ((double) M_PI));
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return 180.0 * (Math.atan(((y_45_scale * -180.0) / (angle * (Math.PI * x_45_scale)))) / Math.PI);
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	return 180.0 * (math.atan(((y_45_scale * -180.0) / (angle * (math.pi * x_45_scale)))) / math.pi)
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	return Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * -180.0) / Float64(angle * Float64(pi * x_45_scale)))) / pi))
          end
          
          b_m = abs(b);
          function tmp = code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 180.0 * (atan(((y_45_scale * -180.0) / (angle * (pi * x_45_scale)))) / pi);
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(angle * N[(Pi * x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi}
          \end{array}
          
          Derivation
          1. Initial program 18.6%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{90 \cdot \left(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)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(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)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified15.2%

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

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(-180 \cdot y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, y-scale\right), \mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, y-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(x-scale, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. PI-lowering-PI.f6441.9%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, y-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. Simplified41.9%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-180 \cdot y-scale}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}}{\pi} \]
          9. Final simplification41.9%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(\pi \cdot x-scale\right)}\right)}{\pi} \]
          10. Add Preprocessing

          Alternative 19: 14.4% accurate, 26.0× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ 180 \cdot \frac{\tan^{-1} \left(\frac{-180}{y-scale \cdot angle} \cdot \frac{x-scale}{\pi}\right)}{\pi} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (* 180.0 (/ (atan (* (/ -180.0 (* y-scale angle)) (/ x-scale PI))) PI)))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return 180.0 * (atan(((-180.0 / (y_45_scale * angle)) * (x_45_scale / ((double) M_PI)))) / ((double) M_PI));
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return 180.0 * (Math.atan(((-180.0 / (y_45_scale * angle)) * (x_45_scale / Math.PI))) / Math.PI);
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	return 180.0 * (math.atan(((-180.0 / (y_45_scale * angle)) * (x_45_scale / math.pi))) / math.pi)
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	return Float64(180.0 * Float64(atan(Float64(Float64(-180.0 / Float64(y_45_scale * angle)) * Float64(x_45_scale / pi))) / pi))
          end
          
          b_m = abs(b);
          function tmp = code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 180.0 * (atan(((-180.0 / (y_45_scale * angle)) * (x_45_scale / pi))) / pi);
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 / N[(y$45$scale * angle), $MachinePrecision]), $MachinePrecision] * N[(x$45$scale / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          180 \cdot \frac{\tan^{-1} \left(\frac{-180}{y-scale \cdot angle} \cdot \frac{x-scale}{\pi}\right)}{\pi}
          \end{array}
          
          Derivation
          1. Initial program 18.6%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{90 \cdot \left(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)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(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)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified15.2%

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

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot x-scale}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(-180 \cdot x-scale\right), \left(angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, x-scale\right), \left(angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, x-scale\right), \mathsf{*.f64}\left(angle, \left(y-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, x-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(y-scale, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. PI-lowering-PI.f6414.8%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, x-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(y-scale, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. Simplified14.8%

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot x-scale}{\left(angle \cdot y-scale\right) \cdot \mathsf{PI}\left(\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. times-fracN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180}{angle \cdot y-scale} \cdot \frac{x-scale}{\mathsf{PI}\left(\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\left(\frac{-180}{angle \cdot y-scale}\right), \left(\frac{x-scale}{\mathsf{PI}\left(\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, \left(angle \cdot y-scale\right)\right), \left(\frac{x-scale}{\mathsf{PI}\left(\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, \left(y-scale \cdot angle\right)\right), \left(\frac{x-scale}{\mathsf{PI}\left(\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, \mathsf{*.f64}\left(y-scale, angle\right)\right), \left(\frac{x-scale}{\mathsf{PI}\left(\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, \mathsf{*.f64}\left(y-scale, angle\right)\right), \mathsf{/.f64}\left(x-scale, \mathsf{PI}\left(\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. PI-lowering-PI.f6414.9%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, \mathsf{*.f64}\left(y-scale, angle\right)\right), \mathsf{/.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          10. Applied egg-rr14.9%

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

          Alternative 20: 14.4% accurate, 26.0× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ 180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{x-scale}{\pi}}{y-scale \cdot angle}\right)}{\pi} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (* 180.0 (/ (atan (* -180.0 (/ (/ x-scale PI) (* y-scale angle)))) PI)))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return 180.0 * (atan((-180.0 * ((x_45_scale / ((double) M_PI)) / (y_45_scale * angle)))) / ((double) M_PI));
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	return 180.0 * (Math.atan((-180.0 * ((x_45_scale / Math.PI) / (y_45_scale * angle)))) / Math.PI);
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle, x_45_scale, y_45_scale):
          	return 180.0 * (math.atan((-180.0 * ((x_45_scale / math.pi) / (y_45_scale * angle)))) / math.pi)
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	return Float64(180.0 * Float64(atan(Float64(-180.0 * Float64(Float64(x_45_scale / pi) / Float64(y_45_scale * angle)))) / pi))
          end
          
          b_m = abs(b);
          function tmp = code(a, b_m, angle, x_45_scale, y_45_scale)
          	tmp = 180.0 * (atan((-180.0 * ((x_45_scale / pi) / (y_45_scale * angle)))) / pi);
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(-180.0 * N[(N[(x$45$scale / Pi), $MachinePrecision] / N[(y$45$scale * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          180 \cdot \frac{\tan^{-1} \left(-180 \cdot \frac{\frac{x-scale}{\pi}}{y-scale \cdot angle}\right)}{\pi}
          \end{array}
          
          Derivation
          1. Initial program 18.6%

            \[180 \cdot \frac{\tan^{-1} \left(\frac{\left(\frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale} - \frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale}\right) - \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\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 \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}}\right)}{\pi} \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\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)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          4. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{90 \cdot \left(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)\right)}{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(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)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified15.2%

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

            \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\color{blue}{\left(-180 \cdot \frac{x-scale}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          7. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot x-scale}{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(-180 \cdot x-scale\right), \left(angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, x-scale\right), \left(angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, x-scale\right), \mathsf{*.f64}\left(angle, \left(y-scale \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, x-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(y-scale, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. PI-lowering-PI.f6414.8%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-180, x-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(y-scale, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. Simplified14.8%

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot x-scale}{\left(angle \cdot y-scale\right) \cdot \mathsf{PI}\left(\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. times-fracN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180}{angle \cdot y-scale} \cdot \frac{x-scale}{\mathsf{PI}\left(\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\left(\frac{-180}{angle \cdot y-scale}\right), \left(\frac{x-scale}{\mathsf{PI}\left(\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, \left(angle \cdot y-scale\right)\right), \left(\frac{x-scale}{\mathsf{PI}\left(\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, \left(y-scale \cdot angle\right)\right), \left(\frac{x-scale}{\mathsf{PI}\left(\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, \mathsf{*.f64}\left(y-scale, angle\right)\right), \left(\frac{x-scale}{\mathsf{PI}\left(\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, \mathsf{*.f64}\left(y-scale, angle\right)\right), \mathsf{/.f64}\left(x-scale, \mathsf{PI}\left(\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. PI-lowering-PI.f6414.9%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, \mathsf{*.f64}\left(y-scale, angle\right)\right), \mathsf{/.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          10. Applied egg-rr14.9%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-180}{y-scale \cdot angle} \cdot \frac{x-scale}{\pi}\right)}}{\pi} \]
          11. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180}{y-scale \cdot angle} \cdot \frac{1}{\frac{\mathsf{PI}\left(\right)}{x-scale}}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            2. frac-timesN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180 \cdot 1}{\left(y-scale \cdot angle\right) \cdot \frac{\mathsf{PI}\left(\right)}{x-scale}}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            3. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{-180}{\left(y-scale \cdot angle\right) \cdot \frac{\mathsf{PI}\left(\right)}{x-scale}}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            4. div-invN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(-180 \cdot \frac{1}{\left(y-scale \cdot angle\right) \cdot \frac{\mathsf{PI}\left(\right)}{x-scale}}\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \left(\frac{1}{\left(y-scale \cdot angle\right) \cdot \frac{\mathsf{PI}\left(\right)}{x-scale}}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            6. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \left(\frac{1}{\left(y-scale \cdot angle\right) \cdot \frac{1}{\frac{x-scale}{\mathsf{PI}\left(\right)}}}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            7. un-div-invN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \left(\frac{1}{\frac{y-scale \cdot angle}{\frac{x-scale}{\mathsf{PI}\left(\right)}}}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            8. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \left(\frac{\frac{x-scale}{\mathsf{PI}\left(\right)}}{y-scale \cdot angle}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\left(\frac{x-scale}{\mathsf{PI}\left(\right)}\right), \left(y-scale \cdot angle\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(x-scale, \mathsf{PI}\left(\right)\right), \left(y-scale \cdot angle\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            11. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \left(y-scale \cdot angle\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            12. *-lowering-*.f6414.8%

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(-180, \mathsf{/.f64}\left(\mathsf{/.f64}\left(x-scale, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(y-scale, angle\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          12. Applied egg-rr14.8%

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

          Reproduce

          ?
          herbie shell --seed 2024191 
          (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)))