raw-angle from scale-rotated-ellipse

Percentage Accurate: 14.6% → 56.8%
Time: 21.0s
Alternatives: 7
Speedup: 28.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}

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 7 alternatives:

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

Initial Program: 14.6% accurate, 1.0× speedup?

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

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

Alternative 1: 56.8% accurate, 7.5× speedup?

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

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

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


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

    1. Initial program 14.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\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} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.29999999999999992e-45 < b

    1. Initial program 14.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\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} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 56.5% accurate, 12.0× speedup?

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

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b\_m \leq 2.8 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{y-scale}{x-scale} \cdot \tan t\_0\right)}{\pi}\\

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


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

    1. Initial program 14.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\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} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.80000000000000017e31 < b

    1. Initial program 14.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\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} \]
    7. Taylor expanded in angle around 0

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

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

    Alternative 3: 42.9% accurate, 11.4× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 5 \cdot 10^{-103}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, -0.002777777777777778 \cdot \pi - -0.000925925925925926 \cdot \pi, 180 \cdot \frac{1}{\pi}\right)}{angle}\right)\right)}{\pi}\\ \mathbf{elif}\;b\_m \leq 3.3 \cdot 10^{+40}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b\_m \cdot b\_m}{angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{y-scale}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\ \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    (FPCore (a b_m angle x-scale y-scale)
     :precision binary64
     (if (<= b_m 5e-103)
       (*
        180.0
        (/
         (atan
          (*
           -1.0
           (*
            (/ y-scale x-scale)
            (/
             (fma
              (* angle angle)
              (- (* -0.002777777777777778 PI) (* -0.000925925925925926 PI))
              (* 180.0 (/ 1.0 PI)))
             angle))))
         PI))
       (if (<= b_m 3.3e+40)
         (*
          180.0
          (/
           (atan
            (*
             -0.5
             (*
              (/ y-scale x-scale)
              (* 360.0 (/ (* b_m b_m) (* angle (* PI (- (* b_m b_m) (* a a)))))))))
           PI))
         (*
          180.0
          (/
           (atan
            (*
             -1.0
             (/ y-scale (* x-scale (sin (* 0.005555555555555556 (* angle PI)))))))
           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 <= 5e-103) {
    		tmp = 180.0 * (atan((-1.0 * ((y_45_scale / x_45_scale) * (fma((angle * angle), ((-0.002777777777777778 * ((double) M_PI)) - (-0.000925925925925926 * ((double) M_PI))), (180.0 * (1.0 / ((double) M_PI)))) / angle)))) / ((double) M_PI));
    	} else if (b_m <= 3.3e+40) {
    		tmp = 180.0 * (atan((-0.5 * ((y_45_scale / x_45_scale) * (360.0 * ((b_m * b_m) / (angle * (((double) M_PI) * ((b_m * b_m) - (a * a))))))))) / ((double) M_PI));
    	} else {
    		tmp = 180.0 * (atan((-1.0 * (y_45_scale / (x_45_scale * sin((0.005555555555555556 * (angle * ((double) M_PI)))))))) / ((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 <= 5e-103)
    		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 * Float64(Float64(y_45_scale / x_45_scale) * Float64(fma(Float64(angle * angle), Float64(Float64(-0.002777777777777778 * pi) - Float64(-0.000925925925925926 * pi)), Float64(180.0 * Float64(1.0 / pi))) / angle)))) / pi));
    	elseif (b_m <= 3.3e+40)
    		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / x_45_scale) * Float64(360.0 * Float64(Float64(b_m * b_m) / Float64(angle * Float64(pi * Float64(Float64(b_m * b_m) - Float64(a * a))))))))) / pi));
    	else
    		tmp = Float64(180.0 * Float64(atan(Float64(-1.0 * Float64(y_45_scale / Float64(x_45_scale * sin(Float64(0.005555555555555556 * Float64(angle * pi))))))) / 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, 5e-103], N[(180.0 * N[(N[ArcTan[N[(-1.0 * N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(N[(angle * angle), $MachinePrecision] * N[(N[(-0.002777777777777778 * Pi), $MachinePrecision] - N[(-0.000925925925925926 * Pi), $MachinePrecision]), $MachinePrecision] + N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 3.3e+40], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(360.0 * N[(N[(b$95$m * b$95$m), $MachinePrecision] / N[(angle * N[(Pi * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 * N[(y$45$scale / N[(x$45$scale * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b\_m \leq 5 \cdot 10^{-103}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, -0.002777777777777778 \cdot \pi - -0.000925925925925926 \cdot \pi, 180 \cdot \frac{1}{\pi}\right)}{angle}\right)\right)}{\pi}\\
    
    \mathbf{elif}\;b\_m \leq 3.3 \cdot 10^{+40}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b\_m \cdot b\_m}{angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)\right)\right)}{\pi}\\
    
    \mathbf{else}:\\
    \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{y-scale}{x-scale \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}{\pi}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < 4.99999999999999966e-103

      1. Initial program 14.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\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} \]
      7. Step-by-step derivation
        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left({angle}^{2}, \frac{-1}{360} \cdot \mathsf{PI}\left(\right) - \frac{-1}{1080} \cdot \mathsf{PI}\left(\right), 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}\right)}{angle}\right)\right)}{\pi} \]
        3. unpow2N/A

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

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

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

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, \frac{-1}{360} \cdot \pi - \frac{-1}{1080} \cdot \mathsf{PI}\left(\right), 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}\right)}{angle}\right)\right)}{\pi} \]
        8. lower-*.f64N/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, \frac{-1}{360} \cdot \pi - \frac{-1}{1080} \cdot \pi, 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}\right)}{angle}\right)\right)}{\pi} \]
        10. lower-*.f64N/A

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

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, \frac{-1}{360} \cdot \pi - \frac{-1}{1080} \cdot \pi, 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}\right)}{angle}\right)\right)}{\pi} \]
        12. lift-PI.f6440.4

          \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, -0.002777777777777778 \cdot \pi - -0.000925925925925926 \cdot \pi, 180 \cdot \frac{1}{\pi}\right)}{angle}\right)\right)}{\pi} \]
      11. Applied rewrites40.4%

        \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, -0.002777777777777778 \cdot \pi - -0.000925925925925926 \cdot \pi, 180 \cdot \frac{1}{\pi}\right)}{angle}\right)\right)}{\pi} \]

      if 4.99999999999999966e-103 < b < 3.2999999999999998e40

      1. Initial program 14.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right)}\right)\right)\right)}{\pi} \]
            12. lift-*.f6425.0

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)\right)}{\pi} \]
          6. Applied rewrites25.0%

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

          if 3.2999999999999998e40 < b

          1. Initial program 14.6%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\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} \]
          7. Taylor expanded in angle around 0

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

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

          Alternative 4: 41.4% accurate, 13.6× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, -0.002777777777777778 \cdot \pi - -0.000925925925925926 \cdot \pi, 180 \cdot \frac{1}{\pi}\right)}{angle}\right)\right)}{\pi}\\ \mathbf{if}\;b\_m \leq 5 \cdot 10^{-103}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;b\_m \leq 2.5 \cdot 10^{+41}:\\ \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b\_m \cdot b\_m}{angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)\right)\right)}{\pi}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle x-scale y-scale)
           :precision binary64
           (let* ((t_0
                   (*
                    180.0
                    (/
                     (atan
                      (*
                       -1.0
                       (*
                        (/ y-scale x-scale)
                        (/
                         (fma
                          (* angle angle)
                          (- (* -0.002777777777777778 PI) (* -0.000925925925925926 PI))
                          (* 180.0 (/ 1.0 PI)))
                         angle))))
                     PI))))
             (if (<= b_m 5e-103)
               t_0
               (if (<= b_m 2.5e+41)
                 (*
                  180.0
                  (/
                   (atan
                    (*
                     -0.5
                     (*
                      (/ y-scale x-scale)
                      (*
                       360.0
                       (/ (* b_m b_m) (* angle (* PI (- (* b_m b_m) (* a a)))))))))
                   PI))
                 t_0))))
          b_m = fabs(b);
          double code(double a, double b_m, double angle, double x_45_scale, double y_45_scale) {
          	double t_0 = 180.0 * (atan((-1.0 * ((y_45_scale / x_45_scale) * (fma((angle * angle), ((-0.002777777777777778 * ((double) M_PI)) - (-0.000925925925925926 * ((double) M_PI))), (180.0 * (1.0 / ((double) M_PI)))) / angle)))) / ((double) M_PI));
          	double tmp;
          	if (b_m <= 5e-103) {
          		tmp = t_0;
          	} else if (b_m <= 2.5e+41) {
          		tmp = 180.0 * (atan((-0.5 * ((y_45_scale / x_45_scale) * (360.0 * ((b_m * b_m) / (angle * (((double) M_PI) * ((b_m * b_m) - (a * a))))))))) / ((double) M_PI));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          b_m = abs(b)
          function code(a, b_m, angle, x_45_scale, y_45_scale)
          	t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 * Float64(Float64(y_45_scale / x_45_scale) * Float64(fma(Float64(angle * angle), Float64(Float64(-0.002777777777777778 * pi) - Float64(-0.000925925925925926 * pi)), Float64(180.0 * Float64(1.0 / pi))) / angle)))) / pi))
          	tmp = 0.0
          	if (b_m <= 5e-103)
          		tmp = t_0;
          	elseif (b_m <= 2.5e+41)
          		tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(Float64(y_45_scale / x_45_scale) * Float64(360.0 * Float64(Float64(b_m * b_m) / Float64(angle * Float64(pi * Float64(Float64(b_m * b_m) - Float64(a * a))))))))) / pi));
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 * N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(N[(N[(angle * angle), $MachinePrecision] * N[(N[(-0.002777777777777778 * Pi), $MachinePrecision] - N[(-0.000925925925925926 * Pi), $MachinePrecision]), $MachinePrecision] + N[(180.0 * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 5e-103], t$95$0, If[LessEqual[b$95$m, 2.5e+41], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(N[(y$45$scale / x$45$scale), $MachinePrecision] * N[(360.0 * N[(N[(b$95$m * b$95$m), $MachinePrecision] / N[(angle * N[(Pi * N[(N[(b$95$m * b$95$m), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$0]]]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \begin{array}{l}
          t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, -0.002777777777777778 \cdot \pi - -0.000925925925925926 \cdot \pi, 180 \cdot \frac{1}{\pi}\right)}{angle}\right)\right)}{\pi}\\
          \mathbf{if}\;b\_m \leq 5 \cdot 10^{-103}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;b\_m \leq 2.5 \cdot 10^{+41}:\\
          \;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b\_m \cdot b\_m}{angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m - a \cdot a\right)\right)}\right)\right)\right)}{\pi}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if b < 4.99999999999999966e-103 or 2.50000000000000011e41 < b

            1. Initial program 14.6%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\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} \]
            7. Step-by-step derivation
              1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left({angle}^{2}, \frac{-1}{360} \cdot \mathsf{PI}\left(\right) - \frac{-1}{1080} \cdot \mathsf{PI}\left(\right), 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}\right)}{angle}\right)\right)}{\pi} \]
              3. unpow2N/A

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, \frac{-1}{360} \cdot \pi - \frac{-1}{1080} \cdot \mathsf{PI}\left(\right), 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}\right)}{angle}\right)\right)}{\pi} \]
              8. lower-*.f64N/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, \frac{-1}{360} \cdot \pi - \frac{-1}{1080} \cdot \pi, 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}\right)}{angle}\right)\right)}{\pi} \]
              10. lower-*.f64N/A

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, \frac{-1}{360} \cdot \pi - \frac{-1}{1080} \cdot \pi, 180 \cdot \frac{1}{\mathsf{PI}\left(\right)}\right)}{angle}\right)\right)}{\pi} \]
              12. lift-PI.f6440.4

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, -0.002777777777777778 \cdot \pi - -0.000925925925925926 \cdot \pi, 180 \cdot \frac{1}{\pi}\right)}{angle}\right)\right)}{\pi} \]
            11. Applied rewrites40.4%

              \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \left(\frac{y-scale}{x-scale} \cdot \frac{\mathsf{fma}\left(angle \cdot angle, -0.002777777777777778 \cdot \pi - -0.000925925925925926 \cdot \pi, 180 \cdot \frac{1}{\pi}\right)}{angle}\right)\right)}{\pi} \]

            if 4.99999999999999966e-103 < b < 2.50000000000000011e41

            1. Initial program 14.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(\frac{-1}{2} \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right)}\right)\right)\right)}{\pi} \]
                  12. lift-*.f6425.0

                    \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \frac{b \cdot b}{angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)}\right)\right)\right)}{\pi} \]
                6. Applied rewrites25.0%

                  \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \left(\frac{y-scale}{x-scale} \cdot \left(360 \cdot \color{blue}{\frac{b \cdot b}{angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)}}\right)\right)\right)}{\pi} \]
              4. Recombined 2 regimes into one program.
              5. Add Preprocessing

              Alternative 5: 39.8% accurate, 25.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto 180 \cdot \frac{\tan^{-1} \left(-1 \cdot \color{blue}{\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} \]
              7. Step-by-step derivation
                1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 6: 38.3% accurate, 28.2× speedup?

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

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

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

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

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

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

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

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

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

                Alternative 7: 12.4% accurate, 28.2× speedup?

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

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

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

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

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

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

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

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

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

                  Reproduce

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