raw-angle from scale-rotated-ellipse

Percentage Accurate: 16.1% → 60.2%
Time: 38.6s
Alternatives: 13
Speedup: 22.2×

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 13 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: 16.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: 60.2% accurate, 6.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 6.5 \cdot 10^{+71}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\tan \left(\frac{\left(angle \cdot \pi\right) \cdot 0.011111111111111112}{2}\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(-x-scale\right)}\right)}{\pi}\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle x-scale y-scale)
 :precision binary64
 (if (<= b_m 6.5e+71)
   (/
    (*
     180.0
     (atan
      (*
       (tan (/ (* (* angle PI) 0.011111111111111112) 2.0))
       (/ y-scale x-scale))))
    PI)
   (*
    180.0
    (/
     (atan
      (/
       (*
        y-scale
        (cos (* 0.005555555555555556 (* angle (cbrt (* PI (* PI PI)))))))
       (* (sin (* (* angle PI) 0.005555555555555556)) (- x-scale))))
     PI))))
b_m = fabs(b);
double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
	double tmp;
	if (b_m <= 6.5e+71) {
		tmp = (180.0 * atan((tan((((angle * ((double) M_PI)) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / ((double) M_PI);
	} else {
		tmp = 180.0 * (atan(((y_45_scale * cos((0.005555555555555556 * (angle * cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI)))))))) / (sin(((angle * ((double) M_PI)) * 0.005555555555555556)) * -x_45_scale))) / ((double) M_PI));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
	double tmp;
	if (b_m <= 6.5e+71) {
		tmp = (180.0 * Math.atan((Math.tan((((angle * Math.PI) * 0.011111111111111112) / 2.0)) * (y_45_scale / x_45_scale)))) / Math.PI;
	} else {
		tmp = 180.0 * (Math.atan(((y_45_scale * Math.cos((0.005555555555555556 * (angle * Math.cbrt((Math.PI * (Math.PI * Math.PI))))))) / (Math.sin(((angle * Math.PI) * 0.005555555555555556)) * -x_45_scale))) / Math.PI);
	}
	return tmp;
}
b_m = abs(b)
function code(a, b_m, angle, x_45_scale, y_45_scale)
	tmp = 0.0
	if (b_m <= 6.5e+71)
		tmp = Float64(Float64(180.0 * atan(Float64(tan(Float64(Float64(Float64(angle * pi) * 0.011111111111111112) / 2.0)) * Float64(y_45_scale / x_45_scale)))) / pi);
	else
		tmp = Float64(180.0 * Float64(atan(Float64(Float64(y_45_scale * cos(Float64(0.005555555555555556 * Float64(angle * cbrt(Float64(pi * Float64(pi * pi))))))) / Float64(sin(Float64(Float64(angle * pi) * 0.005555555555555556)) * Float64(-x_45_scale)))) / pi));
	end
	return tmp
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 6.5e+71], N[(N[(180.0 * N[ArcTan[N[(N[Tan[N[(N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y$45$scale / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(y$45$scale * N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 6.5 \cdot 10^{+71}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\tan \left(\frac{\left(angle \cdot \pi\right) \cdot 0.011111111111111112}{2}\right) \cdot \frac{y-scale}{x-scale}\right)}{\pi}\\

\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(-x-scale\right)}\right)}{\pi}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 6.49999999999999954e71

    1. Initial program 18.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. Add Preprocessing
    3. Applied egg-rr18.5%

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
    8. Simplified29.1%

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)} - \frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}}{x-scale}} \cdot y-scale\right)}{\pi} \]
    9. Step-by-step derivation
      1. Applied egg-rr51.8%

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

      if 6.49999999999999954e71 < b

      1. Initial program 17.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. Add Preprocessing
      3. Taylor expanded in x-scale around 0

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
      5. Simplified27.1%

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \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)}}{\mathsf{PI}\left(\right)} \]
      7. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \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 \color{blue}{\pi}\right)\right)}\right)}{\pi} \]
      8. Simplified79.1%

        \[\leadsto 180 \cdot \frac{\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. add-cbrt-cubeN/A

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \sqrt[3]{\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}\right)\right)}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
        8. lower-*.f6484.5

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-\frac{y-scale \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{\pi \cdot \color{blue}{\left(\pi \cdot \pi\right)}}\right)\right)}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi} \]
      10. Applied egg-rr84.5%

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

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

    Alternative 2: 60.0% accurate, 12.0× speedup?

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

      1. Initial program 18.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. Add Preprocessing
      3. Applied egg-rr18.5%

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
      8. Simplified29.1%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)} - \frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}}{x-scale}} \cdot y-scale\right)}{\pi} \]
      9. Step-by-step derivation
        1. Applied egg-rr51.8%

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

        if 4.19999999999999978e71 < b

        1. Initial program 17.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. Add Preprocessing
        3. Taylor expanded in x-scale around 0

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
        5. Simplified27.1%

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \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)}}{\mathsf{PI}\left(\right)} \]
        7. Step-by-step derivation
          1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \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 \color{blue}{\pi}\right)\right)}\right)}{\pi} \]
        8. Simplified79.1%

          \[\leadsto 180 \cdot \frac{\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. Applied egg-rr81.6%

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

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

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

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

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

              \[\leadsto \tan^{-1} \left(\frac{-1}{\frac{x-scale}{y-scale} \cdot \tan \left(\color{blue}{\left(0.005555555555555556 \cdot \pi\right)} \cdot angle\right)}\right) \cdot \left(\frac{1}{\pi} \cdot 180\right) \]
          3. Applied egg-rr84.0%

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

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

        Alternative 3: 60.1% accurate, 12.2× speedup?

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

          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. Add Preprocessing
          3. Applied egg-rr18.9%

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
          8. Simplified29.4%

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)} - \frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}}{x-scale}} \cdot y-scale\right)}{\pi} \]
          9. Step-by-step derivation
            1. Applied egg-rr52.1%

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

            if 4.3000000000000003e79 < b

            1. Initial program 15.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. Add Preprocessing
            3. Taylor expanded in x-scale around 0

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
            5. Simplified27.7%

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \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)}}{\mathsf{PI}\left(\right)} \]
            7. Step-by-step derivation
              1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
              13. lower-PI.f6481.0

                \[\leadsto 180 \cdot \frac{\tan^{-1} \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 \color{blue}{\pi}\right)\right)}\right)}{\pi} \]
            8. Simplified81.0%

              \[\leadsto 180 \cdot \frac{\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. Applied egg-rr83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 4: 58.1% accurate, 12.2× speedup?

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

              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. Add Preprocessing
              3. Applied egg-rr18.9%

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

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

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

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
              8. Simplified29.4%

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)} - \frac{\cos \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}{\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)}}{x-scale}} \cdot y-scale\right)}{\pi} \]
              9. Step-by-step derivation
                1. Applied egg-rr49.9%

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

                if 4.3000000000000003e79 < b

                1. Initial program 15.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. Add Preprocessing
                3. Taylor expanded in x-scale around 0

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
                5. Simplified27.7%

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

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \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)}}{\mathsf{PI}\left(\right)} \]
                7. Step-by-step derivation
                  1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
                  13. lower-PI.f6481.0

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \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 \color{blue}{\pi}\right)\right)}\right)}{\pi} \]
                8. Simplified81.0%

                  \[\leadsto 180 \cdot \frac{\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. Applied egg-rr83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 5: 55.3% accurate, 12.5× speedup?

                \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 4.3 \cdot 10^{+79}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(y-scale \cdot \frac{-1}{x-scale \cdot \tan \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)\\ \end{array} \end{array} \]
                b_m = (fabs.f64 b)
                (FPCore (a b_m angle x-scale y-scale)
                 :precision binary64
                 (if (<= b_m 4.3e+79)
                   (*
                    180.0
                    (/
                     (atan
                      (*
                       y-scale
                       (/
                        (*
                         angle
                         (fma
                          (* angle angle)
                          (fma
                           (* (* PI PI) -2.05761316872428e-5)
                           (* PI -0.003703703703703704)
                           (* (* PI (* PI PI)) -1.9051973784484073e-8))
                          (* PI 0.005555555555555556)))
                        x-scale)))
                     PI))
                   (*
                    (/ 180.0 PI)
                    (atan
                     (*
                      y-scale
                      (/ -1.0 (* x-scale (tan (* (* angle PI) 0.005555555555555556)))))))))
                b_m = fabs(b);
                double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
                	double tmp;
                	if (b_m <= 4.3e+79) {
                		tmp = 180.0 * (atan((y_45_scale * ((angle * fma((angle * angle), fma(((((double) M_PI) * ((double) M_PI)) * -2.05761316872428e-5), (((double) M_PI) * -0.003703703703703704), ((((double) M_PI) * (((double) M_PI) * ((double) M_PI))) * -1.9051973784484073e-8)), (((double) M_PI) * 0.005555555555555556))) / x_45_scale))) / ((double) M_PI));
                	} else {
                		tmp = (180.0 / ((double) M_PI)) * atan((y_45_scale * (-1.0 / (x_45_scale * tan(((angle * ((double) M_PI)) * 0.005555555555555556))))));
                	}
                	return tmp;
                }
                
                b_m = abs(b)
                function code(a, b_m, angle, x_45_scale, y_45_scale)
                	tmp = 0.0
                	if (b_m <= 4.3e+79)
                		tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(Float64(angle * fma(Float64(angle * angle), fma(Float64(Float64(pi * pi) * -2.05761316872428e-5), Float64(pi * -0.003703703703703704), Float64(Float64(pi * Float64(pi * pi)) * -1.9051973784484073e-8)), Float64(pi * 0.005555555555555556))) / x_45_scale))) / pi));
                	else
                		tmp = Float64(Float64(180.0 / pi) * atan(Float64(y_45_scale * Float64(-1.0 / Float64(x_45_scale * tan(Float64(Float64(angle * pi) * 0.005555555555555556)))))));
                	end
                	return tmp
                end
                
                b_m = N[Abs[b], $MachinePrecision]
                code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 4.3e+79], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[(angle * N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -2.05761316872428e-5), $MachinePrecision] * N[(Pi * -0.003703703703703704), $MachinePrecision] + N[(N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * -1.9051973784484073e-8), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(y$45$scale * N[(-1.0 / N[(x$45$scale * N[Tan[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                b_m = \left|b\right|
                
                \\
                \begin{array}{l}
                \mathbf{if}\;b\_m \leq 4.3 \cdot 10^{+79}:\\
                \;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(y-scale \cdot \frac{-1}{x-scale \cdot \tan \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if b < 4.3000000000000003e79

                  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. Add Preprocessing
                  3. Applied egg-rr18.9%

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

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

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                  8. Simplified29.4%

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{angle \cdot \left({angle}^{2} \cdot \left(\frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) - \frac{-1}{180} \cdot \mathsf{PI}\left(\right)\right)}}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                    2. cancel-sign-sub-invN/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{angle \cdot \color{blue}{\left({angle}^{2} \cdot \left(\frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) + \left(\mathsf{neg}\left(\frac{-1}{180}\right)\right) \cdot \mathsf{PI}\left(\right)\right)}}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                    3. metadata-evalN/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{angle \cdot \left({angle}^{2} \cdot \left(\frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) + \color{blue}{\frac{1}{180}} \cdot \mathsf{PI}\left(\right)\right)}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                    4. lower-fma.f64N/A

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{angle \cdot \color{blue}{\mathsf{fma}\left({angle}^{2}, \frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right), \frac{1}{180} \cdot \mathsf{PI}\left(\right)\right)}}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                  11. Simplified49.2%

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(-2.05761316872428 \cdot 10^{-5} \cdot \left(\pi \cdot \pi\right), \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), 0.005555555555555556 \cdot \pi\right)}}{x-scale} \cdot y-scale\right)}{\pi} \]

                  if 4.3000000000000003e79 < b

                  1. Initial program 15.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. Add Preprocessing
                  3. Taylor expanded in x-scale around 0

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
                  5. Simplified27.7%

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \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)}}{\mathsf{PI}\left(\right)} \]
                  7. Step-by-step derivation
                    1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
                    13. lower-PI.f6481.0

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \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 \color{blue}{\pi}\right)\right)}\right)}{\pi} \]
                  8. Simplified81.0%

                    \[\leadsto 180 \cdot \frac{\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. Applied egg-rr83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.3 \cdot 10^{+79}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(y-scale \cdot \frac{-1}{x-scale \cdot \tan \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)\\ \end{array} \]
                  12. Add Preprocessing

                  Alternative 6: 55.3% accurate, 12.7× speedup?

                  \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 4.3 \cdot 10^{+79}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{\tan \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(-x-scale\right)}\right)}{\pi}\\ \end{array} \end{array} \]
                  b_m = (fabs.f64 b)
                  (FPCore (a b_m angle x-scale y-scale)
                   :precision binary64
                   (if (<= b_m 4.3e+79)
                     (*
                      180.0
                      (/
                       (atan
                        (*
                         y-scale
                         (/
                          (*
                           angle
                           (fma
                            (* angle angle)
                            (fma
                             (* (* PI PI) -2.05761316872428e-5)
                             (* PI -0.003703703703703704)
                             (* (* PI (* PI PI)) -1.9051973784484073e-8))
                            (* PI 0.005555555555555556)))
                          x-scale)))
                       PI))
                     (/
                      (*
                       180.0
                       (atan
                        (/ y-scale (* (tan (* (* angle PI) 0.005555555555555556)) (- x-scale)))))
                      PI)))
                  b_m = fabs(b);
                  double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
                  	double tmp;
                  	if (b_m <= 4.3e+79) {
                  		tmp = 180.0 * (atan((y_45_scale * ((angle * fma((angle * angle), fma(((((double) M_PI) * ((double) M_PI)) * -2.05761316872428e-5), (((double) M_PI) * -0.003703703703703704), ((((double) M_PI) * (((double) M_PI) * ((double) M_PI))) * -1.9051973784484073e-8)), (((double) M_PI) * 0.005555555555555556))) / x_45_scale))) / ((double) M_PI));
                  	} else {
                  		tmp = (180.0 * atan((y_45_scale / (tan(((angle * ((double) M_PI)) * 0.005555555555555556)) * -x_45_scale)))) / ((double) M_PI);
                  	}
                  	return tmp;
                  }
                  
                  b_m = abs(b)
                  function code(a, b_m, angle, x_45_scale, y_45_scale)
                  	tmp = 0.0
                  	if (b_m <= 4.3e+79)
                  		tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(Float64(angle * fma(Float64(angle * angle), fma(Float64(Float64(pi * pi) * -2.05761316872428e-5), Float64(pi * -0.003703703703703704), Float64(Float64(pi * Float64(pi * pi)) * -1.9051973784484073e-8)), Float64(pi * 0.005555555555555556))) / x_45_scale))) / pi));
                  	else
                  		tmp = Float64(Float64(180.0 * atan(Float64(y_45_scale / Float64(tan(Float64(Float64(angle * pi) * 0.005555555555555556)) * Float64(-x_45_scale))))) / pi);
                  	end
                  	return tmp
                  end
                  
                  b_m = N[Abs[b], $MachinePrecision]
                  code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 4.3e+79], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[(angle * N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -2.05761316872428e-5), $MachinePrecision] * N[(Pi * -0.003703703703703704), $MachinePrecision] + N[(N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * -1.9051973784484073e-8), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(y$45$scale / N[(N[Tan[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * (-x$45$scale)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
                  
                  \begin{array}{l}
                  b_m = \left|b\right|
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;b\_m \leq 4.3 \cdot 10^{+79}:\\
                  \;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{\tan \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(-x-scale\right)}\right)}{\pi}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if b < 4.3000000000000003e79

                    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. Add Preprocessing
                    3. Applied egg-rr18.9%

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

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

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

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

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                    8. Simplified29.4%

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

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

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{angle \cdot \left({angle}^{2} \cdot \left(\frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) - \frac{-1}{180} \cdot \mathsf{PI}\left(\right)\right)}}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                      2. cancel-sign-sub-invN/A

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{angle \cdot \color{blue}{\left({angle}^{2} \cdot \left(\frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) + \left(\mathsf{neg}\left(\frac{-1}{180}\right)\right) \cdot \mathsf{PI}\left(\right)\right)}}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                      3. metadata-evalN/A

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{angle \cdot \left({angle}^{2} \cdot \left(\frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) + \color{blue}{\frac{1}{180}} \cdot \mathsf{PI}\left(\right)\right)}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                      4. lower-fma.f64N/A

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{angle \cdot \color{blue}{\mathsf{fma}\left({angle}^{2}, \frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right), \frac{1}{180} \cdot \mathsf{PI}\left(\right)\right)}}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                    11. Simplified49.2%

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(-2.05761316872428 \cdot 10^{-5} \cdot \left(\pi \cdot \pi\right), \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), 0.005555555555555556 \cdot \pi\right)}}{x-scale} \cdot y-scale\right)}{\pi} \]

                    if 4.3000000000000003e79 < b

                    1. Initial program 15.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. Add Preprocessing
                    3. Taylor expanded in x-scale around 0

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

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

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
                    5. Simplified27.7%

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

                      \[\leadsto 180 \cdot \frac{\tan^{-1} \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)}}{\mathsf{PI}\left(\right)} \]
                    7. Step-by-step derivation
                      1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
                      13. lower-PI.f6481.0

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \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 \color{blue}{\pi}\right)\right)}\right)}{\pi} \]
                    8. Simplified81.0%

                      \[\leadsto 180 \cdot \frac{\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. Applied egg-rr83.6%

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

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

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.3 \cdot 10^{+79}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{y-scale}{\tan \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(-x-scale\right)}\right)}{\pi}\\ \end{array} \]
                    12. Add Preprocessing

                    Alternative 7: 53.7% accurate, 16.2× speedup?

                    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 2.05 \cdot 10^{+81}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{y-scale \cdot -180}{\left(angle \cdot \pi\right) \cdot x-scale}\right)\\ \end{array} \end{array} \]
                    b_m = (fabs.f64 b)
                    (FPCore (a b_m angle x-scale y-scale)
                     :precision binary64
                     (if (<= b_m 2.05e+81)
                       (*
                        180.0
                        (/
                         (atan
                          (*
                           y-scale
                           (/
                            (*
                             angle
                             (fma
                              (* angle angle)
                              (fma
                               (* (* PI PI) -2.05761316872428e-5)
                               (* PI -0.003703703703703704)
                               (* (* PI (* PI PI)) -1.9051973784484073e-8))
                              (* PI 0.005555555555555556)))
                            x-scale)))
                         PI))
                       (*
                        (* 180.0 (/ 1.0 PI))
                        (atan (/ (* y-scale -180.0) (* (* angle PI) x-scale))))))
                    b_m = fabs(b);
                    double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
                    	double tmp;
                    	if (b_m <= 2.05e+81) {
                    		tmp = 180.0 * (atan((y_45_scale * ((angle * fma((angle * angle), fma(((((double) M_PI) * ((double) M_PI)) * -2.05761316872428e-5), (((double) M_PI) * -0.003703703703703704), ((((double) M_PI) * (((double) M_PI) * ((double) M_PI))) * -1.9051973784484073e-8)), (((double) M_PI) * 0.005555555555555556))) / x_45_scale))) / ((double) M_PI));
                    	} else {
                    		tmp = (180.0 * (1.0 / ((double) M_PI))) * atan(((y_45_scale * -180.0) / ((angle * ((double) M_PI)) * x_45_scale)));
                    	}
                    	return tmp;
                    }
                    
                    b_m = abs(b)
                    function code(a, b_m, angle, x_45_scale, y_45_scale)
                    	tmp = 0.0
                    	if (b_m <= 2.05e+81)
                    		tmp = Float64(180.0 * Float64(atan(Float64(y_45_scale * Float64(Float64(angle * fma(Float64(angle * angle), fma(Float64(Float64(pi * pi) * -2.05761316872428e-5), Float64(pi * -0.003703703703703704), Float64(Float64(pi * Float64(pi * pi)) * -1.9051973784484073e-8)), Float64(pi * 0.005555555555555556))) / x_45_scale))) / pi));
                    	else
                    		tmp = Float64(Float64(180.0 * Float64(1.0 / pi)) * atan(Float64(Float64(y_45_scale * -180.0) / Float64(Float64(angle * pi) * x_45_scale))));
                    	end
                    	return tmp
                    end
                    
                    b_m = N[Abs[b], $MachinePrecision]
                    code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[b$95$m, 2.05e+81], N[(180.0 * N[(N[ArcTan[N[(y$45$scale * N[(N[(angle * N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -2.05761316872428e-5), $MachinePrecision] * N[(Pi * -0.003703703703703704), $MachinePrecision] + N[(N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * -1.9051973784484073e-8), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision] * N[ArcTan[N[(N[(y$45$scale * -180.0), $MachinePrecision] / N[(N[(angle * Pi), $MachinePrecision] * x$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                    
                    \begin{array}{l}
                    b_m = \left|b\right|
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;b\_m \leq 2.05 \cdot 10^{+81}:\\
                    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{y-scale \cdot -180}{\left(angle \cdot \pi\right) \cdot x-scale}\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if b < 2.05000000000000006e81

                      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. Add Preprocessing
                      3. Applied egg-rr18.9%

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

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                      8. Simplified29.4%

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{angle \cdot \left({angle}^{2} \cdot \left(\frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) - \frac{-1}{180} \cdot \mathsf{PI}\left(\right)\right)}}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                        2. cancel-sign-sub-invN/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{angle \cdot \color{blue}{\left({angle}^{2} \cdot \left(\frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) + \left(\mathsf{neg}\left(\frac{-1}{180}\right)\right) \cdot \mathsf{PI}\left(\right)\right)}}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                        3. metadata-evalN/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{angle \cdot \left({angle}^{2} \cdot \left(\frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) + \color{blue}{\frac{1}{180}} \cdot \mathsf{PI}\left(\right)\right)}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                        4. lower-fma.f64N/A

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{angle \cdot \color{blue}{\mathsf{fma}\left({angle}^{2}, \frac{-1}{48600} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{180} \cdot \mathsf{PI}\left(\right) - \frac{-1}{540} \cdot \mathsf{PI}\left(\right)\right)\right) - \left(\frac{-1}{26244000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{1}{17496000} \cdot {\mathsf{PI}\left(\right)}^{3}\right), \frac{1}{180} \cdot \mathsf{PI}\left(\right)\right)}}{x-scale} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                      11. Simplified49.2%

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{\color{blue}{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(-2.05761316872428 \cdot 10^{-5} \cdot \left(\pi \cdot \pi\right), \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), 0.005555555555555556 \cdot \pi\right)}}{x-scale} \cdot y-scale\right)}{\pi} \]

                      if 2.05000000000000006e81 < b

                      1. Initial program 15.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. Add Preprocessing
                      3. Taylor expanded in x-scale around 0

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
                      5. Simplified27.7%

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

                        \[\leadsto 180 \cdot \frac{\tan^{-1} \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)}}{\mathsf{PI}\left(\right)} \]
                      7. Step-by-step derivation
                        1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
                        13. lower-PI.f6481.0

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \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 \color{blue}{\pi}\right)\right)}\right)}{\pi} \]
                      8. Simplified81.0%

                        \[\leadsto 180 \cdot \frac{\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. Applied egg-rr83.6%

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.05 \cdot 10^{+81}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(y-scale \cdot \frac{angle \cdot \mathsf{fma}\left(angle \cdot angle, \mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot -2.05761316872428 \cdot 10^{-5}, \pi \cdot -0.003703703703703704, \left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot -1.9051973784484073 \cdot 10^{-8}\right), \pi \cdot 0.005555555555555556\right)}{x-scale}\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;\left(180 \cdot \frac{1}{\pi}\right) \cdot \tan^{-1} \left(\frac{y-scale \cdot -180}{\left(angle \cdot \pi\right) \cdot x-scale}\right)\\ \end{array} \]
                      12. Add Preprocessing

                      Alternative 8: 54.3% accurate, 20.6× speedup?

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

                        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. Add Preprocessing
                        3. Applied egg-rr18.9%

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

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

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

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

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                        8. Simplified29.4%

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

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

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

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

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

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

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

                        if 2.05000000000000006e81 < b

                        1. Initial program 15.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. Add Preprocessing
                        3. Taylor expanded in x-scale around 0

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

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

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
                        5. Simplified27.7%

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

                          \[\leadsto 180 \cdot \frac{\tan^{-1} \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)}}{\mathsf{PI}\left(\right)} \]
                        7. Step-by-step derivation
                          1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
                          13. lower-PI.f6481.0

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \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 \color{blue}{\pi}\right)\right)}\right)}{\pi} \]
                        8. Simplified81.0%

                          \[\leadsto 180 \cdot \frac{\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. Applied egg-rr83.6%

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 9: 54.3% accurate, 21.3× speedup?

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

                          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. Add Preprocessing
                          3. Applied egg-rr18.9%

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

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

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

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

                              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                          8. Simplified29.4%

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

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

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

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

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

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

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

                          if 2.05000000000000006e81 < b

                          1. Initial program 15.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. Add Preprocessing
                          3. Taylor expanded in angle around 0

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

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

                              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
                          5. Simplified17.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 10: 54.2% accurate, 21.3× speedup?

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

                          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. Add Preprocessing
                          3. Applied egg-rr18.9%

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

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

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

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

                              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                          8. Simplified29.4%

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

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

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

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

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

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

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

                          if 2.05000000000000006e81 < b

                          1. Initial program 15.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. Add Preprocessing
                          3. Taylor expanded in x-scale around 0

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

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

                              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
                          5. Simplified27.7%

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

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \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)}}{\mathsf{PI}\left(\right)} \]
                          7. Step-by-step derivation
                            1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\mathsf{neg}\left(\frac{y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{x-scale \cdot \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)}\right)\right)}{\mathsf{PI}\left(\right)} \]
                            13. lower-PI.f6481.0

                              \[\leadsto 180 \cdot \frac{\tan^{-1} \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 \color{blue}{\pi}\right)\right)}\right)}{\pi} \]
                          8. Simplified81.0%

                            \[\leadsto 180 \cdot \frac{\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 180 \cdot \frac{\tan^{-1} \color{blue}{\left(-180 \cdot \frac{y-scale}{angle \cdot \left(x-scale \cdot \mathsf{PI}\left(\right)\right)}\right)}}{\mathsf{PI}\left(\right)} \]
                          10. Step-by-step derivation
                            1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

                        Alternative 11: 54.2% accurate, 21.3× speedup?

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

                          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. Add Preprocessing
                          3. Applied egg-rr18.9%

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

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

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

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

                              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\color{blue}{\frac{\frac{1}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} - \frac{\cos \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}{\sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}}{x-scale}} \cdot y-scale\right)}{\mathsf{PI}\left(\right)} \]
                          8. Simplified29.4%

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

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

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

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

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

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

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

                          if 2.05000000000000006e81 < b

                          1. Initial program 15.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. Add Preprocessing
                          3. Taylor expanded in angle around 0

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

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

                              \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
                          5. Simplified17.6%

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

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

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

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

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

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

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

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

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

                        Alternative 12: 38.2% accurate, 22.2× speedup?

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

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

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

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
                        5. Simplified14.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(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)}}{\pi} \]
                        6. Taylor expanded in a around 0

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

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

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

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

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

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

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

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

                        Alternative 13: 15.0% accurate, 22.2× speedup?

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

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

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

                            \[\leadsto 180 \cdot \frac{\tan^{-1} \color{blue}{\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)}}{\mathsf{PI}\left(\right)} \]
                        5. Simplified14.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(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)}}{\pi} \]
                        6. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

                        Reproduce

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