raw-angle from scale-rotated-ellipse

Percentage Accurate: 13.6% → 56.3%
Time: 52.6s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 13.6% 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: 56.3% accurate, 6.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \frac{angle}{\frac{180}{\pi}}\\ t_1 := x-scale \cdot \cos t\_0\\ \mathbf{if}\;a\_m \leq 11500000000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5 \cdot y-scale}{t\_1} \cdot \frac{1 + 2 \cdot \left(0.5 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)}{\pi}\\ \mathbf{elif}\;a\_m \leq 6.8 \cdot 10^{+202}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin t\_0\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}{t\_1}\right)}{\pi}\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (/ angle (/ 180.0 PI))) (t_1 (* x-scale (cos t_0))))
   (if (<= a_m 11500000000.0)
     (/
      (*
       180.0
       (atan
        (*
         (/ (* -0.5 y-scale) t_1)
         (/
          (+ 1.0 (* 2.0 (* 0.5 (cos (* (* angle PI) 0.011111111111111112)))))
          (sin (* (* angle PI) 0.005555555555555556))))))
      PI)
     (if (<= a_m 6.8e+202)
       (* 180.0 (/ (atan (* (/ y-scale x-scale) (sin t_0))) PI))
       (/
        (*
         180.0
         (atan
          (/ (* y-scale (sin (* PI (* angle 0.005555555555555556)))) t_1)))
        PI)))))
a_m = fabs(a);
double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = angle / (180.0 / ((double) M_PI));
	double t_1 = x_45_scale * cos(t_0);
	double tmp;
	if (a_m <= 11500000000.0) {
		tmp = (180.0 * atan((((-0.5 * y_45_scale) / t_1) * ((1.0 + (2.0 * (0.5 * cos(((angle * ((double) M_PI)) * 0.011111111111111112))))) / sin(((angle * ((double) M_PI)) * 0.005555555555555556)))))) / ((double) M_PI);
	} else if (a_m <= 6.8e+202) {
		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin(t_0))) / ((double) M_PI));
	} else {
		tmp = (180.0 * atan(((y_45_scale * sin((((double) M_PI) * (angle * 0.005555555555555556)))) / t_1))) / ((double) M_PI);
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = angle / (180.0 / Math.PI);
	double t_1 = x_45_scale * Math.cos(t_0);
	double tmp;
	if (a_m <= 11500000000.0) {
		tmp = (180.0 * Math.atan((((-0.5 * y_45_scale) / t_1) * ((1.0 + (2.0 * (0.5 * Math.cos(((angle * Math.PI) * 0.011111111111111112))))) / Math.sin(((angle * Math.PI) * 0.005555555555555556)))))) / Math.PI;
	} else if (a_m <= 6.8e+202) {
		tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin(t_0))) / Math.PI);
	} else {
		tmp = (180.0 * Math.atan(((y_45_scale * Math.sin((Math.PI * (angle * 0.005555555555555556)))) / t_1))) / Math.PI;
	}
	return tmp;
}
a_m = math.fabs(a)
def code(a_m, b, angle, x_45_scale, y_45_scale):
	t_0 = angle / (180.0 / math.pi)
	t_1 = x_45_scale * math.cos(t_0)
	tmp = 0
	if a_m <= 11500000000.0:
		tmp = (180.0 * math.atan((((-0.5 * y_45_scale) / t_1) * ((1.0 + (2.0 * (0.5 * math.cos(((angle * math.pi) * 0.011111111111111112))))) / math.sin(((angle * math.pi) * 0.005555555555555556)))))) / math.pi
	elif a_m <= 6.8e+202:
		tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.sin(t_0))) / math.pi)
	else:
		tmp = (180.0 * math.atan(((y_45_scale * math.sin((math.pi * (angle * 0.005555555555555556)))) / t_1))) / math.pi
	return tmp
a_m = abs(a)
function code(a_m, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(angle / Float64(180.0 / pi))
	t_1 = Float64(x_45_scale * cos(t_0))
	tmp = 0.0
	if (a_m <= 11500000000.0)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-0.5 * y_45_scale) / t_1) * Float64(Float64(1.0 + Float64(2.0 * Float64(0.5 * cos(Float64(Float64(angle * pi) * 0.011111111111111112))))) / sin(Float64(Float64(angle * pi) * 0.005555555555555556)))))) / pi);
	elseif (a_m <= 6.8e+202)
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(t_0))) / pi));
	else
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(Float64(pi * Float64(angle * 0.005555555555555556)))) / t_1))) / pi);
	end
	return tmp
