raw-angle from scale-rotated-ellipse

Percentage Accurate: 14.1% → 54.0%
Time: 54.9s
Alternatives: 16
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 16 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: 14.1% accurate, 1.0× speedup?

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

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

Alternative 1: 54.0% accurate, 6.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \sin t\_0\\ t_2 := 0.5 \cdot \left(-2 \cdot \frac{y-scale}{x-scale}\right)\\ \mathbf{if}\;a\_m \leq 3.9 \cdot 10^{-212}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{t\_2}{\cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot t\_1}\right)}{\pi}\\ \mathbf{elif}\;a\_m \leq 2.7 \cdot 10^{+123}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{t\_2}{{\left(0.5 + 0.5 \cdot \cos \left(t\_0 \cdot 2\right)\right)}^{0.5} \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot t\_1}{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 (* 0.005555555555555556 (* angle PI)))
        (t_1 (sin t_0))
        (t_2 (* 0.5 (* -2.0 (/ y-scale x-scale)))))
   (if (<= a_m 3.9e-212)
     (/
      (*
       180.0
       (atan (/ t_2 (* (cos (* (* 0.005555555555555556 angle) PI)) t_1))))
      PI)
     (if (<= a_m 2.7e+123)
       (/
        (*
         180.0
         (atan
          (/
           t_2
           (*
            (pow (+ 0.5 (* 0.5 (cos (* t_0 2.0)))) 0.5)
            (sin (* angle (* 0.005555555555555556 PI)))))))
        PI)
       (/ (* 180.0 (atan (/ (* y-scale t_1) (* 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 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = sin(t_0);
	double t_2 = 0.5 * (-2.0 * (y_45_scale / x_45_scale));
	double tmp;
	if (a_m <= 3.9e-212) {
		tmp = (180.0 * atan((t_2 / (cos(((0.005555555555555556 * angle) * ((double) M_PI))) * t_1)))) / ((double) M_PI);
	} else if (a_m <= 2.7e+123) {
		tmp = (180.0 * atan((t_2 / (pow((0.5 + (0.5 * cos((t_0 * 2.0)))), 0.5) * sin((angle * (0.005555555555555556 * ((double) M_PI)))))))) / ((double) M_PI);
	} else {
		tmp = (180.0 * atan(((y_45_scale * t_1) / (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 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.sin(t_0);
	double t_2 = 0.5 * (-2.0 * (y_45_scale / x_45_scale));
	double tmp;
	if (a_m <= 3.9e-212) {
		tmp = (180.0 * Math.atan((t_2 / (Math.cos(((0.005555555555555556 * angle) * Math.PI)) * t_1)))) / Math.PI;
	} else if (a_m <= 2.7e+123) {
		tmp = (180.0 * Math.atan((t_2 / (Math.pow((0.5 + (0.5 * Math.cos((t_0 * 2.0)))), 0.5) * Math.sin((angle * (0.005555555555555556 * Math.PI))))))) / Math.PI;
	} else {
		tmp = (180.0 * Math.atan(((y_45_scale * t_1) / (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 = 0.005555555555555556 * (angle * math.pi)
	t_1 = math.sin(t_0)
	t_2 = 0.5 * (-2.0 * (y_45_scale / x_45_scale))
	tmp = 0
	if a_m <= 3.9e-212:
		tmp = (180.0 * math.atan((t_2 / (math.cos(((0.005555555555555556 * angle) * math.pi)) * t_1)))) / math.pi
	elif a_m <= 2.7e+123:
		tmp = (180.0 * math.atan((t_2 / (math.pow((0.5 + (0.5 * math.cos((t_0 * 2.0)))), 0.5) * math.sin((angle * (0.005555555555555556 * math.pi))))))) / math.pi
	else:
		tmp = (180.0 * math.atan(((y_45_scale * t_1) / (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(0.005555555555555556 * Float64(angle * pi))
	t_1 = sin(t_0)
	t_2 = Float64(0.5 * Float64(-2.0 * Float64(y_45_scale / x_45_scale)))
	tmp = 0.0
	if (a_m <= 3.9e-212)
		tmp = Float64(Float64(180.0 * atan(Float64(t_2 / Float64(cos(Float64(Float64(0.005555555555555556 * angle) * pi)) * t_1)))) / pi);
	elseif (a_m <= 2.7e+123)
		tmp = Float64(Float64(180.0 * atan(Float64(t_2 / Float64((Float64(0.5 + Float64(0.5 * cos(Float64(t_0 * 2.0)))) ^ 0.5) * sin(Float64(angle * Float64(0.005555555555555556 * pi))))))) / pi);
	else
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * t_1) / 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 = 0.005555555555555556 * (angle * pi);
	t_1 = sin(t_0);
	t_2 = 0.5 * (-2.0 * (y_45_scale / x_45_scale));
	tmp = 0.0;
	if (a_m <= 3.9e-212)
		tmp = (180.0 * atan((t_2 / (cos(((0.005555555555555556 * angle) * pi)) * t_1)))) / pi;
	elseif (a_m <= 2.7e+123)
		tmp = (180.0 * atan((t_2 / (((0.5 + (0.5 * cos((t_0 * 2.0)))) ^ 0.5) * sin((angle * (0.005555555555555556 * pi))))))) / pi;
	else
		tmp = (180.0 * atan(((y_45_scale * t_1) / (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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(0.5 * N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a$95$m, 3.9e-212], N[(N[(180.0 * N[ArcTan[N[(t$95$2 / N[(N[Cos[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[a$95$m, 2.7e+123], N[(N[(180.0 * N[ArcTan[N[(t$95$2 / N[(N[Power[N[(0.5 + N[(0.5 * N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sin[N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
a_m = \left|a\right|

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

\mathbf{elif}\;a\_m \leq 2.7 \cdot 10^{+123}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{t\_2}{{\left(0.5 + 0.5 \cdot \cos \left(t\_0 \cdot 2\right)\right)}^{0.5} \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)}\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos t\_0}\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 3.9e-212

    1. Initial program 21.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. Simplified19.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 b around inf

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

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

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

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot \color{blue}{\left(-2 \cdot \frac{y-scale}{x-scale}\right)}}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\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(\frac{1}{2}, \mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(y-scale, x-scale\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right), \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(\frac{1}{2}, \mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(y-scale, x-scale\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{180} \cdot angle\right), \mathsf{PI}\left(\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right), \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(\frac{1}{2}, \mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(y-scale, x-scale\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, angle\right), \mathsf{PI}\left(\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      4. PI-lowering-PI.f6457.8%

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

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

    if 3.9e-212 < a < 2.70000000000000013e123

    1. Initial program 18.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. Simplified20.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 b around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
    5. Simplified23.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.70000000000000013e123 < a

    1. Initial program 0.3%

      \[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.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 y-scale around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(2 \cdot \frac{{a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    5. Simplified5.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 55.9% accurate, 6.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \sin t\_0\\ \mathbf{if}\;a\_m \leq 1.8 \cdot 10^{-59}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan t\_0}\right)}{\pi}\\ \mathbf{elif}\;a\_m \leq 6.5:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot {\left(0.5 + 0.5 \cdot \cos \left(t\_0 \cdot 2\right)\right)}^{0.5}}{t\_1 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot t\_1}{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 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
   (if (<= a_m 1.8e-59)
     (/ (* 180.0 (atan (* (/ y-scale x-scale) (/ -1.0 (tan t_0))))) PI)
     (if (<= a_m 6.5)
       (/
        (*
         180.0
         (atan
          (/
           (* y-scale (pow (+ 0.5 (* 0.5 (cos (* t_0 2.0)))) 0.5))
           (* t_1 (- 0.0 x-scale)))))
        PI)
       (/ (* 180.0 (atan (/ (* y-scale t_1) (* 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 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = sin(t_0);
	double tmp;
	if (a_m <= 1.8e-59) {
		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan(t_0))))) / ((double) M_PI);
	} else if (a_m <= 6.5) {
		tmp = (180.0 * atan(((y_45_scale * pow((0.5 + (0.5 * cos((t_0 * 2.0)))), 0.5)) / (t_1 * (0.0 - x_45_scale))))) / ((double) M_PI);
	} else {
		tmp = (180.0 * atan(((y_45_scale * t_1) / (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 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.sin(t_0);
	double tmp;
	if (a_m <= 1.8e-59) {
		tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * (-1.0 / Math.tan(t_0))))) / Math.PI;
	} else if (a_m <= 6.5) {
		tmp = (180.0 * Math.atan(((y_45_scale * Math.pow((0.5 + (0.5 * Math.cos((t_0 * 2.0)))), 0.5)) / (t_1 * (0.0 - x_45_scale))))) / Math.PI;
	} else {
		tmp = (180.0 * Math.atan(((y_45_scale * t_1) / (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 = 0.005555555555555556 * (angle * math.pi)
	t_1 = math.sin(t_0)
	tmp = 0
	if a_m <= 1.8e-59:
		tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * (-1.0 / math.tan(t_0))))) / math.pi
	elif a_m <= 6.5:
		tmp = (180.0 * math.atan(((y_45_scale * math.pow((0.5 + (0.5 * math.cos((t_0 * 2.0)))), 0.5)) / (t_1 * (0.0 - x_45_scale))))) / math.pi
	else:
		tmp = (180.0 * math.atan(((y_45_scale * t_1) / (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(0.005555555555555556 * Float64(angle * pi))
	t_1 = sin(t_0)
	tmp = 0.0
	if (a_m <= 1.8e-59)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(-1.0 / tan(t_0))))) / pi);
	elseif (a_m <= 6.5)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * (Float64(0.5 + Float64(0.5 * cos(Float64(t_0 * 2.0)))) ^ 0.5)) / Float64(t_1 * Float64(0.0 - x_45_scale))))) / pi);
	else
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * t_1) / 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 = 0.005555555555555556 * (angle * pi);
	t_1 = sin(t_0);
	tmp = 0.0;
	if (a_m <= 1.8e-59)
		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan(t_0))))) / pi;
	elseif (a_m <= 6.5)
		tmp = (180.0 * atan(((y_45_scale * ((0.5 + (0.5 * cos((t_0 * 2.0)))) ^ 0.5)) / (t_1 * (0.0 - x_45_scale))))) / pi;
	else
		tmp = (180.0 * atan(((y_45_scale * t_1) / (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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[a$95$m, 1.8e-59], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(-1.0 / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[a$95$m, 6.5], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * N[Power[N[(0.5 + N[(0.5 * N[Cos[N[(t$95$0 * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;a\_m \leq 1.8 \cdot 10^{-59}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan t\_0}\right)}{\pi}\\

\mathbf{elif}\;a\_m \leq 6.5:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot {\left(0.5 + 0.5 \cdot \cos \left(t\_0 \cdot 2\right)\right)}^{0.5}}{t\_1 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos t\_0}\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 1.8e-59

    1. Initial program 20.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.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 b around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
    5. Simplified30.9%

      \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
    6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-59 < a < 6.5

    1. Initial program 9.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. Simplified27.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 b around inf

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
    6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5 < a

    1. Initial program 9.2%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(2 \cdot \frac{{a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    5. Simplified17.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 55.9% accurate, 8.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \sin t\_0\\ \mathbf{if}\;a\_m \leq 6.3 \cdot 10^{-47}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan t\_0}\right)}{\pi}\\ \mathbf{elif}\;a\_m \leq 6.5:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{t\_1 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot t\_1}{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 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
   (if (<= a_m 6.3e-47)
     (/ (* 180.0 (atan (* (/ y-scale x-scale) (/ -1.0 (tan t_0))))) PI)
     (if (<= a_m 6.5)
       (/ (* 180.0 (atan (/ y-scale (* t_1 (- 0.0 x-scale))))) PI)
       (/ (* 180.0 (atan (/ (* y-scale t_1) (* 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 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = sin(t_0);
	double tmp;
	if (a_m <= 6.3e-47) {
		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan(t_0))))) / ((double) M_PI);
	} else if (a_m <= 6.5) {
		tmp = (180.0 * atan((y_45_scale / (t_1 * (0.0 - x_45_scale))))) / ((double) M_PI);
	} else {
		tmp = (180.0 * atan(((y_45_scale * t_1) / (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 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.sin(t_0);
	double tmp;
	if (a_m <= 6.3e-47) {
		tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * (-1.0 / Math.tan(t_0))))) / Math.PI;
	} else if (a_m <= 6.5) {
		tmp = (180.0 * Math.atan((y_45_scale / (t_1 * (0.0 - x_45_scale))))) / Math.PI;
	} else {
		tmp = (180.0 * Math.atan(((y_45_scale * t_1) / (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 = 0.005555555555555556 * (angle * math.pi)
	t_1 = math.sin(t_0)
	tmp = 0
	if a_m <= 6.3e-47:
		tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * (-1.0 / math.tan(t_0))))) / math.pi
	elif a_m <= 6.5:
		tmp = (180.0 * math.atan((y_45_scale / (t_1 * (0.0 - x_45_scale))))) / math.pi
	else:
		tmp = (180.0 * math.atan(((y_45_scale * t_1) / (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(0.005555555555555556 * Float64(angle * pi))
	t_1 = sin(t_0)
	tmp = 0.0
	if (a_m <= 6.3e-47)
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(-1.0 / tan(t_0))))) / pi);
	elseif (a_m <= 6.5)
		tmp = Float64(Float64(180.0 * atan(Float64(y_45_scale / Float64(t_1 * Float64(0.0 - x_45_scale))))) / pi);
	else
		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale * t_1) / 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 = 0.005555555555555556 * (angle * pi);
	t_1 = sin(t_0);
	tmp = 0.0;
	if (a_m <= 6.3e-47)
		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan(t_0))))) / pi;
	elseif (a_m <= 6.5)
		tmp = (180.0 * atan((y_45_scale / (t_1 * (0.0 - x_45_scale))))) / pi;
	else
		tmp = (180.0 * atan(((y_45_scale * t_1) / (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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[a$95$m, 6.3e-47], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(-1.0 / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[a$95$m, 6.5], N[(N[(180.0 * N[ArcTan[N[(y$45$scale / N[(t$95$1 * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
\mathbf{if}\;a\_m \leq 6.3 \cdot 10^{-47}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan t\_0}\right)}{\pi}\\

\mathbf{elif}\;a\_m \leq 6.5:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{t\_1 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos t\_0}\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 6.3000000000000002e-47

    1. Initial program 20.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. Simplified18.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 b around inf

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

      \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
    6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.3000000000000002e-47 < a < 6.5

    1. Initial program 10.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. Simplified30.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 b around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
    5. Simplified31.3%

      \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
    6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \color{blue}{1}\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
    10. Step-by-step derivation
      1. Simplified81.8%

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

      if 6.5 < a

      1. Initial program 9.2%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(2 \cdot \frac{{a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\right)\right)}{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)}\right)}\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      5. Simplified17.8%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 55.9% accurate, 8.9× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \sin t\_0\\ \mathbf{if}\;a\_m \leq 7.5 \cdot 10^{-52}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan t\_0}\right)}{\pi}\\ \mathbf{elif}\;a\_m \leq 6.5:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{t\_1 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{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 (* 0.005555555555555556 (* angle PI))) (t_1 (sin t_0)))
       (if (<= a_m 7.5e-52)
         (/ (* 180.0 (atan (* (/ y-scale x-scale) (/ -1.0 (tan t_0))))) PI)
         (if (<= a_m 6.5)
           (/ (* 180.0 (atan (/ y-scale (* t_1 (- 0.0 x-scale))))) PI)
           (* 180.0 (/ (atan (/ (* y-scale t_1) (* 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 = 0.005555555555555556 * (angle * ((double) M_PI));
    	double t_1 = sin(t_0);
    	double tmp;
    	if (a_m <= 7.5e-52) {
    		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan(t_0))))) / ((double) M_PI);
    	} else if (a_m <= 6.5) {
    		tmp = (180.0 * atan((y_45_scale / (t_1 * (0.0 - x_45_scale))))) / ((double) M_PI);
    	} else {
    		tmp = 180.0 * (atan(((y_45_scale * t_1) / (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 = 0.005555555555555556 * (angle * Math.PI);
    	double t_1 = Math.sin(t_0);
    	double tmp;
    	if (a_m <= 7.5e-52) {
    		tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * (-1.0 / Math.tan(t_0))))) / Math.PI;
    	} else if (a_m <= 6.5) {
    		tmp = (180.0 * Math.atan((y_45_scale / (t_1 * (0.0 - x_45_scale))))) / Math.PI;
    	} else {
    		tmp = 180.0 * (Math.atan(((y_45_scale * t_1) / (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 = 0.005555555555555556 * (angle * math.pi)
    	t_1 = math.sin(t_0)
    	tmp = 0
    	if a_m <= 7.5e-52:
    		tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * (-1.0 / math.tan(t_0))))) / math.pi
    	elif a_m <= 6.5:
    		tmp = (180.0 * math.atan((y_45_scale / (t_1 * (0.0 - x_45_scale))))) / math.pi
    	else:
    		tmp = 180.0 * (math.atan(((y_45_scale * t_1) / (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(0.005555555555555556 * Float64(angle * pi))
    	t_1 = sin(t_0)
    	tmp = 0.0
    	if (a_m <= 7.5e-52)
    		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(-1.0 / tan(t_0))))) / pi);
    	elseif (a_m <= 6.5)
    		tmp = Float64(Float64(180.0 * atan(Float64(y_45_scale / Float64(t_1 * Float64(0.0 - x_45_scale))))) / pi);
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * t_1) / 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 = 0.005555555555555556 * (angle * pi);
    	t_1 = sin(t_0);
    	tmp = 0.0;
    	if (a_m <= 7.5e-52)
    		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan(t_0))))) / pi;
    	elseif (a_m <= 6.5)
    		tmp = (180.0 * atan((y_45_scale / (t_1 * (0.0 - x_45_scale))))) / pi;
    	else
    		tmp = 180.0 * (atan(((y_45_scale * t_1) / (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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[a$95$m, 7.5e-52], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(-1.0 / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[a$95$m, 6.5], N[(N[(180.0 * N[ArcTan[N[(y$45$scale / N[(t$95$1 * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * t$95$1), $MachinePrecision] / N[(x$45$scale * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
    t_1 := \sin t\_0\\
    \mathbf{if}\;a\_m \leq 7.5 \cdot 10^{-52}:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan t\_0}\right)}{\pi}\\
    
    \mathbf{elif}\;a\_m \leq 6.5:\\
    \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{t\_1 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot t\_1}{x-scale \cdot \cos t\_0}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if a < 7.50000000000000006e-52

      1. Initial program 20.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. Simplified18.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 b around inf

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

        \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
      6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 7.50000000000000006e-52 < a < 6.5

      1. Initial program 10.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. Simplified30.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 b around inf

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
      5. Simplified31.3%

        \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
      6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \color{blue}{1}\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
      10. Step-by-step derivation
        1. Simplified81.8%

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

        if 6.5 < a

        1. Initial program 9.2%

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\left(\frac{-0.5 \cdot \left(y-scale \cdot \left(2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left(b \cdot b\right) + {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left(a \cdot a\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 b around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 45.1% accurate, 13.1× speedup?

      \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{\sin t\_0 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \mathbf{if}\;y-scale \leq -6 \cdot 10^{-8}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y-scale \leq 8.2 \cdot 10^{+198}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan t\_0}\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 (* 0.005555555555555556 (* angle PI)))
              (t_1
               (/ (* 180.0 (atan (/ y-scale (* (sin t_0) (- 0.0 x-scale))))) PI)))
         (if (<= y-scale -6e-8)
           t_1
           (if (<= y-scale 8.2e+198)
             (/ (* 180.0 (atan (* (/ y-scale x-scale) (/ -1.0 (tan t_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 = 0.005555555555555556 * (angle * ((double) M_PI));
      	double t_1 = (180.0 * atan((y_45_scale / (sin(t_0) * (0.0 - x_45_scale))))) / ((double) M_PI);
      	double tmp;
      	if (y_45_scale <= -6e-8) {
      		tmp = t_1;
      	} else if (y_45_scale <= 8.2e+198) {
      		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan(t_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 = 0.005555555555555556 * (angle * Math.PI);
      	double t_1 = (180.0 * Math.atan((y_45_scale / (Math.sin(t_0) * (0.0 - x_45_scale))))) / Math.PI;
      	double tmp;
      	if (y_45_scale <= -6e-8) {
      		tmp = t_1;
      	} else if (y_45_scale <= 8.2e+198) {
      		tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * (-1.0 / Math.tan(t_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 = 0.005555555555555556 * (angle * math.pi)
      	t_1 = (180.0 * math.atan((y_45_scale / (math.sin(t_0) * (0.0 - x_45_scale))))) / math.pi
      	tmp = 0
      	if y_45_scale <= -6e-8:
      		tmp = t_1
      	elif y_45_scale <= 8.2e+198:
      		tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * (-1.0 / math.tan(t_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(0.005555555555555556 * Float64(angle * pi))
      	t_1 = Float64(Float64(180.0 * atan(Float64(y_45_scale / Float64(sin(t_0) * Float64(0.0 - x_45_scale))))) / pi)
      	tmp = 0.0
      	if (y_45_scale <= -6e-8)
      		tmp = t_1;
      	elseif (y_45_scale <= 8.2e+198)
      		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(-1.0 / tan(t_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 = 0.005555555555555556 * (angle * pi);
      	t_1 = (180.0 * atan((y_45_scale / (sin(t_0) * (0.0 - x_45_scale))))) / pi;
      	tmp = 0.0;
      	if (y_45_scale <= -6e-8)
      		tmp = t_1;
      	elseif (y_45_scale <= 8.2e+198)
      		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan(t_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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(y$45$scale / N[(N[Sin[t$95$0], $MachinePrecision] * N[(0.0 - x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[y$45$scale, -6e-8], t$95$1, If[LessEqual[y$45$scale, 8.2e+198], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(-1.0 / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      a_m = \left|a\right|
      
      \\
      \begin{array}{l}
      t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
      t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{\sin t\_0 \cdot \left(0 - x-scale\right)}\right)}{\pi}\\
      \mathbf{if}\;y-scale \leq -6 \cdot 10^{-8}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y-scale \leq 8.2 \cdot 10^{+198}:\\
      \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan t\_0}\right)}{\pi}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y-scale < -5.99999999999999946e-8 or 8.2000000000000003e198 < y-scale

        1. Initial program 26.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. Simplified27.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 b around inf

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

          \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
        6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, \color{blue}{1}\right), \mathsf{*.f64}\left(x-scale, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        10. Step-by-step derivation
          1. Simplified64.0%

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

          if -5.99999999999999946e-8 < y-scale < 8.2000000000000003e198

          1. Initial program 10.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. Simplified9.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 b around inf

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
          6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -6 \cdot 10^{-8}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \mathbf{elif}\;y-scale \leq 8.2 \cdot 10^{+198}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(0 - x-scale\right)}\right)}{\pi}\\ \end{array} \]
        13. Add Preprocessing

        Alternative 6: 45.3% accurate, 13.2× speedup?

        \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;a\_m \leq 2.2 \cdot 10^{-52}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan t\_0}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot \left(-2 \cdot \frac{y-scale}{x-scale}\right)}{\sin 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 (* 0.005555555555555556 (* angle PI))))
           (if (<= a_m 2.2e-52)
             (/ (* 180.0 (atan (* (/ y-scale x-scale) (/ -1.0 (tan t_0))))) PI)
             (/
              (* 180.0 (atan (/ (* 0.5 (* -2.0 (/ y-scale x-scale))) (sin 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 = 0.005555555555555556 * (angle * ((double) M_PI));
        	double tmp;
        	if (a_m <= 2.2e-52) {
        		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan(t_0))))) / ((double) M_PI);
        	} else {
        		tmp = (180.0 * atan(((0.5 * (-2.0 * (y_45_scale / x_45_scale))) / sin(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 = 0.005555555555555556 * (angle * Math.PI);
        	double tmp;
        	if (a_m <= 2.2e-52) {
        		tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * (-1.0 / Math.tan(t_0))))) / Math.PI;
        	} else {
        		tmp = (180.0 * Math.atan(((0.5 * (-2.0 * (y_45_scale / x_45_scale))) / Math.sin(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 = 0.005555555555555556 * (angle * math.pi)
        	tmp = 0
        	if a_m <= 2.2e-52:
        		tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * (-1.0 / math.tan(t_0))))) / math.pi
        	else:
        		tmp = (180.0 * math.atan(((0.5 * (-2.0 * (y_45_scale / x_45_scale))) / math.sin(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(0.005555555555555556 * Float64(angle * pi))
        	tmp = 0.0
        	if (a_m <= 2.2e-52)
        		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(-1.0 / tan(t_0))))) / pi);
        	else
        		tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.5 * Float64(-2.0 * Float64(y_45_scale / x_45_scale))) / sin(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 = 0.005555555555555556 * (angle * pi);
        	tmp = 0.0;
        	if (a_m <= 2.2e-52)
        		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan(t_0))))) / pi;
        	else
        		tmp = (180.0 * atan(((0.5 * (-2.0 * (y_45_scale / x_45_scale))) / sin(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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a$95$m, 2.2e-52], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(-1.0 / N[Tan[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.5 * N[(-2.0 * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
        
        \begin{array}{l}
        a_m = \left|a\right|
        
        \\
        \begin{array}{l}
        t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
        \mathbf{if}\;a\_m \leq 2.2 \cdot 10^{-52}:\\
        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan t\_0}\right)}{\pi}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot \left(-2 \cdot \frac{y-scale}{x-scale}\right)}{\sin t\_0}\right)}{\pi}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if a < 2.20000000000000009e-52

          1. Initial program 20.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.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 b around inf

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
          5. Simplified30.9%

            \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
          6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 2.20000000000000009e-52 < a

          1. Initial program 9.3%

            \[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. Simplified10.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 b around inf

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
          5. Simplified19.6%

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

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot \color{blue}{\left(-2 \cdot \frac{y-scale}{x-scale}\right)}}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\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(\frac{1}{2}, \mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(y-scale, x-scale\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
          10. Step-by-step derivation
            1. Simplified45.9%

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

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

          Alternative 7: 44.0% accurate, 13.4× speedup?

          \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq -1.62 \cdot 10^{+208}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle} \cdot \frac{-1}{x-scale}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\ \end{array} \end{array} \]
          a_m = (fabs.f64 a)
          (FPCore (a_m b angle x-scale y-scale)
           :precision binary64
           (if (<= angle -1.62e+208)
             (/
              (*
               180.0
               (atan
                (*
                 y-scale
                 (*
                  (/
                   (+
                    (*
                     (* -32400.0 (* angle angle))
                     (/ (* PI (* (* PI PI) 5.7155921353452215e-8)) (* PI PI)))
                    (/ 180.0 PI))
                   angle)
                  (/ -1.0 x-scale)))))
              PI)
             (/
              (*
               180.0
               (atan
                (*
                 (/ y-scale x-scale)
                 (/ -1.0 (tan (* 0.005555555555555556 (* angle 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 (angle <= -1.62e+208) {
          		tmp = (180.0 * atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((((double) M_PI) * ((((double) M_PI) * ((double) M_PI)) * 5.7155921353452215e-8)) / (((double) M_PI) * ((double) M_PI)))) + (180.0 / ((double) M_PI))) / angle) * (-1.0 / x_45_scale))))) / ((double) M_PI);
          	} else {
          		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan((0.005555555555555556 * (angle * ((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 (angle <= -1.62e+208) {
          		tmp = (180.0 * Math.atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((Math.PI * ((Math.PI * Math.PI) * 5.7155921353452215e-8)) / (Math.PI * Math.PI))) + (180.0 / Math.PI)) / angle) * (-1.0 / x_45_scale))))) / Math.PI;
          	} else {
          		tmp = (180.0 * Math.atan(((y_45_scale / x_45_scale) * (-1.0 / Math.tan((0.005555555555555556 * (angle * 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 angle <= -1.62e+208:
          		tmp = (180.0 * math.atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((math.pi * ((math.pi * math.pi) * 5.7155921353452215e-8)) / (math.pi * math.pi))) + (180.0 / math.pi)) / angle) * (-1.0 / x_45_scale))))) / math.pi
          	else:
          		tmp = (180.0 * math.atan(((y_45_scale / x_45_scale) * (-1.0 / math.tan((0.005555555555555556 * (angle * 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 (angle <= -1.62e+208)
          		tmp = Float64(Float64(180.0 * atan(Float64(y_45_scale * Float64(Float64(Float64(Float64(Float64(-32400.0 * Float64(angle * angle)) * Float64(Float64(pi * Float64(Float64(pi * pi) * 5.7155921353452215e-8)) / Float64(pi * pi))) + Float64(180.0 / pi)) / angle) * Float64(-1.0 / x_45_scale))))) / pi);
          	else
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(y_45_scale / x_45_scale) * Float64(-1.0 / tan(Float64(0.005555555555555556 * Float64(angle * 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 (angle <= -1.62e+208)
          		tmp = (180.0 * atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((pi * ((pi * pi) * 5.7155921353452215e-8)) / (pi * pi))) + (180.0 / pi)) / angle) * (-1.0 / x_45_scale))))) / pi;
          	else
          		tmp = (180.0 * atan(((y_45_scale / x_45_scale) * (-1.0 / tan((0.005555555555555556 * (angle * 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[angle, -1.62e+208], N[(N[(180.0 * N[ArcTan[N[(y$45$scale * N[(N[(N[(N[(N[(-32400.0 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * N[(N[(Pi * Pi), $MachinePrecision] * 5.7155921353452215e-8), $MachinePrecision]), $MachinePrecision] / N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision] * N[(-1.0 / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(-1.0 / N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
          
          \begin{array}{l}
          a_m = \left|a\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;angle \leq -1.62 \cdot 10^{+208}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle} \cdot \frac{-1}{x-scale}\right)\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \frac{-1}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if angle < -1.62e208

            1. Initial program 9.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. Simplified22.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 b around inf

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

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.62e208 < angle

            1. Initial program 18.0%

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

              \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\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 b around inf

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
            5. Simplified28.9%

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 44.0% accurate, 13.4× speedup?

          \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq -1.62 \cdot 10^{+208}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle} \cdot \frac{-1}{x-scale}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0 - \frac{y-scale}{x-scale}}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\\ \end{array} \end{array} \]
          a_m = (fabs.f64 a)
          (FPCore (a_m b angle x-scale y-scale)
           :precision binary64
           (if (<= angle -1.62e+208)
             (/
              (*
               180.0
               (atan
                (*
                 y-scale
                 (*
                  (/
                   (+
                    (*
                     (* -32400.0 (* angle angle))
                     (/ (* PI (* (* PI PI) 5.7155921353452215e-8)) (* PI PI)))
                    (/ 180.0 PI))
                   angle)
                  (/ -1.0 x-scale)))))
              PI)
             (*
              (/ 180.0 PI)
              (atan
               (/
                (- 0.0 (/ y-scale x-scale))
                (tan (* 0.005555555555555556 (* angle 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 (angle <= -1.62e+208) {
          		tmp = (180.0 * atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((((double) M_PI) * ((((double) M_PI) * ((double) M_PI)) * 5.7155921353452215e-8)) / (((double) M_PI) * ((double) M_PI)))) + (180.0 / ((double) M_PI))) / angle) * (-1.0 / x_45_scale))))) / ((double) M_PI);
          	} else {
          		tmp = (180.0 / ((double) M_PI)) * atan(((0.0 - (y_45_scale / x_45_scale)) / tan((0.005555555555555556 * (angle * ((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 (angle <= -1.62e+208) {
          		tmp = (180.0 * Math.atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((Math.PI * ((Math.PI * Math.PI) * 5.7155921353452215e-8)) / (Math.PI * Math.PI))) + (180.0 / Math.PI)) / angle) * (-1.0 / x_45_scale))))) / Math.PI;
          	} else {
          		tmp = (180.0 / Math.PI) * Math.atan(((0.0 - (y_45_scale / x_45_scale)) / Math.tan((0.005555555555555556 * (angle * Math.PI)))));
          	}
          	return tmp;
          }
          
          a_m = math.fabs(a)
          def code(a_m, b, angle, x_45_scale, y_45_scale):
          	tmp = 0
          	if angle <= -1.62e+208:
          		tmp = (180.0 * math.atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((math.pi * ((math.pi * math.pi) * 5.7155921353452215e-8)) / (math.pi * math.pi))) + (180.0 / math.pi)) / angle) * (-1.0 / x_45_scale))))) / math.pi
          	else:
          		tmp = (180.0 / math.pi) * math.atan(((0.0 - (y_45_scale / x_45_scale)) / math.tan((0.005555555555555556 * (angle * math.pi)))))
          	return tmp
          
          a_m = abs(a)
          function code(a_m, b, angle, x_45_scale, y_45_scale)
          	tmp = 0.0
          	if (angle <= -1.62e+208)
          		tmp = Float64(Float64(180.0 * atan(Float64(y_45_scale * Float64(Float64(Float64(Float64(Float64(-32400.0 * Float64(angle * angle)) * Float64(Float64(pi * Float64(Float64(pi * pi) * 5.7155921353452215e-8)) / Float64(pi * pi))) + Float64(180.0 / pi)) / angle) * Float64(-1.0 / x_45_scale))))) / pi);
          	else
          		tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(0.0 - Float64(y_45_scale / x_45_scale)) / tan(Float64(0.005555555555555556 * Float64(angle * 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 (angle <= -1.62e+208)
          		tmp = (180.0 * atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((pi * ((pi * pi) * 5.7155921353452215e-8)) / (pi * pi))) + (180.0 / pi)) / angle) * (-1.0 / x_45_scale))))) / pi;
          	else
          		tmp = (180.0 / pi) * atan(((0.0 - (y_45_scale / x_45_scale)) / tan((0.005555555555555556 * (angle * 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[angle, -1.62e+208], N[(N[(180.0 * N[ArcTan[N[(y$45$scale * N[(N[(N[(N[(N[(-32400.0 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * N[(N[(Pi * Pi), $MachinePrecision] * 5.7155921353452215e-8), $MachinePrecision]), $MachinePrecision] / N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision] * N[(-1.0 / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(0.0 - N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[Tan[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          a_m = \left|a\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;angle \leq -1.62 \cdot 10^{+208}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle} \cdot \frac{-1}{x-scale}\right)\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0 - \frac{y-scale}{x-scale}}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if angle < -1.62e208

            1. Initial program 9.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. Simplified22.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 b around inf

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

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.62e208 < angle

            1. Initial program 18.0%

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

              \[\leadsto \color{blue}{\frac{180 \cdot \tan^{-1} \left(\frac{\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 b around inf

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
            5. Simplified28.9%

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq -1.62 \cdot 10^{+208}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle} \cdot \frac{-1}{x-scale}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0 - \frac{y-scale}{x-scale}}{\tan \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\\ \end{array} \]
          5. Add Preprocessing

          Alternative 9: 39.1% accurate, 19.9× speedup?

          \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle} \cdot \frac{-1}{x-scale}\right)\right)}{\pi}\\ \mathbf{if}\;y-scale \leq -7.2 \cdot 10^{+141}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-180 \cdot \frac{y-scale}{x-scale \cdot \pi} - \left(angle \cdot angle\right) \cdot \frac{\left(y-scale \cdot \pi\right) \cdot 0.003703703703703704}{x-scale}}{angle}\right)}{\pi}\\ \mathbf{elif}\;y-scale \leq -7.2 \cdot 10^{-146}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y-scale \leq 2.8 \cdot 10^{-306}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180}{angle} \cdot \left(\frac{b}{x-scale} \cdot \frac{y-scale \cdot b}{\left(\pi \cdot \left(a\_m + b\right)\right) \cdot \left(b - a\_m\right)}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          a_m = (fabs.f64 a)
          (FPCore (a_m b angle x-scale y-scale)
           :precision binary64
           (let* ((t_0
                   (/
                    (*
                     180.0
                     (atan
                      (*
                       y-scale
                       (*
                        (/
                         (+
                          (*
                           (* -32400.0 (* angle angle))
                           (/ (* PI (* (* PI PI) 5.7155921353452215e-8)) (* PI PI)))
                          (/ 180.0 PI))
                         angle)
                        (/ -1.0 x-scale)))))
                    PI)))
             (if (<= y-scale -7.2e+141)
               (/
                (*
                 180.0
                 (atan
                  (/
                   (-
                    (* -180.0 (/ y-scale (* x-scale PI)))
                    (*
                     (* angle angle)
                     (/ (* (* y-scale PI) 0.003703703703703704) x-scale)))
                   angle)))
                PI)
               (if (<= y-scale -7.2e-146)
                 t_0
                 (if (<= y-scale 2.8e-306)
                   (*
                    180.0
                    (/
                     (atan
                      (*
                       (/ -180.0 angle)
                       (*
                        (/ b x-scale)
                        (/ (* y-scale b) (* (* PI (+ a_m b)) (- b a_m))))))
                     PI))
                   t_0)))))
          a_m = fabs(a);
          double code(double a_m, double b, double angle, double x_45_scale, double y_45_scale) {
          	double t_0 = (180.0 * atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((((double) M_PI) * ((((double) M_PI) * ((double) M_PI)) * 5.7155921353452215e-8)) / (((double) M_PI) * ((double) M_PI)))) + (180.0 / ((double) M_PI))) / angle) * (-1.0 / x_45_scale))))) / ((double) M_PI);
          	double tmp;
          	if (y_45_scale <= -7.2e+141) {
          		tmp = (180.0 * atan((((-180.0 * (y_45_scale / (x_45_scale * ((double) M_PI)))) - ((angle * angle) * (((y_45_scale * ((double) M_PI)) * 0.003703703703703704) / x_45_scale))) / angle))) / ((double) M_PI);
          	} else if (y_45_scale <= -7.2e-146) {
          		tmp = t_0;
          	} else if (y_45_scale <= 2.8e-306) {
          		tmp = 180.0 * (atan(((-180.0 / angle) * ((b / x_45_scale) * ((y_45_scale * b) / ((((double) M_PI) * (a_m + b)) * (b - a_m)))))) / ((double) M_PI));
          	} else {
          		tmp = t_0;
          	}
          	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 = (180.0 * Math.atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((Math.PI * ((Math.PI * Math.PI) * 5.7155921353452215e-8)) / (Math.PI * Math.PI))) + (180.0 / Math.PI)) / angle) * (-1.0 / x_45_scale))))) / Math.PI;
          	double tmp;
          	if (y_45_scale <= -7.2e+141) {
          		tmp = (180.0 * Math.atan((((-180.0 * (y_45_scale / (x_45_scale * Math.PI))) - ((angle * angle) * (((y_45_scale * Math.PI) * 0.003703703703703704) / x_45_scale))) / angle))) / Math.PI;
          	} else if (y_45_scale <= -7.2e-146) {
          		tmp = t_0;
          	} else if (y_45_scale <= 2.8e-306) {
          		tmp = 180.0 * (Math.atan(((-180.0 / angle) * ((b / x_45_scale) * ((y_45_scale * b) / ((Math.PI * (a_m + b)) * (b - a_m)))))) / Math.PI);
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          a_m = math.fabs(a)
          def code(a_m, b, angle, x_45_scale, y_45_scale):
          	t_0 = (180.0 * math.atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((math.pi * ((math.pi * math.pi) * 5.7155921353452215e-8)) / (math.pi * math.pi))) + (180.0 / math.pi)) / angle) * (-1.0 / x_45_scale))))) / math.pi
          	tmp = 0
          	if y_45_scale <= -7.2e+141:
          		tmp = (180.0 * math.atan((((-180.0 * (y_45_scale / (x_45_scale * math.pi))) - ((angle * angle) * (((y_45_scale * math.pi) * 0.003703703703703704) / x_45_scale))) / angle))) / math.pi
          	elif y_45_scale <= -7.2e-146:
          		tmp = t_0
          	elif y_45_scale <= 2.8e-306:
          		tmp = 180.0 * (math.atan(((-180.0 / angle) * ((b / x_45_scale) * ((y_45_scale * b) / ((math.pi * (a_m + b)) * (b - a_m)))))) / math.pi)
          	else:
          		tmp = t_0
          	return tmp
          
          a_m = abs(a)
          function code(a_m, b, angle, x_45_scale, y_45_scale)
          	t_0 = Float64(Float64(180.0 * atan(Float64(y_45_scale * Float64(Float64(Float64(Float64(Float64(-32400.0 * Float64(angle * angle)) * Float64(Float64(pi * Float64(Float64(pi * pi) * 5.7155921353452215e-8)) / Float64(pi * pi))) + Float64(180.0 / pi)) / angle) * Float64(-1.0 / x_45_scale))))) / pi)
          	tmp = 0.0
          	if (y_45_scale <= -7.2e+141)
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-180.0 * Float64(y_45_scale / Float64(x_45_scale * pi))) - Float64(Float64(angle * angle) * Float64(Float64(Float64(y_45_scale * pi) * 0.003703703703703704) / x_45_scale))) / angle))) / pi);
          	elseif (y_45_scale <= -7.2e-146)
          		tmp = t_0;
          	elseif (y_45_scale <= 2.8e-306)
          		tmp = Float64(180.0 * Float64(atan(Float64(Float64(-180.0 / angle) * Float64(Float64(b / x_45_scale) * Float64(Float64(y_45_scale * b) / Float64(Float64(pi * Float64(a_m + b)) * Float64(b - a_m)))))) / pi));
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          a_m = abs(a);
          function tmp_2 = code(a_m, b, angle, x_45_scale, y_45_scale)
          	t_0 = (180.0 * atan((y_45_scale * (((((-32400.0 * (angle * angle)) * ((pi * ((pi * pi) * 5.7155921353452215e-8)) / (pi * pi))) + (180.0 / pi)) / angle) * (-1.0 / x_45_scale))))) / pi;
          	tmp = 0.0;
          	if (y_45_scale <= -7.2e+141)
          		tmp = (180.0 * atan((((-180.0 * (y_45_scale / (x_45_scale * pi))) - ((angle * angle) * (((y_45_scale * pi) * 0.003703703703703704) / x_45_scale))) / angle))) / pi;
          	elseif (y_45_scale <= -7.2e-146)
          		tmp = t_0;
          	elseif (y_45_scale <= 2.8e-306)
          		tmp = 180.0 * (atan(((-180.0 / angle) * ((b / x_45_scale) * ((y_45_scale * b) / ((pi * (a_m + b)) * (b - a_m)))))) / pi);
          	else
          		tmp = t_0;
          	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[(180.0 * N[ArcTan[N[(y$45$scale * N[(N[(N[(N[(N[(-32400.0 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * N[(N[(Pi * Pi), $MachinePrecision] * 5.7155921353452215e-8), $MachinePrecision]), $MachinePrecision] / N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision] * N[(-1.0 / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[y$45$scale, -7.2e+141], N[(N[(180.0 * N[ArcTan[N[(N[(N[(-180.0 * N[(y$45$scale / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] * 0.003703703703703704), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[y$45$scale, -7.2e-146], t$95$0, If[LessEqual[y$45$scale, 2.8e-306], N[(180.0 * N[(N[ArcTan[N[(N[(-180.0 / angle), $MachinePrecision] * N[(N[(b / x$45$scale), $MachinePrecision] * N[(N[(y$45$scale * b), $MachinePrecision] / N[(N[(Pi * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
          
          \begin{array}{l}
          a_m = \left|a\right|
          
          \\
          \begin{array}{l}
          t_0 := \frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle} \cdot \frac{-1}{x-scale}\right)\right)}{\pi}\\
          \mathbf{if}\;y-scale \leq -7.2 \cdot 10^{+141}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-180 \cdot \frac{y-scale}{x-scale \cdot \pi} - \left(angle \cdot angle\right) \cdot \frac{\left(y-scale \cdot \pi\right) \cdot 0.003703703703703704}{x-scale}}{angle}\right)}{\pi}\\
          
          \mathbf{elif}\;y-scale \leq -7.2 \cdot 10^{-146}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;y-scale \leq 2.8 \cdot 10^{-306}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180}{angle} \cdot \left(\frac{b}{x-scale} \cdot \frac{y-scale \cdot b}{\left(\pi \cdot \left(a\_m + b\right)\right) \cdot \left(b - a\_m\right)}\right)\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y-scale < -7.2000000000000003e141

            1. Initial program 20.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. Simplified20.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 b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -7.2000000000000003e141 < y-scale < -7.19999999999999957e-146 or 2.8000000000000001e-306 < y-scale

            1. Initial program 19.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. Simplified18.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 b around inf

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
            5. Simplified30.8%

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -7.19999999999999957e-146 < y-scale < 2.8000000000000001e-306

            1. Initial program 0.2%

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

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

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

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(x-scale \cdot \left(y-scale \cdot \left(2 \cdot \frac{{a}^{2}}{{y-scale}^{2}} - 2 \cdot \frac{{b}^{2}}{{x-scale}^{2}}\right)\right)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            5. Simplified0.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, angle\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(b, x-scale\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, b\right), \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              12. difference-of-squaresN/A

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, angle\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(b, x-scale\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{+.f64}\left(b, a\right)\right), \left(b - a\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
              18. --lowering--.f6440.0%

                \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(-180, angle\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(b, x-scale\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
            10. Applied egg-rr40.0%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -7.2 \cdot 10^{+141}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-180 \cdot \frac{y-scale}{x-scale \cdot \pi} - \left(angle \cdot angle\right) \cdot \frac{\left(y-scale \cdot \pi\right) \cdot 0.003703703703703704}{x-scale}}{angle}\right)}{\pi}\\ \mathbf{elif}\;y-scale \leq -7.2 \cdot 10^{-146}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle} \cdot \frac{-1}{x-scale}\right)\right)}{\pi}\\ \mathbf{elif}\;y-scale \leq 2.8 \cdot 10^{-306}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-180}{angle} \cdot \left(\frac{b}{x-scale} \cdot \frac{y-scale \cdot b}{\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\right)}\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(y-scale \cdot \left(\frac{\left(-32400 \cdot \left(angle \cdot angle\right)\right) \cdot \frac{\pi \cdot \left(\left(\pi \cdot \pi\right) \cdot 5.7155921353452215 \cdot 10^{-8}\right)}{\pi \cdot \pi} + \frac{180}{\pi}}{angle} \cdot \frac{-1}{x-scale}\right)\right)}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 10: 38.9% accurate, 21.5× speedup?

          \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \frac{y-scale}{x-scale \cdot \pi}\\ \mathbf{if}\;y-scale \leq -4.5 \cdot 10^{+130}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{180}{angle}}{x-scale \cdot \pi} \cdot \left(0 - y-scale\right)\right)}{\pi}\\ \mathbf{elif}\;y-scale \leq 5.8 \cdot 10^{+80}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(angle \cdot angle\right) \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot \left(0 - -0.001851851851851852\right)\right) - 180 \cdot t\_0}{angle}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-180 \cdot t\_0 - \left(angle \cdot angle\right) \cdot \frac{\left(y-scale \cdot \pi\right) \cdot 0.003703703703703704}{x-scale}}{angle}\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 (/ y-scale (* x-scale PI))))
             (if (<= y-scale -4.5e+130)
               (/
                (* 180.0 (atan (* (/ (/ 180.0 angle) (* x-scale PI)) (- 0.0 y-scale))))
                PI)
               (if (<= y-scale 5.8e+80)
                 (/
                  (*
                   180.0
                   (atan
                    (/
                     (-
                      (*
                       (* angle angle)
                       (* (/ (* y-scale PI) x-scale) (- 0.0 -0.001851851851851852)))
                      (* 180.0 t_0))
                     angle)))
                  PI)
                 (/
                  (*
                   180.0
                   (atan
                    (/
                     (-
                      (* -180.0 t_0)
                      (*
                       (* angle angle)
                       (/ (* (* y-scale PI) 0.003703703703703704) x-scale)))
                     angle)))
                  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 = y_45_scale / (x_45_scale * ((double) M_PI));
          	double tmp;
          	if (y_45_scale <= -4.5e+130) {
          		tmp = (180.0 * atan((((180.0 / angle) / (x_45_scale * ((double) M_PI))) * (0.0 - y_45_scale)))) / ((double) M_PI);
          	} else if (y_45_scale <= 5.8e+80) {
          		tmp = (180.0 * atan(((((angle * angle) * (((y_45_scale * ((double) M_PI)) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * t_0)) / angle))) / ((double) M_PI);
          	} else {
          		tmp = (180.0 * atan((((-180.0 * t_0) - ((angle * angle) * (((y_45_scale * ((double) M_PI)) * 0.003703703703703704) / x_45_scale))) / angle))) / ((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 = y_45_scale / (x_45_scale * Math.PI);
          	double tmp;
          	if (y_45_scale <= -4.5e+130) {
          		tmp = (180.0 * Math.atan((((180.0 / angle) / (x_45_scale * Math.PI)) * (0.0 - y_45_scale)))) / Math.PI;
          	} else if (y_45_scale <= 5.8e+80) {
          		tmp = (180.0 * Math.atan(((((angle * angle) * (((y_45_scale * Math.PI) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * t_0)) / angle))) / Math.PI;
          	} else {
          		tmp = (180.0 * Math.atan((((-180.0 * t_0) - ((angle * angle) * (((y_45_scale * Math.PI) * 0.003703703703703704) / x_45_scale))) / angle))) / Math.PI;
          	}
          	return tmp;
          }
          
          a_m = math.fabs(a)
          def code(a_m, b, angle, x_45_scale, y_45_scale):
          	t_0 = y_45_scale / (x_45_scale * math.pi)
          	tmp = 0
          	if y_45_scale <= -4.5e+130:
          		tmp = (180.0 * math.atan((((180.0 / angle) / (x_45_scale * math.pi)) * (0.0 - y_45_scale)))) / math.pi
          	elif y_45_scale <= 5.8e+80:
          		tmp = (180.0 * math.atan(((((angle * angle) * (((y_45_scale * math.pi) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * t_0)) / angle))) / math.pi
          	else:
          		tmp = (180.0 * math.atan((((-180.0 * t_0) - ((angle * angle) * (((y_45_scale * math.pi) * 0.003703703703703704) / x_45_scale))) / angle))) / math.pi
          	return tmp
          
          a_m = abs(a)
          function code(a_m, b, angle, x_45_scale, y_45_scale)
          	t_0 = Float64(y_45_scale / Float64(x_45_scale * pi))
          	tmp = 0.0
          	if (y_45_scale <= -4.5e+130)
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(180.0 / angle) / Float64(x_45_scale * pi)) * Float64(0.0 - y_45_scale)))) / pi);
          	elseif (y_45_scale <= 5.8e+80)
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(Float64(angle * angle) * Float64(Float64(Float64(y_45_scale * pi) / x_45_scale) * Float64(0.0 - -0.001851851851851852))) - Float64(180.0 * t_0)) / angle))) / pi);
          	else
          		tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-180.0 * t_0) - Float64(Float64(angle * angle) * Float64(Float64(Float64(y_45_scale * pi) * 0.003703703703703704) / x_45_scale))) / angle))) / 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 = y_45_scale / (x_45_scale * pi);
          	tmp = 0.0;
          	if (y_45_scale <= -4.5e+130)
          		tmp = (180.0 * atan((((180.0 / angle) / (x_45_scale * pi)) * (0.0 - y_45_scale)))) / pi;
          	elseif (y_45_scale <= 5.8e+80)
          		tmp = (180.0 * atan(((((angle * angle) * (((y_45_scale * pi) / x_45_scale) * (0.0 - -0.001851851851851852))) - (180.0 * t_0)) / angle))) / pi;
          	else
          		tmp = (180.0 * atan((((-180.0 * t_0) - ((angle * angle) * (((y_45_scale * pi) * 0.003703703703703704) / x_45_scale))) / angle))) / 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[(y$45$scale / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -4.5e+130], N[(N[(180.0 * N[ArcTan[N[(N[(N[(180.0 / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.0 - y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[y$45$scale, 5.8e+80], N[(N[(180.0 * N[ArcTan[N[(N[(N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] / x$45$scale), $MachinePrecision] * N[(0.0 - -0.001851851851851852), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(180.0 * t$95$0), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(-180.0 * t$95$0), $MachinePrecision] - N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(y$45$scale * Pi), $MachinePrecision] * 0.003703703703703704), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
          
          \begin{array}{l}
          a_m = \left|a\right|
          
          \\
          \begin{array}{l}
          t_0 := \frac{y-scale}{x-scale \cdot \pi}\\
          \mathbf{if}\;y-scale \leq -4.5 \cdot 10^{+130}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{180}{angle}}{x-scale \cdot \pi} \cdot \left(0 - y-scale\right)\right)}{\pi}\\
          
          \mathbf{elif}\;y-scale \leq 5.8 \cdot 10^{+80}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(angle \cdot angle\right) \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot \left(0 - -0.001851851851851852\right)\right) - 180 \cdot t\_0}{angle}\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-180 \cdot t\_0 - \left(angle \cdot angle\right) \cdot \frac{\left(y-scale \cdot \pi\right) \cdot 0.003703703703703704}{x-scale}}{angle}\right)}{\pi}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y-scale < -4.50000000000000039e130

            1. Initial program 22.7%

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

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

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.50000000000000039e130 < y-scale < 5.79999999999999971e80

            1. Initial program 11.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. Simplified9.9%

              \[\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 b around inf

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

              \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
            6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 5.79999999999999971e80 < y-scale

            1. Initial program 29.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. Simplified30.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 b around inf

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
            5. Simplified37.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -4.5 \cdot 10^{+130}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\frac{180}{angle}}{x-scale \cdot \pi} \cdot \left(0 - y-scale\right)\right)}{\pi}\\ \mathbf{elif}\;y-scale \leq 5.8 \cdot 10^{+80}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(angle \cdot angle\right) \cdot \left(\frac{y-scale \cdot \pi}{x-scale} \cdot \left(0 - -0.001851851851851852\right)\right) - 180 \cdot \frac{y-scale}{x-scale \cdot \pi}}{angle}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-180 \cdot \frac{y-scale}{x-scale \cdot \pi} - \left(angle \cdot angle\right) \cdot \frac{\left(y-scale \cdot \pi\right) \cdot 0.003703703703703704}{x-scale}}{angle}\right)}{\pi}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 11: 39.4% accurate, 23.5× speedup?

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
          5. Simplified27.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 37.7% accurate, 25.6× speedup?

          \[\begin{array}{l} a_m = \left|a\right| \\ \frac{180 \cdot \tan^{-1} \left(\frac{\frac{180}{angle}}{x-scale \cdot \pi} \cdot \left(0 - y-scale\right)\right)}{\pi} \end{array} \]
          a_m = (fabs.f64 a)
          (FPCore (a_m b angle x-scale y-scale)
           :precision binary64
           (/
            (* 180.0 (atan (* (/ (/ 180.0 angle) (* x-scale PI)) (- 0.0 y-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((((180.0 / angle) / (x_45_scale * ((double) M_PI))) * (0.0 - y_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((((180.0 / angle) / (x_45_scale * Math.PI)) * (0.0 - y_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((((180.0 / angle) / (x_45_scale * math.pi)) * (0.0 - y_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(Float64(Float64(180.0 / angle) / Float64(x_45_scale * pi)) * Float64(0.0 - y_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((((180.0 / angle) / (x_45_scale * pi)) * (0.0 - y_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[(N[(N[(180.0 / angle), $MachinePrecision] / N[(x$45$scale * Pi), $MachinePrecision]), $MachinePrecision] * N[(0.0 - y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]
          
          \begin{array}{l}
          a_m = \left|a\right|
          
          \\
          \frac{180 \cdot \tan^{-1} \left(\frac{\frac{180}{angle}}{x-scale \cdot \pi} \cdot \left(0 - y-scale\right)\right)}{\pi}
          \end{array}
          
          Derivation
          1. Initial program 17.2%

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
          5. Simplified27.9%

            \[\leadsto \frac{180 \cdot \tan^{-1} \color{blue}{\left(\frac{0.5 \cdot \left(\left(x-scale \cdot y-scale\right) \cdot \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} - \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)}\right) + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}}\right)\right)\right)}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}}{\pi} \]
          6. Taylor expanded in x-scale 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. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 13: 37.7% accurate, 26.0× speedup?

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(180, \mathsf{atan.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \frac{x-scale \cdot \left(y-scale \cdot \left(\frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}} - \left(\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}}\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) \]
          5. Simplified27.9%

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

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

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

            \[\leadsto \frac{180 \cdot \tan^{-1} \left(\frac{0.5 \cdot \color{blue}{\left(-2 \cdot \frac{y-scale}{x-scale}\right)}}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi} \]
          9. Taylor expanded in angle 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) \]
          10. Step-by-step derivation
            1. *-lowering-*.f64N/A

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

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

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

          Alternative 14: 37.7% accurate, 26.0× speedup?

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(x-scale \cdot \left(y-scale \cdot \left(2 \cdot \frac{{a}^{2}}{{y-scale}^{2}} - 2 \cdot \frac{{b}^{2}}{{x-scale}^{2}}\right)\right)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified12.7%

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

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

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

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

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

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

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

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

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

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

          Alternative 15: 11.8% accurate, 26.0× speedup?

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(x-scale \cdot \left(y-scale \cdot \left(2 \cdot \frac{{a}^{2}}{{y-scale}^{2}} - 2 \cdot \frac{{b}^{2}}{{x-scale}^{2}}\right)\right)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified12.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 16: 11.8% accurate, 26.0× speedup?

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(180, \mathsf{/.f64}\left(\mathsf{atan.f64}\left(\mathsf{/.f64}\left(\left(90 \cdot \left(x-scale \cdot \left(y-scale \cdot \left(2 \cdot \frac{{a}^{2}}{{y-scale}^{2}} - 2 \cdot \frac{{b}^{2}}{{x-scale}^{2}}\right)\right)\right)\right), \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right), \mathsf{PI.f64}\left(\right)\right)\right) \]
          5. Simplified12.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Reproduce

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