end
a_m = abs(a);
function tmp_2 = code(a_m, b, angle, x_45_scale, y_45_scale)
	t_0 = angle / (180.0 / pi);
	t_1 = x_45_scale * cos(t_0);
	tmp = 0.0;
	if (a_m <= 11500000000.0)
		tmp = (180.0 * atan((((-0.5 * y_45_scale) / t_1) * ((1.0 + (2.0 * (0.5 * cos(((angle * pi) * 0.011111111111111112))))) / sin(((angle * pi) * 0.005555555555555556)))))) / pi;
	elseif (a_m <= 6.8e+202)
		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin(t_0))) / pi);
	else
		tmp = (180.0 * atan(((y_45_scale * sin((pi * (angle * 0.005555555555555556)))) / t_1))) / pi;
	end
	tmp_2 = tmp;
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(angle / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a$95$m, 11500000000.0], N[(N[(180.0 * N[ArcTan[N[(N[(N[(-0.5 * y$45$scale), $MachinePrecision] / t$95$1), $MachinePrecision] * N[(N[(1.0 + N[(2.0 * N[(0.5 * N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[a$95$m, 6.8e+202], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
t_0 := \frac{angle}{\frac{180}{\pi}}\\
t_1 := x-scale \cdot \cos t\_0\\
\mathbf{if}\;a\_m \leq 11500000000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5 \cdot y-scale}{t\_1} \cdot \frac{1 + 2 \cdot \left(0.5 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)}{\pi}\\

\mathbf{elif}\;a\_m \leq 6.8 \cdot 10^{+202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin t\_0\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}{t\_1}\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 1.15e10

    1. Initial program 13.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. Simplified11.5%

      \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified30.2%

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \color{blue}{\left(2 \cdot \frac{\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \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) \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \left(\frac{2 \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\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{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\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) \]
      3. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \frac{1}{2} + 2 \cdot \left(\frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\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) \]
      4. metadata-evalN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(2 \cdot \left(\frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\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) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{2}, \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\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) \]
      8. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\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) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right)\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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right)\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) \]
      11. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right)\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) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right)\right)\right)\right), \mathsf{sin.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) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right)\right)\right)\right), \mathsf{sin.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) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right)\right)\right)\right), \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), \mathsf{PI.f64}\left(\right)\right) \]
    9. Simplified52.9%

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

    if 1.15e10 < a < 6.8e202

    1. Initial program 18.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. Simplified21.0%

      \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified30.1%

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

      \[\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) \]
    7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
      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(\left(\frac{1}{180} \cdot angle\right), \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) \]
      6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
      7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
      8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
      9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
      10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      13. PI-lowering-PI.f6450.0%

        \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    8. Simplified50.0%

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

      \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{1}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    10. Step-by-step derivation
      1. Simplified60.7%

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot 1}\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
      3. Applied egg-rr61.5%

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

      if 6.8e202 < a

      1. Initial program 0.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. Simplified0.0%

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

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

        \[\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) \]
      7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
        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(\left(\frac{1}{180} \cdot angle\right), \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) \]
        6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
        7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
        8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
        9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
        10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. PI-lowering-PI.f6472.6%

          \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Simplified72.6%

        \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{y-scale \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}{x-scale \cdot \cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}\right)}}{\pi} \]
      9. Step-by-step derivation
        1. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
        2. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
        3. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        5. metadata-evalN/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        6. div-invN/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        7. associate-/r/N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\frac{angle}{\frac{180}{\mathsf{PI}\left(\right)}}\right)\right)\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.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) \]
        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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.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) \]
        10. PI-lowering-PI.f6489.0%

          \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.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) \]
      10. Applied egg-rr89.0%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 11500000000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5 \cdot y-scale}{x-scale \cdot \cos \left(\frac{angle}{\frac{180}{\pi}}\right)} \cdot \frac{1 + 2 \cdot \left(0.5 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)}{\pi}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{+202}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}{x-scale \cdot \cos \left(\frac{angle}{\frac{180}{\pi}}\right)}\right)}{\pi}\\ \end{array} \]
    13. Add Preprocessing

    Alternative 2: 49.9% accurate, 6.7× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\ t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ \mathbf{if}\;b \leq 1.3 \cdot 10^{-33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}{\pi}\\ \mathbf{elif}\;b \leq 1.32 \cdot 10^{+39}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \left(-0.5 + -0.5 \cdot \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)}{\sin t\_0 \cdot \left(x-scale \cdot \cos t\_0\right)}\right)}{\pi}\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+136}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \frac{angle}{180}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \cos t\_1}{\sin t\_1 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle x-scale y-scale)
     :precision binary64
     (let* ((t_0 (* (* angle PI) 0.005555555555555556))
            (t_1 (* PI (* angle 0.005555555555555556))))
       (if (<= b 1.3e-33)
         (*
          180.0
          (/ (atan (* (/ y-scale x-scale) (sin (/ angle (/ 180.0 PI))))) PI))
         (if (<= b 1.32e+39)
           (/
            (*
             180.0
             (atan
              (/
               (*
                y-scale
                (+ -0.5 (* -0.5 (cos (* angle (* PI 0.011111111111111112))))))
               (* (sin t_0) (* x-scale (cos t_0))))))
            PI)
           (if (<= b 1.95e+136)
             (*
              180.0
              (/ (atan (* (/ y-scale x-scale) (tan (* PI (/ angle 180.0))))) PI))
             (/
              (*
               180.0
               (atan (/ (* y-scale (cos t_1)) (* (sin t_1) (- 0.0 x-scale)))))
              PI))))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
    	double t_0 = (angle * ((double) M_PI)) * 0.005555555555555556;
    	double t_1 = ((double) M_PI) * (angle * 0.005555555555555556);
    	double tmp;
    	if (b <= 1.3e-33) {
    		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((angle / (180.0 / ((double) M_PI)))))) / ((double) M_PI));
    	} else if (b <= 1.32e+39) {
    		tmp = (180.0 * atan(((y_45_scale * (-0.5 + (-0.5 * cos((angle * (((double) M_PI) * 0.011111111111111112)))))) / (sin(t_0) * (x_45_scale * cos(t_0)))))) / ((double) M_PI);
    	} else if (b <= 1.95e+136) {
    		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((((double) M_PI) * (angle / 180.0))))) / ((double) M_PI));
    	} else {
    		tmp = (180.0 * atan(((y_45_scale * cos(t_1)) / (sin(t_1) * (0.0 - x_45_scale))))) / ((double) M_PI);
    	}
    	return tmp;
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
    	double t_0 = (angle * Math.PI) * 0.005555555555555556;
    	double t_1 = Math.PI * (angle * 0.005555555555555556);
    	double tmp;
    	if (b <= 1.3e-33) {
    		tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin((angle / (180.0 / Math.PI))))) / Math.PI);
    	} else if (b <= 1.32e+39) {
    		tmp = (180.0 * Math.atan(((y_45_scale * (-0.5 + (-0.5 * Math.cos((angle * (Math.PI * 0.011111111111111112)))))) / (Math.sin(t_0) * (x_45_scale * Math.cos(t_0)))))) / Math.PI;
    	} else if (b <= 1.95e+136) {
    		tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan((Math.PI * (angle / 180.0))))) / Math.PI);
    	} else {
    		tmp = (180.0 * Math.atan(((y_45_scale * Math.cos(t_1)) / (Math.sin(t_1) * (0.0 - x_45_scale))))) / Math.PI;
    	}
    	return tmp;
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle, x_45_scale, y_45_scale):
    	t_0 = (angle * math.pi) * 0.005555555555555556
    	t_1 = math.pi * (angle * 0.005555555555555556)
    	tmp = 0
    	if b <= 1.3e-33:
    		tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.sin((angle / (180.0 / math.pi))))) / math.pi)
    	elif b <= 1.32e+39:
    		tmp = (180.0 * math.atan(((y_45_scale * (-0.5 + (-0.5 * math.cos((angle * (math.pi * 0.011111111111111112)))))) / (math.sin(t_0) * (x_45_scale * math.cos(t_0)))))) / math.pi
    	elif b <= 1.95e+136:
    		tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan((math.pi * (angle / 180.0))))) / math.pi)
    	else:
    		tmp = (180.0 * math.atan(((y_45_scale * math.cos(t_1)) / (math.sin(t_1) * (0.0 - x_45_scale))))) / math.pi
    	return tmp
    
    a_m = abs(a)
    function code(a_m, b, angle, x_45_scale, y_45_scale)
    	t_0 = Float64(Float64(angle * pi) * 0.005555555555555556)
    	t_1 = Float64(pi * Float64(angle * 0.005555555555555556))
    	tmp = 0.0
    	if (b <= 1.3e-33)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(Float64(angle / Float64(180.0 / pi))))) / pi));
    	elseif (b <= 1.32e+39)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * Float64(-0.5 + Float64(-0.5 * cos(Float64(angle * Float64(pi * 0.011111111111111112)))))) / Float64(sin(t_0) * Float64(x_45_scale * cos(t_0)))))) / pi);
    	elseif (b <= 1.95e+136)
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(pi * Float64(angle / 180.0))))) / pi));
    	else
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * cos(t_1)) / Float64(sin(t_1) * Float64(0.0 - x_45_scale))))) / pi);
    	end
    	return tmp
    end
    
    a_m = abs(a);
    function tmp_2 = code(a_m, b, angle, x_45_scale, y_45_scale)
    	t_0 = (angle * pi) * 0.005555555555555556;
    	t_1 = pi * (angle * 0.005555555555555556);
    	tmp = 0.0;
    	if (b <= 1.3e-33)
    		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((angle / (180.0 / pi))))) / pi);
    	elseif (b <= 1.32e+39)
    		tmp = (180.0 * atan(((y_45_scale * (-0.5 + (-0.5 * cos((angle * (pi * 0.011111111111111112)))))) / (sin(t_0) * (x_45_scale * cos(t_0)))))) / pi;
    	elseif (b <= 1.95e+136)
    		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((pi * (angle / 180.0))))) / pi);
    	else
    		tmp = (180.0 * atan(((y_45_scale * cos(t_1)) / (sin(t_1) * (0.0 - x_45_scale))))) / pi;
    	end
    	tmp_2 = tmp;
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 1.3e-33], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[N[(angle / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.32e+39], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[(-0.5 + N[(-0.5 * N[Cos[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[t$95$0], $MachinePrecision] * N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[b, 1.95e+136], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[t$95$1], $MachinePrecision] * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
    t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
    \mathbf{if}\;b \leq 1.3 \cdot 10^{-33}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}{\pi}\\
    
    \mathbf{elif}\;b \leq 1.32 \cdot 10^{+39}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \left(-0.5 + -0.5 \cdot \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)}{\sin t\_0 \cdot \left(x-scale \cdot \cos t\_0\right)}\right)}{\pi}\\
    
    \mathbf{elif}\;b \leq 1.95 \cdot 10^{+136}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \frac{angle}{180}\right)\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \cos t\_1}{\sin t\_1 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if b < 1.29999999999999997e-33

      1. Initial program 13.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. Simplified11.3%

        \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified26.6%

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

        \[\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) \]
      7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
        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(\left(\frac{1}{180} \cdot angle\right), \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) \]
        6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
        7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
        8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
        9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
        10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        13. PI-lowering-PI.f6449.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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      8. Simplified49.7%

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

        \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{1}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      10. Step-by-step derivation
        1. Simplified55.6%

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot 1}\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
        3. Applied egg-rr56.0%

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

        if 1.29999999999999997e-33 < b < 1.32e39

        1. Initial program 41.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. Simplified41.5%

          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified64.2%

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right), \mathsf{sin.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\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{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right), \mathsf{sin.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\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{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), \frac{1}{90}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right), \mathsf{sin.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          5. PI-lowering-PI.f6458.7%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, y-scale\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{90}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right), \mathsf{sin.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        9. Simplified58.7%

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{y-scale \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{x-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        11. Simplified63.0%

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

        if 1.32e39 < b < 1.9500000000000001e136

        1. Initial program 5.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. Simplified5.6%

          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified39.2%

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

          \[\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) \]
        7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
          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(\left(\frac{1}{180} \cdot angle\right), \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) \]
          6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
          7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
          8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
          9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
          10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          13. PI-lowering-PI.f6473.4%

            \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. Simplified73.4%

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
        10. Applied egg-rr57.0%

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\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(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\right)\right)\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(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \frac{1}{180}\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
          7. metadata-evalN/A

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

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

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

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

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

        if 1.9500000000000001e136 < b

        1. Initial program 4.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. Simplified3.8%

          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified7.7%

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

          \[\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) \]
        7. Step-by-step derivation
          1. associate-*r/N/A

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \left(y-scale \cdot \cos \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), \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(-1, \mathsf{*.f64}\left(y-scale, \cos \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), \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{/.f64}\left(\mathsf{*.f64}\left(-1, \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)\right), \left(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) \]
          6. associate-*r*N/A

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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), \mathsf{PI.f64}\left(\right)\right) \]
          12. associate-*r*N/A

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.3 \cdot 10^{-33}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}{\pi}\\ \mathbf{elif}\;b \leq 1.32 \cdot 10^{+39}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \left(-0.5 + -0.5 \cdot \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(x-scale \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}\right)}{\pi}\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+136}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \frac{angle}{180}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \end{array} \]
      13. Add Preprocessing

      Alternative 3: 56.5% accurate, 6.7× speedup?

      \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \frac{angle}{\frac{180}{\pi}}\\ t_1 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\ \mathbf{if}\;a\_m \leq 5800000000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(0 - 0.5\right) - 0.5}{\sin t\_1 \cdot \cos t\_1}\right)}{\pi}\\ \mathbf{elif}\;a\_m \leq 6.2 \cdot 10^{+202}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin t\_0\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}{x-scale \cdot \cos t\_0}\right)}{\pi}\\ \end{array} \end{array} \]
      a_m = (fabs.f64 a)
      (FPCore (a_m b angle x-scale y-scale)
       :precision binary64
       (let* ((t_0 (/ angle (/ 180.0 PI)))
              (t_1 (* (* angle PI) 0.005555555555555556)))
         (if (<= a_m 5800000000.0)
           (/
            (*
             180.0
             (atan
              (*
               (/ y-scale x-scale)
               (/
                (- (* (cos (* (* angle PI) 0.011111111111111112)) (- 0.0 0.5)) 0.5)
                (* (sin t_1) (cos t_1))))))
            PI)
           (if (<= a_m 6.2e+202)
             (* 180.0 (/ (atan (* (/ y-scale x-scale) (sin t_0))) PI))
             (/
              (*
               180.0
               (atan
                (/
                 (* y-scale (sin (* PI (* angle 0.005555555555555556))))
                 (* x-scale (cos t_0)))))
              PI)))))
      a_m = fabs(a);
      double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
      	double t_0 = angle / (180.0 / ((double) M_PI));
      	double t_1 = (angle * ((double) M_PI)) * 0.005555555555555556;
      	double tmp;
      	if (a_m <= 5800000000.0) {
      		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (((cos(((angle * ((double) M_PI)) * 0.011111111111111112)) * (0.0 - 0.5)) - 0.5) / (sin(t_1) * cos(t_1)))))) / ((double) M_PI);
      	} else if (a_m <= 6.2e+202) {
      		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin(t_0))) / ((double) M_PI));
      	} else {
      		tmp = (180.0 * atan(((y_45_scale * sin((((double) M_PI) * (angle * 0.005555555555555556)))) / (x_45_scale * cos(t_0))))) / ((double) M_PI);
      	}
      	return tmp;
      }
      
      a_m = Math.abs(a);
      public static double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
      	double t_0 = angle / (180.0 / Math.PI);
      	double t_1 = (angle * Math.PI) * 0.005555555555555556;
      	double tmp;
      	if (a_m <= 5800000000.0) {
      		tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * (((Math.cos(((angle * Math.PI) * 0.011111111111111112)) * (0.0 - 0.5)) - 0.5) / (Math.sin(t_1) * Math.cos(t_1)))))) / Math.PI;
      	} else if (a_m <= 6.2e+202) {
      		tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin(t_0))) / Math.PI);
      	} else {
      		tmp = (180.0 * Math.atan(((y_45_scale * Math.sin((Math.PI * (angle * 0.005555555555555556)))) / (x_45_scale * Math.cos(t_0))))) / Math.PI;
      	}
      	return tmp;
      }
      
      a_m = math.fabs(a)
      def code(a_m, b, angle, x_45_scale, y_45_scale):
      	t_0 = angle / (180.0 / math.pi)
      	t_1 = (angle * math.pi) * 0.005555555555555556
      	tmp = 0
      	if a_m <= 5800000000.0:
      		tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * (((math.cos(((angle * math.pi) * 0.011111111111111112)) * (0.0 - 0.5)) - 0.5) / (math.sin(t_1) * math.cos(t_1)))))) / math.pi
      	elif a_m <= 6.2e+202:
      		tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.sin(t_0))) / math.pi)
      	else:
      		tmp = (180.0 * math.atan(((y_45_scale * math.sin((math.pi * (angle * 0.005555555555555556)))) / (x_45_scale * math.cos(t_0))))) / math.pi
      	return tmp
      
      a_m = abs(a)
      function code(a_m, b, angle, x_45_scale, y_45_scale)
      	t_0 = Float64(angle / Float64(180.0 / pi))
      	t_1 = Float64(Float64(angle * pi) * 0.005555555555555556)
      	tmp = 0.0
      	if (a_m <= 5800000000.0)
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(Float64(Float64(cos(Float64(Float64(angle * pi) * 0.011111111111111112)) * Float64(0.0 - 0.5)) - 0.5) / Float64(sin(t_1) * cos(t_1)))))) / pi);
      	elseif (a_m <= 6.2e+202)
      		tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(t_0))) / pi));
      	else
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * sin(Float64(pi * Float64(angle * 0.005555555555555556)))) / Float64(x_45_scale * cos(t_0))))) / pi);
      	end
      	return tmp
      end
      
      a_m = abs(a);
      function tmp_2 = code(a_m, b, angle, x_45_scale, y_45_scale)
      	t_0 = angle / (180.0 / pi);
      	t_1 = (angle * pi) * 0.005555555555555556;
      	tmp = 0.0;
      	if (a_m <= 5800000000.0)
      		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (((cos(((angle * pi) * 0.011111111111111112)) * (0.0 - 0.5)) - 0.5) / (sin(t_1) * cos(t_1)))))) / pi;
      	elseif (a_m <= 6.2e+202)
      		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin(t_0))) / pi);
      	else
      		tmp = (180.0 * atan(((y_45_scale * sin((pi * (angle * 0.005555555555555556)))) / (x_45_scale * cos(t_0))))) / pi;
      	end
      	tmp_2 = tmp;
      end
      
      a_m = N[Abs[a], $MachinePrecision]
      code[a$95$m_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(angle / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[a$95$m, 5800000000.0], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(N[(N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(0.0 - 0.5), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] / N[(N[Sin[t$95$1], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[a$95$m, 6.2e+202], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
      
      \begin{array}{l}
      a_m = \left|a\right|
      
      \\
      \begin{array}{l}
      t_0 := \frac{angle}{\frac{180}{\pi}}\\
      t_1 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
      \mathbf{if}\;a\_m \leq 5800000000:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(0 - 0.5\right) - 0.5}{\sin t\_1 \cdot \cos t\_1}\right)}{\pi}\\
      
      \mathbf{elif}\;a\_m \leq 6.2 \cdot 10^{+202}:\\
      \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin t\_0\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if a < 5.8e9

        1. Initial program 13.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. Simplified11.5%

          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified30.2%

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(-1 \cdot \frac{y-scale \cdot \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{x-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\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 \left(\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{x-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          2. times-fracN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\mathsf{neg}\left(\frac{y-scale}{x-scale} \cdot \frac{\frac{1}{2} + \frac{1}{2} \cdot \cos \left(\frac{1}{90} \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) \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. distribute-lft-neg-inN/A

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

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

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

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

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

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

        if 5.8e9 < a < 6.19999999999999983e202

        1. Initial program 18.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. Simplified21.0%

          \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified30.1%

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

          \[\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) \]
        7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
          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(\left(\frac{1}{180} \cdot angle\right), \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) \]
          6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
          7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
          8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
          9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
          10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          13. PI-lowering-PI.f6450.0%

            \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        8. Simplified50.0%

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

          \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{1}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. Step-by-step derivation
          1. Simplified60.7%

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot 1}\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
          3. Applied egg-rr61.5%

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

          if 6.19999999999999983e202 < a

          1. Initial program 0.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. Simplified0.0%

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

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

            \[\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) \]
          7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
            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(\left(\frac{1}{180} \cdot angle\right), \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) \]
            6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
            7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
            8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
            9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
            10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. PI-lowering-PI.f6472.6%

              \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          8. Simplified72.6%

            \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{y-scale \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}{x-scale \cdot \cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}\right)}}{\pi} \]
          9. Step-by-step derivation
            1. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
            2. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
            3. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            5. metadata-evalN/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(angle \cdot \frac{1}{180}\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            6. div-invN/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            7. associate-/r/N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\frac{angle}{\frac{180}{\mathsf{PI}\left(\right)}}\right)\right)\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.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) \]
            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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.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) \]
            10. PI-lowering-PI.f6489.0%

              \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.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) \]
          10. Applied egg-rr89.0%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 5800000000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(0 - 0.5\right) - 0.5}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)}{\pi}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+202}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}{x-scale \cdot \cos \left(\frac{angle}{\frac{180}{\pi}}\right)}\right)}{\pi}\\ \end{array} \]
        13. Add Preprocessing

        Alternative 4: 49.9% accurate, 8.8× speedup?

        \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \cos t\_0}{\sin t\_0 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \mathbf{if}\;b \leq 4.9 \cdot 10^{-34}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}{\pi}\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.02 \cdot 10^{+136}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \frac{angle}{180}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        a_m = (fabs.f64 a)
        (FPCore (a_m b angle x-scale y-scale)
         :precision binary64
         (let* ((t_0 (* PI (* angle 0.005555555555555556)))
                (t_1
                 (/
                  (*
                   180.0
                   (atan (/ (* y-scale (cos t_0)) (* (sin t_0) (- 0.0 x-scale)))))
                  PI)))
           (if (<= b 4.9e-34)
             (*
              180.0
              (/ (atan (* (/ y-scale x-scale) (sin (/ angle (/ 180.0 PI))))) PI))
             (if (<= b 1.5e+39)
               t_1
               (if (<= b 2.02e+136)
                 (*
                  180.0
                  (/ (atan (* (/ y-scale x-scale) (tan (* PI (/ angle 180.0))))) PI))
                 t_1)))))
        a_m = fabs(a);
        double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
        	double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
        	double t_1 = (180.0 * atan(((y_45_scale * cos(t_0)) / (sin(t_0) * (0.0 - x_45_scale))))) / ((double) M_PI);
        	double tmp;
        	if (b <= 4.9e-34) {
        		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((angle / (180.0 / ((double) M_PI)))))) / ((double) M_PI));
        	} else if (b <= 1.5e+39) {
        		tmp = t_1;
        	} else if (b <= 2.02e+136) {
        		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((((double) M_PI) * (angle / 180.0))))) / ((double) M_PI));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        a_m = Math.abs(a);
        public static double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
        	double t_0 = Math.PI * (angle * 0.005555555555555556);
        	double t_1 = (180.0 * Math.atan(((y_45_scale * Math.cos(t_0)) / (Math.sin(t_0) * (0.0 - x_45_scale))))) / Math.PI;
        	double tmp;
        	if (b <= 4.9e-34) {
        		tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.sin((angle / (180.0 / Math.PI))))) / Math.PI);
        	} else if (b <= 1.5e+39) {
        		tmp = t_1;
        	} else if (b <= 2.02e+136) {
        		tmp = 180.0 * (Math.atan(((y_45_scale / x_45_scale) * Math.tan((Math.PI * (angle / 180.0))))) / Math.PI);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        a_m = math.fabs(a)
        def code(a_m, b, angle, x_45_scale, y_45_scale):
        	t_0 = math.pi * (angle * 0.005555555555555556)
        	t_1 = (180.0 * math.atan(((y_45_scale * math.cos(t_0)) / (math.sin(t_0) * (0.0 - x_45_scale))))) / math.pi
        	tmp = 0
        	if b <= 4.9e-34:
        		tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.sin((angle / (180.0 / math.pi))))) / math.pi)
        	elif b <= 1.5e+39:
        		tmp = t_1
        	elif b <= 2.02e+136:
        		tmp = 180.0 * (math.atan(((y_45_scale / x_45_scale) * math.tan((math.pi * (angle / 180.0))))) / math.pi)
        	else:
        		tmp = t_1
        	return tmp
        
        a_m = abs(a)
        function code(a_m, b, angle, x_45_scale, y_45_scale)
        	t_0 = Float64(pi * Float64(angle * 0.005555555555555556))
        	t_1 = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * cos(t_0)) / Float64(sin(t_0) * Float64(0.0 - x_45_scale))))) / pi)
        	tmp = 0.0
        	if (b <= 4.9e-34)
        		tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * sin(Float64(angle / Float64(180.0 / pi))))) / pi));
        	elseif (b <= 1.5e+39)
        		tmp = t_1;
        	elseif (b <= 2.02e+136)
        		tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale / x_45_scale) * tan(Float64(pi * Float64(angle / 180.0))))) / pi));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        a_m = abs(a);
        function tmp_2 = code(a_m, b, angle, x_45_scale, y_45_scale)
        	t_0 = pi * (angle * 0.005555555555555556);
        	t_1 = (180.0 * atan(((y_45_scale * cos(t_0)) / (sin(t_0) * (0.0 - x_45_scale))))) / pi;
        	tmp = 0.0;
        	if (b <= 4.9e-34)
        		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * sin((angle / (180.0 / pi))))) / pi);
        	elseif (b <= 1.5e+39)
        		tmp = t_1;
        	elseif (b <= 2.02e+136)
        		tmp = 180.0 * (atan(((y_45_scale / x_45_scale) * tan((pi * (angle / 180.0))))) / pi);
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        a_m = N[Abs[a], $MachinePrecision]
        code[a$95$m_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[t$95$0], $MachinePrecision] * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[b, 4.9e-34], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Sin[N[(angle / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e+39], t$95$1, If[LessEqual[b, 2.02e+136], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[Tan[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
        
        \begin{array}{l}
        a_m = \left|a\right|
        
        \\
        \begin{array}{l}
        t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
        t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \cos t\_0}{\sin t\_0 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\
        \mathbf{if}\;b \leq 4.9 \cdot 10^{-34}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}{\pi}\\
        
        \mathbf{elif}\;b \leq 1.5 \cdot 10^{+39}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;b \leq 2.02 \cdot 10^{+136}:\\
        \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \frac{angle}{180}\right)\right)}{\pi}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if b < 4.89999999999999962e-34

          1. Initial program 13.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. Simplified11.3%

            \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified26.6%

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

            \[\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) \]
          7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
            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(\left(\frac{1}{180} \cdot angle\right), \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) \]
            6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
            7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
            8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
            9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
            10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            13. PI-lowering-PI.f6449.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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          8. Simplified49.7%

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

            \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{1}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          10. Step-by-step derivation
            1. Simplified55.6%

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot 1}\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
            3. Applied egg-rr56.0%

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

            if 4.89999999999999962e-34 < b < 1.5e39 or 2.02000000000000002e136 < b

            1. Initial program 19.1%

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

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

              \[\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) \]
            7. Step-by-step derivation
              1. associate-*r/N/A

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \left(y-scale \cdot \cos \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), \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(-1, \mathsf{*.f64}\left(y-scale, \cos \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), \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{/.f64}\left(\mathsf{*.f64}\left(-1, \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)\right), \left(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) \]
              6. associate-*r*N/A

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(y-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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), \mathsf{PI.f64}\left(\right)\right) \]
              12. associate-*r*N/A

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

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

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

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

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

            if 1.5e39 < b < 2.02000000000000002e136

            1. Initial program 5.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. Simplified5.6%

              \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified39.2%

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

              \[\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) \]
            7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
              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(\left(\frac{1}{180} \cdot angle\right), \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) \]
              6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
              7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
              8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
              9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
              10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6473.4%

                \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Simplified73.4%

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
            10. Applied egg-rr57.0%

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\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(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\right)\right)\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(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{tan.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \frac{1}{180}\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
              7. metadata-evalN/A

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.9 \cdot 10^{-34}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \sin \left(\frac{angle}{\frac{180}{\pi}}\right)\right)}{\pi}\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{+39}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \mathbf{elif}\;b \leq 2.02 \cdot 10^{+136}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\pi \cdot \frac{angle}{180}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \end{array} \]
          13. Add Preprocessing

          Alternative 5: 49.7% accurate, 13.5× speedup?

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

            1. Initial program 14.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.4%

              \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified29.5%

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

              \[\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) \]
            7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
              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(\left(\frac{1}{180} \cdot angle\right), \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) \]
              6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
              7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
              8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
              9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
              10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              13. PI-lowering-PI.f6448.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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            8. Simplified48.7%

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

              \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{1}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
            10. Step-by-step derivation
              1. Simplified55.1%

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot 1}\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
              3. Applied egg-rr55.8%

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

              if 9.80000000000000012e72 < 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. Simplified5.2%

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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(\left(b + a\right) \cdot \left(b - a\right)\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                3. difference-of-squaresN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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 \cdot b - a \cdot a\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                4. unpow2N/A

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. Simplified5.1%

                \[\leadsto \frac{180 \cdot \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} \]
              7. Taylor expanded in a around 0

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{-180 \cdot y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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(\left(-180 \cdot y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(-180, y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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(-180, y-scale\right), \mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\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(-180, y-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(x-scale, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                6. PI-lowering-PI.f6449.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. Simplified49.1%

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

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

            Alternative 6: 53.5% accurate, 13.5× speedup?

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

              1. Initial program 13.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. Simplified11.5%

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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(\left(b + a\right) \cdot \left(b - a\right)\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                3. difference-of-squaresN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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 \cdot b - a \cdot a\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                4. unpow2N/A

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. Simplified11.4%

                \[\leadsto \frac{180 \cdot \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} \]
              7. Taylor expanded in a around 0

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{-180 \cdot y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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(\left(-180 \cdot y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(-180, y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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(-180, y-scale\right), \mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\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(-180, y-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(x-scale, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                6. PI-lowering-PI.f6444.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. Simplified44.1%

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

              if 2e17 < a

              1. Initial program 12.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. Simplified14.4%

                \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified20.6%

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

                \[\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) \]
              7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
                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(\left(\frac{1}{180} \cdot angle\right), \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) \]
                6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
                7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
                8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                13. PI-lowering-PI.f6457.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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. Simplified57.1%

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
              10. Applied egg-rr67.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\mathsf{tan.f64}\left(\mathsf{/.f64}\left(angle, \mathsf{/.f64}\left(180, \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{/.f64}\left(x-scale, y-scale\right)\right)\right), \mathsf{/.f64}\left(180, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                15. PI-lowering-PI.f6467.7%

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2 \cdot 10^{+17}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\tan \left(\frac{angle}{\frac{180}{\pi}}\right)}{\frac{x-scale}{y-scale}}\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 7: 53.5% accurate, 13.5× speedup?

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

              1. Initial program 13.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. Simplified11.5%

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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(\left(b + a\right) \cdot \left(b - a\right)\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                3. difference-of-squaresN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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 \cdot b - a \cdot a\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                4. unpow2N/A

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. Simplified11.4%

                \[\leadsto \frac{180 \cdot \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} \]
              7. Taylor expanded in a around 0

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{-180 \cdot y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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(\left(-180 \cdot y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(-180, y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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(-180, y-scale\right), \mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\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(-180, y-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(x-scale, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                6. PI-lowering-PI.f6444.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. Simplified44.1%

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

              if 1.32e16 < a

              1. Initial program 12.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. Simplified14.4%

                \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified20.6%

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

                \[\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) \]
              7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
                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(\left(\frac{1}{180} \cdot angle\right), \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) \]
                6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
                7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
                8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                13. PI-lowering-PI.f6457.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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. Simplified57.1%

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}\right), \color{blue}{\left(\frac{180}{\mathsf{PI}\left(\right)}\right)}\right) \]
              10. Applied egg-rr67.7%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.32 \cdot 10^{+16}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan \left(\frac{angle}{\frac{180}{\pi}}\right)\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 8: 52.8% accurate, 24.9× speedup?

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

              1. Initial program 13.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. Simplified11.5%

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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(\left(b + a\right) \cdot \left(b - a\right)\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                3. difference-of-squaresN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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 \cdot b - a \cdot a\right)\right)}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                4. unpow2N/A

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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)\right), \mathsf{PI.f64}\left(\right)\right) \]
              6. Simplified11.4%

                \[\leadsto \frac{180 \cdot \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} \]
              7. Taylor expanded in a around 0

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\left(\frac{-180 \cdot y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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(\left(-180 \cdot y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(-180, y-scale\right), \left(angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\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(-180, y-scale\right), \mathsf{*.f64}\left(angle, \left(x-scale \cdot \mathsf{PI}\left(\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(-180, y-scale\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(x-scale, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                6. PI-lowering-PI.f6444.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \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)\right), \mathsf{PI.f64}\left(\right)\right) \]
              9. Simplified44.1%

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

              if 2.8e9 < a

              1. Initial program 12.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. Simplified14.4%

                \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified20.6%

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

                \[\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) \]
              7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
                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(\left(\frac{1}{180} \cdot angle\right), \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) \]
                6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
                7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
                8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                13. PI-lowering-PI.f6457.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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. Simplified57.1%

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

                \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{1}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. Step-by-step derivation
                1. Simplified62.1%

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

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\frac{1}{180} \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{x-scale}\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(angle, \mathsf{/.f64}\left(\left(\frac{1}{180} \cdot \left(y-scale \cdot \mathsf{PI}\left(\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{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(y-scale \cdot \mathsf{PI}\left(\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{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(y-scale, \mathsf{PI}\left(\right)\right)\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                  10. PI-lowering-PI.f6462.7%

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2800000000:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot -180}{angle \cdot \left(x-scale \cdot \pi\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(angle \cdot \frac{0.005555555555555556 \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi}\\ \end{array} \]
              13. Add Preprocessing

              Alternative 9: 45.7% accurate, 26.0× speedup?

              \[\begin{array}{l} a_m = \left|a\right| \\ \frac{180 \cdot \tan^{-1} \left(angle \cdot \frac{0.005555555555555556 \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi} \end{array} \]
              a_m = (fabs.f64 a)
              (FPCore (a_m b angle x-scale y-scale)
               :precision binary64
               (/
                (*
                 180.0
                 (atan (* angle (/ (* 0.005555555555555556 (* y-scale PI)) x-scale))))
                PI))
              a_m = fabs(a);
              double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
              	return (180.0 * atan((angle * ((0.005555555555555556 * (y_45_scale * ((double) M_PI))) / x_45_scale)))) / ((double) M_PI);
              }
              
              a_m = Math.abs(a);
              public static double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
              	return (180.0 * Math.atan((angle * ((0.005555555555555556 * (y_45_scale * Math.PI)) / x_45_scale)))) / Math.PI;
              }
              
              a_m = math.fabs(a)
              def code(a_m, b, angle, x_45_scale, y_45_scale):
              	return (180.0 * math.atan((angle * ((0.005555555555555556 * (y_45_scale * math.pi)) / x_45_scale)))) / math.pi
              
              a_m = abs(a)
              function code(a_m, b, angle, x_45_scale, y_45_scale)
              	return Float64(Float64(180.0 * atan(Float64(angle * Float64(Float64(0.005555555555555556 * Float64(y_45_scale * pi)) / x_45_scale)))) / pi)
              end
              
              a_m = abs(a);
              function tmp = code(a_m, b, angle, x_45_scale, y_45_scale)
              	tmp = (180.0 * atan((angle * ((0.005555555555555556 * (y_45_scale * pi)) / x_45_scale)))) / pi;
              end
              
              a_m = N[Abs[a], $MachinePrecision]
              code[a$95$m_, b_, angle_, x$45$scale_, y$45$scale_] := N[(N[(180.0 * N[ArcTan[N[(angle * N[(N[(0.005555555555555556 * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]
              
              \begin{array}{l}
              a_m = \left|a\right|
              
              \\
              \frac{180 \cdot \tan^{-1} \left(angle \cdot \frac{0.005555555555555556 \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi}
              \end{array}
              
              Derivation
              1. Initial program 13.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. Simplified12.1%

                \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified28.1%

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

                \[\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) \]
              7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
                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(\left(\frac{1}{180} \cdot angle\right), \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) \]
                6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
                7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
                8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                13. PI-lowering-PI.f6447.8%

                  \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              8. Simplified47.8%

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

                \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{1}\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
              10. Step-by-step derivation
                1. Simplified51.6%

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

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{\frac{1}{180} \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{x-scale}\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(angle, \mathsf{/.f64}\left(\left(\frac{1}{180} \cdot \left(y-scale \cdot \mathsf{PI}\left(\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{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(y-scale \cdot \mathsf{PI}\left(\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{*.f64}\left(angle, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(y-scale, \mathsf{PI}\left(\right)\right)\right), x-scale\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                  10. PI-lowering-PI.f6446.2%

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

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

                Alternative 10: 45.7% accurate, 26.0× speedup?

                \[\begin{array}{l} a_m = \left|a\right| \\ 180 \cdot \frac{\tan^{-1} \left(\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi} \end{array} \]
                a_m = (fabs.f64 a)
                (FPCore (a_m b angle x-scale y-scale)
                 :precision binary64
                 (*
                  180.0
                  (/ (atan (* (* (* angle PI) 0.005555555555555556) (/ y-scale x-scale))) PI)))
                a_m = fabs(a);
                double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
                	return 180.0 * (atan((((angle * ((double) M_PI)) * 0.005555555555555556) * (y_45_scale / x_45_scale))) / ((double) M_PI));
                }
                
                a_m = Math.abs(a);
                public static double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
                	return 180.0 * (Math.atan((((angle * Math.PI) * 0.005555555555555556) * (y_45_scale / x_45_scale))) / Math.PI);
                }
                
                a_m = math.fabs(a)
                def code(a_m, b, angle, x_45_scale, y_45_scale):
                	return 180.0 * (math.atan((((angle * math.pi) * 0.005555555555555556) * (y_45_scale / x_45_scale))) / math.pi)
                
                a_m = abs(a)
                function code(a_m, b, angle, x_45_scale, y_45_scale)
                	return Float64(180.0 * Float64(atan(Float64(Float64(Float64(angle * pi) * 0.005555555555555556) * Float64(y_45_scale / x_45_scale))) / pi))
                end
                
                a_m = abs(a);
                function tmp = code(a_m, b, angle, x_45_scale, y_45_scale)
                	tmp = 180.0 * (atan((((angle * pi) * 0.005555555555555556) * (y_45_scale / x_45_scale))) / pi);
                end
                
                a_m = N[Abs[a], $MachinePrecision]
                code[a$95$m_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                a_m = \left|a\right|
                
                \\
                180 \cdot \frac{\tan^{-1} \left(\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi}
                \end{array}
                
                Derivation
                1. Initial program 13.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. Simplified12.1%

                  \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified28.1%

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

                  \[\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) \]
                7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
                  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(\left(\frac{1}{180} \cdot angle\right), \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) \]
                  6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
                  7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
                  8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                  9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                  10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                  13. PI-lowering-PI.f6447.8%

                    \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                8. Simplified47.8%

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
                10. Applied egg-rr49.5%

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\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(\mathsf{/.f64}\left(y-scale, x-scale\right), \mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
                  3. PI-lowering-PI.f6446.2%

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

                  \[\leadsto \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi} \cdot 180 \]
                14. Final simplification46.2%

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi} \]
                15. Add Preprocessing

                Alternative 11: 45.7% accurate, 26.0× speedup?

                \[\begin{array}{l} a_m = \left|a\right| \\ 180 \cdot \frac{\tan^{-1} \left(angle \cdot \frac{0.005555555555555556 \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi} \end{array} \]
                a_m = (fabs.f64 a)
                (FPCore (a_m b angle x-scale y-scale)
                 :precision binary64
                 (*
                  180.0
                  (/ (atan (* angle (/ (* 0.005555555555555556 (* y-scale PI)) x-scale))) PI)))
                a_m = fabs(a);
                double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
                	return 180.0 * (atan((angle * ((0.005555555555555556 * (y_45_scale * ((double) M_PI))) / x_45_scale))) / ((double) M_PI));
                }
                
                a_m = Math.abs(a);
                public static double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
                	return 180.0 * (Math.atan((angle * ((0.005555555555555556 * (y_45_scale * Math.PI)) / x_45_scale))) / Math.PI);
                }
                
                a_m = math.fabs(a)
                def code(a_m, b, angle, x_45_scale, y_45_scale):
                	return 180.0 * (math.atan((angle * ((0.005555555555555556 * (y_45_scale * math.pi)) / x_45_scale))) / math.pi)
                
                a_m = abs(a)
                function code(a_m, b, angle, x_45_scale, y_45_scale)
                	return Float64(180.0 * Float64(atan(Float64(angle * Float64(Float64(0.005555555555555556 * Float64(y_45_scale * pi)) / x_45_scale))) / pi))
                end
                
                a_m = abs(a);
                function tmp = code(a_m, b, angle, x_45_scale, y_45_scale)
                	tmp = 180.0 * (atan((angle * ((0.005555555555555556 * (y_45_scale * pi)) / x_45_scale))) / pi);
                end
                
                a_m = N[Abs[a], $MachinePrecision]
                code[a$95$m_, b_, angle_, x$45$scale_, y$45$scale_] := N[(180.0 * N[(N[ArcTan[N[(angle * N[(N[(0.005555555555555556 * N[(y$45$scale * Pi), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                a_m = \left|a\right|
                
                \\
                180 \cdot \frac{\tan^{-1} \left(angle \cdot \frac{0.005555555555555556 \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi}
                \end{array}
                
                Derivation
                1. Initial program 13.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. Simplified12.1%

                  \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\left(\frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale} - \frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale}\right) - \mathsf{hypot}\left(\frac{{\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot b\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}}{y-scale \cdot y-scale}, \left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}\right)}{\left(\cos \left(angle \cdot \frac{\pi}{180}\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right) \cdot \frac{\left(b - a\right) \cdot \left(2 \cdot \left(a + b\right)\right)}{y-scale \cdot x-scale}}\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. Simplified28.1%

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

                  \[\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) \]
                7. 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. associate-*r*N/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(\left(\frac{1}{180} \cdot angle\right) \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) \]
                  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(\left(\frac{1}{180} \cdot angle\right), \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) \]
                  6. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \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) \]
                  7. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\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) \]
                  8. *-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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                  9. 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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\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) \]
                  10. associate-*r*N/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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\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{/.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                  13. PI-lowering-PI.f6447.8%

                    \[\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(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(x-scale, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
                8. Simplified47.8%

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\left(\frac{\tan^{-1} \left(\frac{y-scale \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}{x-scale \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)}\right)}{\mathsf{PI}\left(\right)}\right), \color{blue}{180}\right) \]
                10. Applied egg-rr49.5%

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{atan.f64}\left(\left(\frac{angle \cdot \left(y-scale \cdot \mathsf{PI}\left(\right)\right)}{x-scale} \cdot \frac{1}{180}\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(\left(\left(angle \cdot \frac{y-scale \cdot \mathsf{PI}\left(\right)}{x-scale}\right) \cdot \frac{1}{180}\right)\right), \mathsf{PI.f64}\left(\right)\right), 180\right) \]
                  3. associate-*r*N/A

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

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

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

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

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(angle \cdot \frac{0.005555555555555556 \cdot \left(y-scale \cdot \pi\right)}{x-scale}\right)}{\pi} \]
                15. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2024155 
                (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)))