Simplification of discriminant from scale-rotated-ellipse

Percentage Accurate: 24.9% → 87.3%
Time: 26.6s
Alternatives: 6
Speedup: 99.6×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{angle}{180} \cdot \pi\\ t_1 := \sin t\_0\\ t_2 := \cos t\_0\\ t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_1\right) \cdot t\_2}{x-scale}}{y-scale}\\ t\_3 \cdot t\_3 - \left(4 \cdot \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{x-scale}}{x-scale}\right) \cdot \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{y-scale}}{y-scale} \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* (/ angle 180.0) PI))
        (t_1 (sin t_0))
        (t_2 (cos t_0))
        (t_3
         (/
          (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_1) t_2) x-scale)
          y-scale)))
   (-
    (* t_3 t_3)
    (*
     (*
      4.0
      (/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) x-scale) x-scale))
     (/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) y-scale) y-scale)))))
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 = sin(t_0);
	double t_2 = cos(t_0);
	double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale;
	return (t_3 * t_3) - ((4.0 * (((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale)) * (((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale));
}
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.sin(t_0);
	double t_2 = Math.cos(t_0);
	double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale;
	return (t_3 * t_3) - ((4.0 * (((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale)) * (((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale));
}
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = (angle / 180.0) * math.pi
	t_1 = math.sin(t_0)
	t_2 = math.cos(t_0)
	t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale
	return (t_3 * t_3) - ((4.0 * (((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale)) * (((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale))
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(Float64(angle / 180.0) * pi)
	t_1 = sin(t_0)
	t_2 = cos(t_0)
	t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale)
	return Float64(Float64(t_3 * t_3) - Float64(Float64(4.0 * Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale)) * Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale)))
end
function tmp = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = (angle / 180.0) * pi;
	t_1 = sin(t_0);
	t_2 = cos(t_0);
	t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale;
	tmp = (t_3 * t_3) - ((4.0 * (((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale)) * (((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale));
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[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[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$1), $MachinePrecision] * t$95$2), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, N[(N[(t$95$3 * t$95$3), $MachinePrecision] - N[(N[(4.0 * 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] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] * 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] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 6 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: 24.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{angle}{180} \cdot \pi\\ t_1 := \sin t\_0\\ t_2 := \cos t\_0\\ t_3 := \frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_1\right) \cdot t\_2}{x-scale}}{y-scale}\\ t\_3 \cdot t\_3 - \left(4 \cdot \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{x-scale}}{x-scale}\right) \cdot \frac{\frac{{\left(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{y-scale}}{y-scale} \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* (/ angle 180.0) PI))
        (t_1 (sin t_0))
        (t_2 (cos t_0))
        (t_3
         (/
          (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_1) t_2) x-scale)
          y-scale)))
   (-
    (* t_3 t_3)
    (*
     (*
      4.0
      (/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) x-scale) x-scale))
     (/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) y-scale) y-scale)))))
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 = sin(t_0);
	double t_2 = cos(t_0);
	double t_3 = ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale;
	return (t_3 * t_3) - ((4.0 * (((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale)) * (((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale));
}
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.sin(t_0);
	double t_2 = Math.cos(t_0);
	double t_3 = ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale;
	return (t_3 * t_3) - ((4.0 * (((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale)) * (((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale));
}
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = (angle / 180.0) * math.pi
	t_1 = math.sin(t_0)
	t_2 = math.cos(t_0)
	t_3 = ((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale
	return (t_3 * t_3) - ((4.0 * (((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale)) * (((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale))
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(Float64(angle / 180.0) * pi)
	t_1 = sin(t_0)
	t_2 = cos(t_0)
	t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale)
	return Float64(Float64(t_3 * t_3) - Float64(Float64(4.0 * Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale)) * Float64(Float64(Float64((Float64(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale)))
end
function tmp = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = (angle / 180.0) * pi;
	t_1 = sin(t_0);
	t_2 = cos(t_0);
	t_3 = ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale;
	tmp = (t_3 * t_3) - ((4.0 * (((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale)) * (((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale));
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[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[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$1), $MachinePrecision] * t$95$2), $MachinePrecision] / x$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]}, N[(N[(t$95$3 * t$95$3), $MachinePrecision] - N[(N[(4.0 * 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] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] * 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] / y$45$scale), $MachinePrecision] / y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

Alternative 1: 87.3% accurate, 62.6× speedup?

\[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ \begin{array}{l} \mathbf{if}\;x-scale\_m \leq 5.5 \cdot 10^{-95}:\\ \;\;\;\;\frac{\frac{a}{\frac{y-scale}{-4}}}{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{x-scale\_m}{a \cdot b}}}}\\ \mathbf{elif}\;x-scale\_m \leq 4.8 \cdot 10^{+159}:\\ \;\;\;\;\frac{\frac{a \cdot b}{\frac{y-scale}{-4}}}{y-scale \cdot \frac{x-scale\_m}{\frac{a \cdot b}{x-scale\_m}}}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \frac{\frac{a}{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale\_m}{a}}\\ \end{array} \end{array} \]
x-scale_m = (fabs.f64 x-scale)
(FPCore (a b angle x-scale_m y-scale)
 :precision binary64
 (if (<= x-scale_m 5.5e-95)
   (/
    (/ a (/ y-scale -4.0))
    (/ (* x-scale_m y-scale) (/ b (/ x-scale_m (* a b)))))
   (if (<= x-scale_m 4.8e+159)
     (/
      (/ (* a b) (/ y-scale -4.0))
      (* y-scale (/ x-scale_m (/ (* a b) x-scale_m))))
     (*
      b
      (/
       (/ a (/ (* x-scale_m y-scale) (/ b (/ y-scale -4.0))))
       (/ x-scale_m a))))))
x-scale_m = fabs(x_45_scale);
double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	double tmp;
	if (x_45_scale_m <= 5.5e-95) {
		tmp = (a / (y_45_scale / -4.0)) / ((x_45_scale_m * y_45_scale) / (b / (x_45_scale_m / (a * b))));
	} else if (x_45_scale_m <= 4.8e+159) {
		tmp = ((a * b) / (y_45_scale / -4.0)) / (y_45_scale * (x_45_scale_m / ((a * b) / x_45_scale_m)));
	} else {
		tmp = b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a));
	}
	return tmp;
}
x-scale_m = abs(x_45scale)
real(8) function code(a, b, angle, x_45scale_m, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale_m
    real(8), intent (in) :: y_45scale
    real(8) :: tmp
    if (x_45scale_m <= 5.5d-95) then
        tmp = (a / (y_45scale / (-4.0d0))) / ((x_45scale_m * y_45scale) / (b / (x_45scale_m / (a * b))))
    else if (x_45scale_m <= 4.8d+159) then
        tmp = ((a * b) / (y_45scale / (-4.0d0))) / (y_45scale * (x_45scale_m / ((a * b) / x_45scale_m)))
    else
        tmp = b * ((a / ((x_45scale_m * y_45scale) / (b / (y_45scale / (-4.0d0))))) / (x_45scale_m / a))
    end if
    code = tmp
end function
x-scale_m = Math.abs(x_45_scale);
public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	double tmp;
	if (x_45_scale_m <= 5.5e-95) {
		tmp = (a / (y_45_scale / -4.0)) / ((x_45_scale_m * y_45_scale) / (b / (x_45_scale_m / (a * b))));
	} else if (x_45_scale_m <= 4.8e+159) {
		tmp = ((a * b) / (y_45_scale / -4.0)) / (y_45_scale * (x_45_scale_m / ((a * b) / x_45_scale_m)));
	} else {
		tmp = b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a));
	}
	return tmp;
}
x-scale_m = math.fabs(x_45_scale)
def code(a, b, angle, x_45_scale_m, y_45_scale):
	tmp = 0
	if x_45_scale_m <= 5.5e-95:
		tmp = (a / (y_45_scale / -4.0)) / ((x_45_scale_m * y_45_scale) / (b / (x_45_scale_m / (a * b))))
	elif x_45_scale_m <= 4.8e+159:
		tmp = ((a * b) / (y_45_scale / -4.0)) / (y_45_scale * (x_45_scale_m / ((a * b) / x_45_scale_m)))
	else:
		tmp = b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a))
	return tmp
x-scale_m = abs(x_45_scale)
function code(a, b, angle, x_45_scale_m, y_45_scale)
	tmp = 0.0
	if (x_45_scale_m <= 5.5e-95)
		tmp = Float64(Float64(a / Float64(y_45_scale / -4.0)) / Float64(Float64(x_45_scale_m * y_45_scale) / Float64(b / Float64(x_45_scale_m / Float64(a * b)))));
	elseif (x_45_scale_m <= 4.8e+159)
		tmp = Float64(Float64(Float64(a * b) / Float64(y_45_scale / -4.0)) / Float64(y_45_scale * Float64(x_45_scale_m / Float64(Float64(a * b) / x_45_scale_m))));
	else
		tmp = Float64(b * Float64(Float64(a / Float64(Float64(x_45_scale_m * y_45_scale) / Float64(b / Float64(y_45_scale / -4.0)))) / Float64(x_45_scale_m / a)));
	end
	return tmp
end
x-scale_m = abs(x_45_scale);
function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale)
	tmp = 0.0;
	if (x_45_scale_m <= 5.5e-95)
		tmp = (a / (y_45_scale / -4.0)) / ((x_45_scale_m * y_45_scale) / (b / (x_45_scale_m / (a * b))));
	elseif (x_45_scale_m <= 4.8e+159)
		tmp = ((a * b) / (y_45_scale / -4.0)) / (y_45_scale * (x_45_scale_m / ((a * b) / x_45_scale_m)));
	else
		tmp = b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a));
	end
	tmp_2 = tmp;
end
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale_] := If[LessEqual[x$45$scale$95$m, 5.5e-95], N[(N[(a / N[(y$45$scale / -4.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale$95$m * y$45$scale), $MachinePrecision] / N[(b / N[(x$45$scale$95$m / N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale$95$m, 4.8e+159], N[(N[(N[(a * b), $MachinePrecision] / N[(y$45$scale / -4.0), $MachinePrecision]), $MachinePrecision] / N[(y$45$scale * N[(x$45$scale$95$m / N[(N[(a * b), $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(a / N[(N[(x$45$scale$95$m * y$45$scale), $MachinePrecision] / N[(b / N[(y$45$scale / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale$95$m / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x-scale_m = \left|x-scale\right|

\\
\begin{array}{l}
\mathbf{if}\;x-scale\_m \leq 5.5 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{a}{\frac{y-scale}{-4}}}{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{x-scale\_m}{a \cdot b}}}}\\

\mathbf{elif}\;x-scale\_m \leq 4.8 \cdot 10^{+159}:\\
\;\;\;\;\frac{\frac{a \cdot b}{\frac{y-scale}{-4}}}{y-scale \cdot \frac{x-scale\_m}{\frac{a \cdot b}{x-scale\_m}}}\\

\mathbf{else}:\\
\;\;\;\;b \cdot \frac{\frac{a}{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale\_m}{a}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x-scale < 5.50000000000000003e-95

    1. Initial program 20.1%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
      3. times-fracN/A

        \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
      6. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      14. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
      17. *-lowering-*.f6454.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
    5. Simplified54.1%

      \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
      4. frac-timesN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
      6. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
      13. *-lowering-*.f6468.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
    7. Applied egg-rr68.0%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot \left(a \cdot a\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      2. unswap-sqrN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, a\right), \left(b \cdot a\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      5. *-lowering-*.f6482.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, a\right), \mathsf{*.f64}\left(b, a\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
    9. Applied egg-rr82.0%

      \[\leadsto \frac{\frac{\color{blue}{\left(b \cdot a\right) \cdot \left(b \cdot a\right)}}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{\left(b \cdot a\right) \cdot \left(b \cdot a\right)}{x-scale}}{\color{blue}{y-scale} \cdot x-scale} \]
      2. clear-numN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{1}{\frac{x-scale}{\left(b \cdot a\right) \cdot \left(b \cdot a\right)}}}{y-scale \cdot x-scale} \]
      3. associate-*r*N/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{1}{\frac{x-scale}{\left(\left(b \cdot a\right) \cdot b\right) \cdot a}}}{y-scale \cdot x-scale} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{1}{\frac{x-scale}{\left(b \cdot \left(b \cdot a\right)\right) \cdot a}}}{y-scale \cdot x-scale} \]
      5. associate-/r*N/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{1}{\frac{\frac{x-scale}{b \cdot \left(b \cdot a\right)}}{a}}}{y-scale \cdot x-scale} \]
      6. clear-numN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{a}{\frac{x-scale}{b \cdot \left(b \cdot a\right)}}}{y-scale \cdot x-scale} \]
      7. associate-/l*N/A

        \[\leadsto \frac{\frac{\frac{-4}{y-scale} \cdot a}{\frac{x-scale}{b \cdot \left(b \cdot a\right)}}}{\color{blue}{y-scale} \cdot x-scale} \]
      8. associate-/l/N/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot a}{\color{blue}{\left(y-scale \cdot x-scale\right) \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}}} \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-4}{y-scale} \cdot a\right), \color{blue}{\left(\left(y-scale \cdot x-scale\right) \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)}\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \frac{-4}{y-scale}\right), \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)\right) \]
      11. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \frac{1}{\frac{y-scale}{-4}}\right), \left(\left(y-scale \cdot \color{blue}{x-scale}\right) \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)\right) \]
      12. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{\frac{y-scale}{-4}}\right), \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{y-scale}{-4}\right)\right), \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(y-scale, -4\right)\right), \left(\left(y-scale \cdot \color{blue}{x-scale}\right) \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)\right) \]
      15. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(y-scale, -4\right)\right), \left(\left(y-scale \cdot x-scale\right) \cdot \frac{\frac{x-scale}{b}}{\color{blue}{b \cdot a}}\right)\right) \]
      16. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(y-scale, -4\right)\right), \left(\left(y-scale \cdot x-scale\right) \cdot \frac{1}{\color{blue}{\frac{b \cdot a}{\frac{x-scale}{b}}}}\right)\right) \]
      17. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(y-scale, -4\right)\right), \left(\frac{y-scale \cdot x-scale}{\color{blue}{\frac{b \cdot a}{\frac{x-scale}{b}}}}\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(y-scale, -4\right)\right), \mathsf{/.f64}\left(\left(y-scale \cdot x-scale\right), \color{blue}{\left(\frac{b \cdot a}{\frac{x-scale}{b}}\right)}\right)\right) \]
    11. Applied egg-rr85.4%

      \[\leadsto \color{blue}{\frac{\frac{a}{\frac{y-scale}{-4}}}{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{x-scale}{b \cdot a}}}}} \]

    if 5.50000000000000003e-95 < x-scale < 4.8e159

    1. Initial program 39.6%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
      3. times-fracN/A

        \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
      6. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      14. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
      17. *-lowering-*.f6462.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
    5. Simplified62.0%

      \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
      4. frac-timesN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
      6. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
      13. *-lowering-*.f6470.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
    7. Applied egg-rr70.0%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot \left(a \cdot a\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      2. unswap-sqrN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, a\right), \left(b \cdot a\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      5. *-lowering-*.f6479.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, a\right), \mathsf{*.f64}\left(b, a\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
    9. Applied egg-rr79.9%

      \[\leadsto \frac{\frac{\color{blue}{\left(b \cdot a\right) \cdot \left(b \cdot a\right)}}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale} \]
    10. Applied egg-rr92.9%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot a}{\frac{y-scale}{-4}}}{\frac{x-scale}{\frac{b \cdot a}{x-scale}} \cdot y-scale}} \]

    if 4.8e159 < x-scale

    1. Initial program 48.8%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
      3. times-fracN/A

        \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
      6. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      14. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
      17. *-lowering-*.f6454.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
    5. Simplified54.0%

      \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
      4. frac-timesN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
      6. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
      13. *-lowering-*.f6470.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
    7. Applied egg-rr70.3%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{\color{blue}{y-scale} \cdot x-scale} \]
      2. frac-timesN/A

        \[\leadsto \frac{\frac{-4}{y-scale}}{y-scale} \cdot \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{\color{blue}{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}}{x-scale} \]
      4. associate-/r*N/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{\color{blue}{x-scale \cdot x-scale}} \]
      5. frac-timesN/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \left(\frac{b}{x-scale} \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right) \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}} \]
      7. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(a \cdot a\right)}{x-scale} \cdot \color{blue}{\left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)} \]
      8. associate-/l*N/A

        \[\leadsto \left(b \cdot \frac{a \cdot a}{x-scale}\right) \cdot \left(\color{blue}{\frac{-4}{y-scale \cdot y-scale}} \cdot \frac{b}{x-scale}\right) \]
      9. associate-*l*N/A

        \[\leadsto b \cdot \color{blue}{\left(\frac{a \cdot a}{x-scale} \cdot \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)\right)} \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{a \cdot a}{x-scale} \cdot \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)\right)}\right) \]
      11. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a \cdot a}{x-scale} \cdot \frac{-4 \cdot b}{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}\right)\right) \]
      12. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a \cdot a}{x-scale} \cdot \frac{1}{\color{blue}{\frac{\left(y-scale \cdot y-scale\right) \cdot x-scale}{-4 \cdot b}}}\right)\right) \]
      13. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{\frac{a \cdot a}{x-scale}}{\color{blue}{\frac{\left(y-scale \cdot y-scale\right) \cdot x-scale}{-4 \cdot b}}}\right)\right) \]
      14. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(a \cdot \frac{a}{x-scale}\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
      16. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(a \cdot \frac{1}{\frac{x-scale}{a}}\right), \left(\frac{\left(y-scale \cdot y-scale\right) \cdot \color{blue}{x-scale}}{-4 \cdot b}\right)\right)\right) \]
      17. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(\frac{a}{\frac{x-scale}{a}}\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{x-scale}{a}\right)\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
      19. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(x-scale, a\right)\right), \left(\frac{\left(y-scale \cdot y-scale\right) \cdot \color{blue}{x-scale}}{-4 \cdot b}\right)\right)\right) \]
    9. Applied egg-rr73.8%

      \[\leadsto \color{blue}{b \cdot \frac{\frac{a}{\frac{x-scale}{a}}}{x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}}} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a}{\color{blue}{\left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right) \cdot \frac{x-scale}{a}}}\right)\right) \]
      2. associate-/r*N/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(\frac{a}{x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}}\right), \color{blue}{\left(\frac{x-scale}{a}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right)\right), \left(\frac{\color{blue}{x-scale}}{a}\right)\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\left(y-scale \cdot x-scale\right), \left(\frac{b}{\frac{y-scale}{-4}}\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
      8. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \left(\frac{b}{\frac{y-scale}{-4}}\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \left(\frac{y-scale}{-4}\right)\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \mathsf{/.f64}\left(y-scale, -4\right)\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
      12. /-lowering-/.f6484.9%

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \mathsf{/.f64}\left(y-scale, -4\right)\right)\right)\right), \mathsf{/.f64}\left(x-scale, \color{blue}{a}\right)\right)\right) \]
    11. Applied egg-rr84.9%

      \[\leadsto b \cdot \color{blue}{\frac{\frac{a}{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale}{a}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification86.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 5.5 \cdot 10^{-95}:\\ \;\;\;\;\frac{\frac{a}{\frac{y-scale}{-4}}}{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{x-scale}{a \cdot b}}}}\\ \mathbf{elif}\;x-scale \leq 4.8 \cdot 10^{+159}:\\ \;\;\;\;\frac{\frac{a \cdot b}{\frac{y-scale}{-4}}}{y-scale \cdot \frac{x-scale}{\frac{a \cdot b}{x-scale}}}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \frac{\frac{a}{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale}{a}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 83.1% accurate, 62.6× speedup?

\[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ \begin{array}{l} \mathbf{if}\;a \leq 1.1 \cdot 10^{-166}:\\ \;\;\;\;\frac{a \cdot \frac{\frac{-4}{y-scale}}{\frac{x-scale\_m}{b \cdot \left(a \cdot b\right)}}}{x-scale\_m \cdot y-scale}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{+115}:\\ \;\;\;\;\frac{\frac{-4}{y-scale}}{\frac{\frac{x-scale\_m}{b}}{a \cdot a} \cdot \left(y-scale \cdot \frac{x-scale\_m}{b}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot \left(\left(a \cdot b\right) \cdot \frac{\frac{-4}{y-scale}}{\frac{x-scale\_m}{b}}\right)}{x-scale\_m \cdot y-scale}\\ \end{array} \end{array} \]
x-scale_m = (fabs.f64 x-scale)
(FPCore (a b angle x-scale_m y-scale)
 :precision binary64
 (if (<= a 1.1e-166)
   (/
    (* a (/ (/ -4.0 y-scale) (/ x-scale_m (* b (* a b)))))
    (* x-scale_m y-scale))
   (if (<= a 6.6e+115)
     (/
      (/ -4.0 y-scale)
      (* (/ (/ x-scale_m b) (* a a)) (* y-scale (/ x-scale_m b))))
     (/
      (* a (* (* a b) (/ (/ -4.0 y-scale) (/ x-scale_m b))))
      (* x-scale_m y-scale)))))
x-scale_m = fabs(x_45_scale);
double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	double tmp;
	if (a <= 1.1e-166) {
		tmp = (a * ((-4.0 / y_45_scale) / (x_45_scale_m / (b * (a * b))))) / (x_45_scale_m * y_45_scale);
	} else if (a <= 6.6e+115) {
		tmp = (-4.0 / y_45_scale) / (((x_45_scale_m / b) / (a * a)) * (y_45_scale * (x_45_scale_m / b)));
	} else {
		tmp = (a * ((a * b) * ((-4.0 / y_45_scale) / (x_45_scale_m / b)))) / (x_45_scale_m * y_45_scale);
	}
	return tmp;
}
x-scale_m = abs(x_45scale)
real(8) function code(a, b, angle, x_45scale_m, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale_m
    real(8), intent (in) :: y_45scale
    real(8) :: tmp
    if (a <= 1.1d-166) then
        tmp = (a * (((-4.0d0) / y_45scale) / (x_45scale_m / (b * (a * b))))) / (x_45scale_m * y_45scale)
    else if (a <= 6.6d+115) then
        tmp = ((-4.0d0) / y_45scale) / (((x_45scale_m / b) / (a * a)) * (y_45scale * (x_45scale_m / b)))
    else
        tmp = (a * ((a * b) * (((-4.0d0) / y_45scale) / (x_45scale_m / b)))) / (x_45scale_m * y_45scale)
    end if
    code = tmp
end function
x-scale_m = Math.abs(x_45_scale);
public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	double tmp;
	if (a <= 1.1e-166) {
		tmp = (a * ((-4.0 / y_45_scale) / (x_45_scale_m / (b * (a * b))))) / (x_45_scale_m * y_45_scale);
	} else if (a <= 6.6e+115) {
		tmp = (-4.0 / y_45_scale) / (((x_45_scale_m / b) / (a * a)) * (y_45_scale * (x_45_scale_m / b)));
	} else {
		tmp = (a * ((a * b) * ((-4.0 / y_45_scale) / (x_45_scale_m / b)))) / (x_45_scale_m * y_45_scale);
	}
	return tmp;
}
x-scale_m = math.fabs(x_45_scale)
def code(a, b, angle, x_45_scale_m, y_45_scale):
	tmp = 0
	if a <= 1.1e-166:
		tmp = (a * ((-4.0 / y_45_scale) / (x_45_scale_m / (b * (a * b))))) / (x_45_scale_m * y_45_scale)
	elif a <= 6.6e+115:
		tmp = (-4.0 / y_45_scale) / (((x_45_scale_m / b) / (a * a)) * (y_45_scale * (x_45_scale_m / b)))
	else:
		tmp = (a * ((a * b) * ((-4.0 / y_45_scale) / (x_45_scale_m / b)))) / (x_45_scale_m * y_45_scale)
	return tmp
x-scale_m = abs(x_45_scale)
function code(a, b, angle, x_45_scale_m, y_45_scale)
	tmp = 0.0
	if (a <= 1.1e-166)
		tmp = Float64(Float64(a * Float64(Float64(-4.0 / y_45_scale) / Float64(x_45_scale_m / Float64(b * Float64(a * b))))) / Float64(x_45_scale_m * y_45_scale));
	elseif (a <= 6.6e+115)
		tmp = Float64(Float64(-4.0 / y_45_scale) / Float64(Float64(Float64(x_45_scale_m / b) / Float64(a * a)) * Float64(y_45_scale * Float64(x_45_scale_m / b))));
	else
		tmp = Float64(Float64(a * Float64(Float64(a * b) * Float64(Float64(-4.0 / y_45_scale) / Float64(x_45_scale_m / b)))) / Float64(x_45_scale_m * y_45_scale));
	end
	return tmp
end
x-scale_m = abs(x_45_scale);
function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale)
	tmp = 0.0;
	if (a <= 1.1e-166)
		tmp = (a * ((-4.0 / y_45_scale) / (x_45_scale_m / (b * (a * b))))) / (x_45_scale_m * y_45_scale);
	elseif (a <= 6.6e+115)
		tmp = (-4.0 / y_45_scale) / (((x_45_scale_m / b) / (a * a)) * (y_45_scale * (x_45_scale_m / b)));
	else
		tmp = (a * ((a * b) * ((-4.0 / y_45_scale) / (x_45_scale_m / b)))) / (x_45_scale_m * y_45_scale);
	end
	tmp_2 = tmp;
end
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale_] := If[LessEqual[a, 1.1e-166], N[(N[(a * N[(N[(-4.0 / y$45$scale), $MachinePrecision] / N[(x$45$scale$95$m / N[(b * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale$95$m * y$45$scale), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.6e+115], N[(N[(-4.0 / y$45$scale), $MachinePrecision] / N[(N[(N[(x$45$scale$95$m / b), $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(y$45$scale * N[(x$45$scale$95$m / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(a * b), $MachinePrecision] * N[(N[(-4.0 / y$45$scale), $MachinePrecision] / N[(x$45$scale$95$m / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale$95$m * y$45$scale), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x-scale_m = \left|x-scale\right|

\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.1 \cdot 10^{-166}:\\
\;\;\;\;\frac{a \cdot \frac{\frac{-4}{y-scale}}{\frac{x-scale\_m}{b \cdot \left(a \cdot b\right)}}}{x-scale\_m \cdot y-scale}\\

\mathbf{elif}\;a \leq 6.6 \cdot 10^{+115}:\\
\;\;\;\;\frac{\frac{-4}{y-scale}}{\frac{\frac{x-scale\_m}{b}}{a \cdot a} \cdot \left(y-scale \cdot \frac{x-scale\_m}{b}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{a \cdot \left(\left(a \cdot b\right) \cdot \frac{\frac{-4}{y-scale}}{\frac{x-scale\_m}{b}}\right)}{x-scale\_m \cdot y-scale}\\


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

    1. Initial program 30.9%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
      3. times-fracN/A

        \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
      6. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      14. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
      17. *-lowering-*.f6453.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
    5. Simplified53.3%

      \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
      4. frac-timesN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
      6. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
      13. *-lowering-*.f6468.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
    7. Applied egg-rr68.0%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-4}{y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}\right), \mathsf{*.f64}\left(\color{blue}{y-scale}, x-scale\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-4}{y-scale} \cdot \frac{1}{\frac{x-scale}{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}}\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      3. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{-4}{y-scale}}{\frac{x-scale}{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}}\right), \mathsf{*.f64}\left(\color{blue}{y-scale}, x-scale\right)\right) \]
      4. associate-*r*N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, \left(b \cdot \left(b \cdot a\right)\right)\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, \mathsf{*.f64}\left(b, \left(b \cdot a\right)\right)\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      13. *-lowering-*.f6484.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, a\right)\right)\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
    9. Applied egg-rr84.9%

      \[\leadsto \frac{\color{blue}{\frac{\frac{-4}{y-scale}}{\frac{x-scale}{b \cdot \left(b \cdot a\right)}} \cdot a}}{y-scale \cdot x-scale} \]

    if 1.1000000000000001e-166 < a < 6.6000000000000001e115

    1. Initial program 30.0%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
      3. times-fracN/A

        \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
      6. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      14. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
      17. *-lowering-*.f6469.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
    5. Simplified69.9%

      \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
      4. frac-timesN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
      6. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
      13. *-lowering-*.f6479.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
    7. Applied egg-rr79.2%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{\color{blue}{y-scale} \cdot x-scale} \]
      2. frac-timesN/A

        \[\leadsto \frac{\frac{-4}{y-scale}}{y-scale} \cdot \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{\color{blue}{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}}{x-scale} \]
      4. associate-/r*N/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{\color{blue}{x-scale \cdot x-scale}} \]
      5. frac-timesN/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \left(\frac{b}{x-scale} \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right) \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}} \]
      7. clear-numN/A

        \[\leadsto \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right) \cdot \frac{1}{\color{blue}{\frac{x-scale}{b \cdot \left(a \cdot a\right)}}} \]
      8. un-div-invN/A

        \[\leadsto \frac{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}}{\color{blue}{\frac{x-scale}{b \cdot \left(a \cdot a\right)}}} \]
      9. clear-numN/A

        \[\leadsto \frac{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{1}{\frac{x-scale}{b}}}{\frac{x-scale}{b \cdot \left(a \cdot a\right)}} \]
      10. un-div-invN/A

        \[\leadsto \frac{\frac{\frac{-4}{y-scale \cdot y-scale}}{\frac{x-scale}{b}}}{\frac{\color{blue}{x-scale}}{b \cdot \left(a \cdot a\right)}} \]
      11. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{\frac{-4}{y-scale}}{y-scale}}{\frac{x-scale}{b}}}{\frac{x-scale}{b \cdot \left(a \cdot a\right)}} \]
      12. associate-/l/N/A

        \[\leadsto \frac{\frac{\frac{-4}{y-scale}}{\frac{x-scale}{b} \cdot y-scale}}{\frac{\color{blue}{x-scale}}{b \cdot \left(a \cdot a\right)}} \]
      13. associate-/l/N/A

        \[\leadsto \frac{\frac{-4}{y-scale}}{\color{blue}{\frac{x-scale}{b \cdot \left(a \cdot a\right)} \cdot \left(\frac{x-scale}{b} \cdot y-scale\right)}} \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-4}{y-scale}\right), \color{blue}{\left(\frac{x-scale}{b \cdot \left(a \cdot a\right)} \cdot \left(\frac{x-scale}{b} \cdot y-scale\right)\right)}\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \left(\color{blue}{\frac{x-scale}{b \cdot \left(a \cdot a\right)}} \cdot \left(\frac{x-scale}{b} \cdot y-scale\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{*.f64}\left(\left(\frac{x-scale}{b \cdot \left(a \cdot a\right)}\right), \color{blue}{\left(\frac{x-scale}{b} \cdot y-scale\right)}\right)\right) \]
    9. Applied egg-rr93.2%

      \[\leadsto \color{blue}{\frac{\frac{-4}{y-scale}}{\frac{\frac{x-scale}{b}}{a \cdot a} \cdot \left(\frac{x-scale}{b} \cdot y-scale\right)}} \]

    if 6.6000000000000001e115 < a

    1. Initial program 3.0%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
      3. times-fracN/A

        \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
      6. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      14. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
      17. *-lowering-*.f6439.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
    5. Simplified39.6%

      \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
      4. frac-timesN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
      6. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
      13. *-lowering-*.f6451.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
    7. Applied egg-rr51.7%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-4}{y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}\right), \mathsf{*.f64}\left(\color{blue}{y-scale}, x-scale\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-4}{y-scale} \cdot \frac{1}{\frac{x-scale}{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}}\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      3. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{-4}{y-scale}}{\frac{x-scale}{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}}\right), \mathsf{*.f64}\left(\color{blue}{y-scale}, x-scale\right)\right) \]
      4. associate-*r*N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, \left(b \cdot \left(b \cdot a\right)\right)\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, \mathsf{*.f64}\left(b, \left(b \cdot a\right)\right)\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      13. *-lowering-*.f6465.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, a\right)\right)\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
    9. Applied egg-rr65.4%

      \[\leadsto \frac{\color{blue}{\frac{\frac{-4}{y-scale}}{\frac{x-scale}{b \cdot \left(b \cdot a\right)}} \cdot a}}{y-scale \cdot x-scale} \]
    10. Step-by-step derivation
      1. associate-/r*N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, b\right)\right), \left(b \cdot a\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      7. *-lowering-*.f6473.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, b\right)\right), \mathsf{*.f64}\left(b, a\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
    11. Applied egg-rr73.6%

      \[\leadsto \frac{\color{blue}{\left(\frac{\frac{-4}{y-scale}}{\frac{x-scale}{b}} \cdot \left(b \cdot a\right)\right)} \cdot a}{y-scale \cdot x-scale} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.1 \cdot 10^{-166}:\\ \;\;\;\;\frac{a \cdot \frac{\frac{-4}{y-scale}}{\frac{x-scale}{b \cdot \left(a \cdot b\right)}}}{x-scale \cdot y-scale}\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{+115}:\\ \;\;\;\;\frac{\frac{-4}{y-scale}}{\frac{\frac{x-scale}{b}}{a \cdot a} \cdot \left(y-scale \cdot \frac{x-scale}{b}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot \left(\left(a \cdot b\right) \cdot \frac{\frac{-4}{y-scale}}{\frac{x-scale}{b}}\right)}{x-scale \cdot y-scale}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 83.1% accurate, 76.9× speedup?

\[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 8.8 \cdot 10^{-125}:\\ \;\;\;\;b \cdot \frac{\frac{a}{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale\_m}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{\frac{y-scale}{-4}}}{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{x-scale\_m}{a \cdot b}}}}\\ \end{array} \end{array} \]
x-scale_m = (fabs.f64 x-scale)
(FPCore (a b angle x-scale_m y-scale)
 :precision binary64
 (if (<= b 8.8e-125)
   (*
    b
    (/ (/ a (/ (* x-scale_m y-scale) (/ b (/ y-scale -4.0)))) (/ x-scale_m a)))
   (/
    (/ a (/ y-scale -4.0))
    (/ (* x-scale_m y-scale) (/ b (/ x-scale_m (* a b)))))))
x-scale_m = fabs(x_45_scale);
double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	double tmp;
	if (b <= 8.8e-125) {
		tmp = b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a));
	} else {
		tmp = (a / (y_45_scale / -4.0)) / ((x_45_scale_m * y_45_scale) / (b / (x_45_scale_m / (a * b))));
	}
	return tmp;
}
x-scale_m = abs(x_45scale)
real(8) function code(a, b, angle, x_45scale_m, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale_m
    real(8), intent (in) :: y_45scale
    real(8) :: tmp
    if (b <= 8.8d-125) then
        tmp = b * ((a / ((x_45scale_m * y_45scale) / (b / (y_45scale / (-4.0d0))))) / (x_45scale_m / a))
    else
        tmp = (a / (y_45scale / (-4.0d0))) / ((x_45scale_m * y_45scale) / (b / (x_45scale_m / (a * b))))
    end if
    code = tmp
end function
x-scale_m = Math.abs(x_45_scale);
public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	double tmp;
	if (b <= 8.8e-125) {
		tmp = b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a));
	} else {
		tmp = (a / (y_45_scale / -4.0)) / ((x_45_scale_m * y_45_scale) / (b / (x_45_scale_m / (a * b))));
	}
	return tmp;
}
x-scale_m = math.fabs(x_45_scale)
def code(a, b, angle, x_45_scale_m, y_45_scale):
	tmp = 0
	if b <= 8.8e-125:
		tmp = b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a))
	else:
		tmp = (a / (y_45_scale / -4.0)) / ((x_45_scale_m * y_45_scale) / (b / (x_45_scale_m / (a * b))))
	return tmp
x-scale_m = abs(x_45_scale)
function code(a, b, angle, x_45_scale_m, y_45_scale)
	tmp = 0.0
	if (b <= 8.8e-125)
		tmp = Float64(b * Float64(Float64(a / Float64(Float64(x_45_scale_m * y_45_scale) / Float64(b / Float64(y_45_scale / -4.0)))) / Float64(x_45_scale_m / a)));
	else
		tmp = Float64(Float64(a / Float64(y_45_scale / -4.0)) / Float64(Float64(x_45_scale_m * y_45_scale) / Float64(b / Float64(x_45_scale_m / Float64(a * b)))));
	end
	return tmp
end
x-scale_m = abs(x_45_scale);
function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale)
	tmp = 0.0;
	if (b <= 8.8e-125)
		tmp = b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a));
	else
		tmp = (a / (y_45_scale / -4.0)) / ((x_45_scale_m * y_45_scale) / (b / (x_45_scale_m / (a * b))));
	end
	tmp_2 = tmp;
end
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale_] := If[LessEqual[b, 8.8e-125], N[(b * N[(N[(a / N[(N[(x$45$scale$95$m * y$45$scale), $MachinePrecision] / N[(b / N[(y$45$scale / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale$95$m / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a / N[(y$45$scale / -4.0), $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale$95$m * y$45$scale), $MachinePrecision] / N[(b / N[(x$45$scale$95$m / N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x-scale_m = \left|x-scale\right|

\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.8 \cdot 10^{-125}:\\
\;\;\;\;b \cdot \frac{\frac{a}{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale\_m}{a}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{a}{\frac{y-scale}{-4}}}{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{x-scale\_m}{a \cdot b}}}}\\


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

    1. Initial program 30.6%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
      3. times-fracN/A

        \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
      6. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      14. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
      17. *-lowering-*.f6455.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
    5. Simplified55.6%

      \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
      4. frac-timesN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
      6. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
      13. *-lowering-*.f6467.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
    7. Applied egg-rr67.9%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{\color{blue}{y-scale} \cdot x-scale} \]
      2. frac-timesN/A

        \[\leadsto \frac{\frac{-4}{y-scale}}{y-scale} \cdot \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{\color{blue}{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}}{x-scale} \]
      4. associate-/r*N/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{\color{blue}{x-scale \cdot x-scale}} \]
      5. frac-timesN/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \left(\frac{b}{x-scale} \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right) \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}} \]
      7. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(a \cdot a\right)}{x-scale} \cdot \color{blue}{\left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)} \]
      8. associate-/l*N/A

        \[\leadsto \left(b \cdot \frac{a \cdot a}{x-scale}\right) \cdot \left(\color{blue}{\frac{-4}{y-scale \cdot y-scale}} \cdot \frac{b}{x-scale}\right) \]
      9. associate-*l*N/A

        \[\leadsto b \cdot \color{blue}{\left(\frac{a \cdot a}{x-scale} \cdot \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)\right)} \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{a \cdot a}{x-scale} \cdot \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)\right)}\right) \]
      11. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a \cdot a}{x-scale} \cdot \frac{-4 \cdot b}{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}\right)\right) \]
      12. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a \cdot a}{x-scale} \cdot \frac{1}{\color{blue}{\frac{\left(y-scale \cdot y-scale\right) \cdot x-scale}{-4 \cdot b}}}\right)\right) \]
      13. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{\frac{a \cdot a}{x-scale}}{\color{blue}{\frac{\left(y-scale \cdot y-scale\right) \cdot x-scale}{-4 \cdot b}}}\right)\right) \]
      14. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(a \cdot \frac{a}{x-scale}\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
      16. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(a \cdot \frac{1}{\frac{x-scale}{a}}\right), \left(\frac{\left(y-scale \cdot y-scale\right) \cdot \color{blue}{x-scale}}{-4 \cdot b}\right)\right)\right) \]
      17. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(\frac{a}{\frac{x-scale}{a}}\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{x-scale}{a}\right)\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
      19. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(x-scale, a\right)\right), \left(\frac{\left(y-scale \cdot y-scale\right) \cdot \color{blue}{x-scale}}{-4 \cdot b}\right)\right)\right) \]
    9. Applied egg-rr78.6%

      \[\leadsto \color{blue}{b \cdot \frac{\frac{a}{\frac{x-scale}{a}}}{x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}}} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a}{\color{blue}{\left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right) \cdot \frac{x-scale}{a}}}\right)\right) \]
      2. associate-/r*N/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(\frac{a}{x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}}\right), \color{blue}{\left(\frac{x-scale}{a}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right)\right), \left(\frac{\color{blue}{x-scale}}{a}\right)\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\left(y-scale \cdot x-scale\right), \left(\frac{b}{\frac{y-scale}{-4}}\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
      8. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \left(\frac{b}{\frac{y-scale}{-4}}\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \left(\frac{y-scale}{-4}\right)\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \mathsf{/.f64}\left(y-scale, -4\right)\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
      12. /-lowering-/.f6485.0%

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \mathsf{/.f64}\left(y-scale, -4\right)\right)\right)\right), \mathsf{/.f64}\left(x-scale, \color{blue}{a}\right)\right)\right) \]
    11. Applied egg-rr85.0%

      \[\leadsto b \cdot \color{blue}{\frac{\frac{a}{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale}{a}}} \]

    if 8.79999999999999979e-125 < b

    1. Initial program 18.1%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
      3. times-fracN/A

        \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
      6. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      14. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
      17. *-lowering-*.f6455.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
    5. Simplified55.6%

      \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
      4. frac-timesN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
      6. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
      13. *-lowering-*.f6470.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
    7. Applied egg-rr70.1%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot \left(a \cdot a\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      2. unswap-sqrN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, a\right), \left(b \cdot a\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      5. *-lowering-*.f6480.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(b, a\right), \mathsf{*.f64}\left(b, a\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
    9. Applied egg-rr80.1%

      \[\leadsto \frac{\frac{\color{blue}{\left(b \cdot a\right) \cdot \left(b \cdot a\right)}}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{\left(b \cdot a\right) \cdot \left(b \cdot a\right)}{x-scale}}{\color{blue}{y-scale} \cdot x-scale} \]
      2. clear-numN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{1}{\frac{x-scale}{\left(b \cdot a\right) \cdot \left(b \cdot a\right)}}}{y-scale \cdot x-scale} \]
      3. associate-*r*N/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{1}{\frac{x-scale}{\left(\left(b \cdot a\right) \cdot b\right) \cdot a}}}{y-scale \cdot x-scale} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{1}{\frac{x-scale}{\left(b \cdot \left(b \cdot a\right)\right) \cdot a}}}{y-scale \cdot x-scale} \]
      5. associate-/r*N/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{1}{\frac{\frac{x-scale}{b \cdot \left(b \cdot a\right)}}{a}}}{y-scale \cdot x-scale} \]
      6. clear-numN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{a}{\frac{x-scale}{b \cdot \left(b \cdot a\right)}}}{y-scale \cdot x-scale} \]
      7. associate-/l*N/A

        \[\leadsto \frac{\frac{\frac{-4}{y-scale} \cdot a}{\frac{x-scale}{b \cdot \left(b \cdot a\right)}}}{\color{blue}{y-scale} \cdot x-scale} \]
      8. associate-/l/N/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot a}{\color{blue}{\left(y-scale \cdot x-scale\right) \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}}} \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-4}{y-scale} \cdot a\right), \color{blue}{\left(\left(y-scale \cdot x-scale\right) \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)}\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \frac{-4}{y-scale}\right), \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)\right) \]
      11. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \frac{1}{\frac{y-scale}{-4}}\right), \left(\left(y-scale \cdot \color{blue}{x-scale}\right) \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)\right) \]
      12. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{\frac{y-scale}{-4}}\right), \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{y-scale}{-4}\right)\right), \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(y-scale, -4\right)\right), \left(\left(y-scale \cdot \color{blue}{x-scale}\right) \cdot \frac{x-scale}{b \cdot \left(b \cdot a\right)}\right)\right) \]
      15. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(y-scale, -4\right)\right), \left(\left(y-scale \cdot x-scale\right) \cdot \frac{\frac{x-scale}{b}}{\color{blue}{b \cdot a}}\right)\right) \]
      16. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(y-scale, -4\right)\right), \left(\left(y-scale \cdot x-scale\right) \cdot \frac{1}{\color{blue}{\frac{b \cdot a}{\frac{x-scale}{b}}}}\right)\right) \]
      17. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(y-scale, -4\right)\right), \left(\frac{y-scale \cdot x-scale}{\color{blue}{\frac{b \cdot a}{\frac{x-scale}{b}}}}\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(y-scale, -4\right)\right), \mathsf{/.f64}\left(\left(y-scale \cdot x-scale\right), \color{blue}{\left(\frac{b \cdot a}{\frac{x-scale}{b}}\right)}\right)\right) \]
    11. Applied egg-rr89.3%

      \[\leadsto \color{blue}{\frac{\frac{a}{\frac{y-scale}{-4}}}{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{x-scale}{b \cdot a}}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 8.8 \cdot 10^{-125}:\\ \;\;\;\;b \cdot \frac{\frac{a}{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{\frac{y-scale}{-4}}}{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{x-scale}{a \cdot b}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 84.3% accurate, 76.9× speedup?

\[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ \begin{array}{l} \mathbf{if}\;x-scale\_m \leq 2.35 \cdot 10^{-43}:\\ \;\;\;\;\frac{a \cdot \left(\left(a \cdot b\right) \cdot \frac{\frac{-4}{y-scale}}{\frac{x-scale\_m}{b}}\right)}{x-scale\_m \cdot y-scale}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \frac{a}{\frac{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}{\frac{a}{x-scale\_m}}}\\ \end{array} \end{array} \]
x-scale_m = (fabs.f64 x-scale)
(FPCore (a b angle x-scale_m y-scale)
 :precision binary64
 (if (<= x-scale_m 2.35e-43)
   (/
    (* a (* (* a b) (/ (/ -4.0 y-scale) (/ x-scale_m b))))
    (* x-scale_m y-scale))
   (*
    b
    (/
     a
     (/ (/ (* x-scale_m y-scale) (/ b (/ y-scale -4.0))) (/ a x-scale_m))))))
x-scale_m = fabs(x_45_scale);
double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	double tmp;
	if (x_45_scale_m <= 2.35e-43) {
		tmp = (a * ((a * b) * ((-4.0 / y_45_scale) / (x_45_scale_m / b)))) / (x_45_scale_m * y_45_scale);
	} else {
		tmp = b * (a / (((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0))) / (a / x_45_scale_m)));
	}
	return tmp;
}
x-scale_m = abs(x_45scale)
real(8) function code(a, b, angle, x_45scale_m, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale_m
    real(8), intent (in) :: y_45scale
    real(8) :: tmp
    if (x_45scale_m <= 2.35d-43) then
        tmp = (a * ((a * b) * (((-4.0d0) / y_45scale) / (x_45scale_m / b)))) / (x_45scale_m * y_45scale)
    else
        tmp = b * (a / (((x_45scale_m * y_45scale) / (b / (y_45scale / (-4.0d0)))) / (a / x_45scale_m)))
    end if
    code = tmp
end function
x-scale_m = Math.abs(x_45_scale);
public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	double tmp;
	if (x_45_scale_m <= 2.35e-43) {
		tmp = (a * ((a * b) * ((-4.0 / y_45_scale) / (x_45_scale_m / b)))) / (x_45_scale_m * y_45_scale);
	} else {
		tmp = b * (a / (((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0))) / (a / x_45_scale_m)));
	}
	return tmp;
}
x-scale_m = math.fabs(x_45_scale)
def code(a, b, angle, x_45_scale_m, y_45_scale):
	tmp = 0
	if x_45_scale_m <= 2.35e-43:
		tmp = (a * ((a * b) * ((-4.0 / y_45_scale) / (x_45_scale_m / b)))) / (x_45_scale_m * y_45_scale)
	else:
		tmp = b * (a / (((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0))) / (a / x_45_scale_m)))
	return tmp
x-scale_m = abs(x_45_scale)
function code(a, b, angle, x_45_scale_m, y_45_scale)
	tmp = 0.0
	if (x_45_scale_m <= 2.35e-43)
		tmp = Float64(Float64(a * Float64(Float64(a * b) * Float64(Float64(-4.0 / y_45_scale) / Float64(x_45_scale_m / b)))) / Float64(x_45_scale_m * y_45_scale));
	else
		tmp = Float64(b * Float64(a / Float64(Float64(Float64(x_45_scale_m * y_45_scale) / Float64(b / Float64(y_45_scale / -4.0))) / Float64(a / x_45_scale_m))));
	end
	return tmp
end
x-scale_m = abs(x_45_scale);
function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale)
	tmp = 0.0;
	if (x_45_scale_m <= 2.35e-43)
		tmp = (a * ((a * b) * ((-4.0 / y_45_scale) / (x_45_scale_m / b)))) / (x_45_scale_m * y_45_scale);
	else
		tmp = b * (a / (((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0))) / (a / x_45_scale_m)));
	end
	tmp_2 = tmp;
end
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale_] := If[LessEqual[x$45$scale$95$m, 2.35e-43], N[(N[(a * N[(N[(a * b), $MachinePrecision] * N[(N[(-4.0 / y$45$scale), $MachinePrecision] / N[(x$45$scale$95$m / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale$95$m * y$45$scale), $MachinePrecision]), $MachinePrecision], N[(b * N[(a / N[(N[(N[(x$45$scale$95$m * y$45$scale), $MachinePrecision] / N[(b / N[(y$45$scale / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x-scale_m = \left|x-scale\right|

\\
\begin{array}{l}
\mathbf{if}\;x-scale\_m \leq 2.35 \cdot 10^{-43}:\\
\;\;\;\;\frac{a \cdot \left(\left(a \cdot b\right) \cdot \frac{\frac{-4}{y-scale}}{\frac{x-scale\_m}{b}}\right)}{x-scale\_m \cdot y-scale}\\

\mathbf{else}:\\
\;\;\;\;b \cdot \frac{a}{\frac{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}{\frac{a}{x-scale\_m}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x-scale < 2.35e-43

    1. Initial program 21.5%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
      3. times-fracN/A

        \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
      6. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      14. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
      17. *-lowering-*.f6453.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
    5. Simplified53.9%

      \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
      4. frac-timesN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
      6. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
      13. *-lowering-*.f6466.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
    7. Applied egg-rr66.9%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-4}{y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}\right), \mathsf{*.f64}\left(\color{blue}{y-scale}, x-scale\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-4}{y-scale} \cdot \frac{1}{\frac{x-scale}{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}}\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      3. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{-4}{y-scale}}{\frac{x-scale}{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}}\right), \mathsf{*.f64}\left(\color{blue}{y-scale}, x-scale\right)\right) \]
      4. associate-*r*N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, \left(b \cdot \left(b \cdot a\right)\right)\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, \mathsf{*.f64}\left(b, \left(b \cdot a\right)\right)\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      13. *-lowering-*.f6479.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, a\right)\right)\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
    9. Applied egg-rr79.2%

      \[\leadsto \frac{\color{blue}{\frac{\frac{-4}{y-scale}}{\frac{x-scale}{b \cdot \left(b \cdot a\right)}} \cdot a}}{y-scale \cdot x-scale} \]
    10. Step-by-step derivation
      1. associate-/r*N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, b\right)\right), \left(b \cdot a\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
      7. *-lowering-*.f6485.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(-4, y-scale\right), \mathsf{/.f64}\left(x-scale, b\right)\right), \mathsf{*.f64}\left(b, a\right)\right), a\right), \mathsf{*.f64}\left(y-scale, x-scale\right)\right) \]
    11. Applied egg-rr85.4%

      \[\leadsto \frac{\color{blue}{\left(\frac{\frac{-4}{y-scale}}{\frac{x-scale}{b}} \cdot \left(b \cdot a\right)\right)} \cdot a}{y-scale \cdot x-scale} \]

    if 2.35e-43 < x-scale

    1. Initial program 43.0%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
      3. times-fracN/A

        \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
      4. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
      6. unpow2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
      11. associate-*l*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      14. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
      17. *-lowering-*.f6460.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
    5. Simplified60.8%

      \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
      4. frac-timesN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
      6. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
      13. *-lowering-*.f6473.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
    7. Applied egg-rr73.6%

      \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{\color{blue}{y-scale} \cdot x-scale} \]
      2. frac-timesN/A

        \[\leadsto \frac{\frac{-4}{y-scale}}{y-scale} \cdot \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{\color{blue}{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}}{x-scale} \]
      4. associate-/r*N/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{\color{blue}{x-scale \cdot x-scale}} \]
      5. frac-timesN/A

        \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \left(\frac{b}{x-scale} \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right) \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}} \]
      7. *-commutativeN/A

        \[\leadsto \frac{b \cdot \left(a \cdot a\right)}{x-scale} \cdot \color{blue}{\left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)} \]
      8. associate-/l*N/A

        \[\leadsto \left(b \cdot \frac{a \cdot a}{x-scale}\right) \cdot \left(\color{blue}{\frac{-4}{y-scale \cdot y-scale}} \cdot \frac{b}{x-scale}\right) \]
      9. associate-*l*N/A

        \[\leadsto b \cdot \color{blue}{\left(\frac{a \cdot a}{x-scale} \cdot \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)\right)} \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{a \cdot a}{x-scale} \cdot \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)\right)}\right) \]
      11. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a \cdot a}{x-scale} \cdot \frac{-4 \cdot b}{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}\right)\right) \]
      12. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a \cdot a}{x-scale} \cdot \frac{1}{\color{blue}{\frac{\left(y-scale \cdot y-scale\right) \cdot x-scale}{-4 \cdot b}}}\right)\right) \]
      13. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{\frac{a \cdot a}{x-scale}}{\color{blue}{\frac{\left(y-scale \cdot y-scale\right) \cdot x-scale}{-4 \cdot b}}}\right)\right) \]
      14. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(a \cdot \frac{a}{x-scale}\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
      16. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(a \cdot \frac{1}{\frac{x-scale}{a}}\right), \left(\frac{\left(y-scale \cdot y-scale\right) \cdot \color{blue}{x-scale}}{-4 \cdot b}\right)\right)\right) \]
      17. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(\frac{a}{\frac{x-scale}{a}}\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{x-scale}{a}\right)\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
      19. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(x-scale, a\right)\right), \left(\frac{\left(y-scale \cdot y-scale\right) \cdot \color{blue}{x-scale}}{-4 \cdot b}\right)\right)\right) \]
    9. Applied egg-rr78.4%

      \[\leadsto \color{blue}{b \cdot \frac{\frac{a}{\frac{x-scale}{a}}}{x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}}} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \color{blue}{\left(\left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right) \cdot \frac{x-scale}{a}\right)}\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \left(\left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right) \cdot \frac{1}{\color{blue}{\frac{a}{x-scale}}}\right)\right)\right) \]
      4. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \left(\frac{x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}}{\color{blue}{\frac{a}{x-scale}}}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right), \color{blue}{\left(\frac{a}{x-scale}\right)}\right)\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\left(\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right), \left(\frac{\color{blue}{a}}{x-scale}\right)\right)\right)\right) \]
      7. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot x-scale\right), \left(\frac{b}{\frac{y-scale}{-4}}\right)\right), \left(\frac{\color{blue}{a}}{x-scale}\right)\right)\right)\right) \]
      9. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \left(\frac{b}{\frac{y-scale}{-4}}\right)\right), \left(\frac{a}{x-scale}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \left(\frac{y-scale}{-4}\right)\right)\right), \left(\frac{a}{x-scale}\right)\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \mathsf{/.f64}\left(y-scale, -4\right)\right)\right), \left(\frac{a}{x-scale}\right)\right)\right)\right) \]
      13. /-lowering-/.f6487.5%

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \mathsf{/.f64}\left(y-scale, -4\right)\right)\right), \mathsf{/.f64}\left(a, \color{blue}{x-scale}\right)\right)\right)\right) \]
    11. Applied egg-rr87.5%

      \[\leadsto b \cdot \color{blue}{\frac{a}{\frac{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}{\frac{a}{x-scale}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 2.35 \cdot 10^{-43}:\\ \;\;\;\;\frac{a \cdot \left(\left(a \cdot b\right) \cdot \frac{\frac{-4}{y-scale}}{\frac{x-scale}{b}}\right)}{x-scale \cdot y-scale}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \frac{a}{\frac{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}{\frac{a}{x-scale}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 82.9% accurate, 99.6× speedup?

\[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ b \cdot \frac{\frac{a}{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale\_m}{a}} \end{array} \]
x-scale_m = (fabs.f64 x-scale)
(FPCore (a b angle x-scale_m y-scale)
 :precision binary64
 (*
  b
  (/ (/ a (/ (* x-scale_m y-scale) (/ b (/ y-scale -4.0)))) (/ x-scale_m a))))
x-scale_m = fabs(x_45_scale);
double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	return b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a));
}
x-scale_m = abs(x_45scale)
real(8) function code(a, b, angle, x_45scale_m, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale_m
    real(8), intent (in) :: y_45scale
    code = b * ((a / ((x_45scale_m * y_45scale) / (b / (y_45scale / (-4.0d0))))) / (x_45scale_m / a))
end function
x-scale_m = Math.abs(x_45_scale);
public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	return b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a));
}
x-scale_m = math.fabs(x_45_scale)
def code(a, b, angle, x_45_scale_m, y_45_scale):
	return b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a))
x-scale_m = abs(x_45_scale)
function code(a, b, angle, x_45_scale_m, y_45_scale)
	return Float64(b * Float64(Float64(a / Float64(Float64(x_45_scale_m * y_45_scale) / Float64(b / Float64(y_45_scale / -4.0)))) / Float64(x_45_scale_m / a)))
end
x-scale_m = abs(x_45_scale);
function tmp = code(a, b, angle, x_45_scale_m, y_45_scale)
	tmp = b * ((a / ((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0)))) / (x_45_scale_m / a));
end
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale_] := N[(b * N[(N[(a / N[(N[(x$45$scale$95$m * y$45$scale), $MachinePrecision] / N[(b / N[(y$45$scale / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$45$scale$95$m / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x-scale_m = \left|x-scale\right|

\\
b \cdot \frac{\frac{a}{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale\_m}{a}}
\end{array}
Derivation
  1. Initial program 26.7%

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

    \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
  4. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    2. *-commutativeN/A

      \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
    3. times-fracN/A

      \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
    4. *-lowering-*.f64N/A

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
    6. unpow2N/A

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
    10. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
    11. associate-*l*N/A

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
    14. unpow2N/A

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
    16. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
    17. *-lowering-*.f6455.6%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
  5. Simplified55.6%

    \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
    2. associate-/r*N/A

      \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
    3. associate-/r*N/A

      \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
    4. frac-timesN/A

      \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
    5. *-commutativeN/A

      \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
    6. /-lowering-/.f64N/A

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
    13. *-lowering-*.f6468.6%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
  7. Applied egg-rr68.6%

    \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
  8. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{\color{blue}{y-scale} \cdot x-scale} \]
    2. frac-timesN/A

      \[\leadsto \frac{\frac{-4}{y-scale}}{y-scale} \cdot \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale}} \]
    3. associate-/r*N/A

      \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{\color{blue}{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}}{x-scale} \]
    4. associate-/r*N/A

      \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{\color{blue}{x-scale \cdot x-scale}} \]
    5. frac-timesN/A

      \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \left(\frac{b}{x-scale} \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}}\right) \]
    6. associate-*l*N/A

      \[\leadsto \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right) \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}} \]
    7. *-commutativeN/A

      \[\leadsto \frac{b \cdot \left(a \cdot a\right)}{x-scale} \cdot \color{blue}{\left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)} \]
    8. associate-/l*N/A

      \[\leadsto \left(b \cdot \frac{a \cdot a}{x-scale}\right) \cdot \left(\color{blue}{\frac{-4}{y-scale \cdot y-scale}} \cdot \frac{b}{x-scale}\right) \]
    9. associate-*l*N/A

      \[\leadsto b \cdot \color{blue}{\left(\frac{a \cdot a}{x-scale} \cdot \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)\right)} \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{a \cdot a}{x-scale} \cdot \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)\right)}\right) \]
    11. frac-timesN/A

      \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a \cdot a}{x-scale} \cdot \frac{-4 \cdot b}{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}\right)\right) \]
    12. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a \cdot a}{x-scale} \cdot \frac{1}{\color{blue}{\frac{\left(y-scale \cdot y-scale\right) \cdot x-scale}{-4 \cdot b}}}\right)\right) \]
    13. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{\frac{a \cdot a}{x-scale}}{\color{blue}{\frac{\left(y-scale \cdot y-scale\right) \cdot x-scale}{-4 \cdot b}}}\right)\right) \]
    14. /-lowering-/.f64N/A

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

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(a \cdot \frac{a}{x-scale}\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
    16. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(a \cdot \frac{1}{\frac{x-scale}{a}}\right), \left(\frac{\left(y-scale \cdot y-scale\right) \cdot \color{blue}{x-scale}}{-4 \cdot b}\right)\right)\right) \]
    17. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(\frac{a}{\frac{x-scale}{a}}\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
    18. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{x-scale}{a}\right)\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
    19. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(x-scale, a\right)\right), \left(\frac{\left(y-scale \cdot y-scale\right) \cdot \color{blue}{x-scale}}{-4 \cdot b}\right)\right)\right) \]
  9. Applied egg-rr76.1%

    \[\leadsto \color{blue}{b \cdot \frac{\frac{a}{\frac{x-scale}{a}}}{x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}}} \]
  10. Step-by-step derivation
    1. associate-/l/N/A

      \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a}{\color{blue}{\left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right) \cdot \frac{x-scale}{a}}}\right)\right) \]
    2. associate-/r*N/A

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

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(\frac{a}{x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}}\right), \color{blue}{\left(\frac{x-scale}{a}\right)}\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right)\right), \left(\frac{\color{blue}{x-scale}}{a}\right)\right)\right) \]
    5. associate-*r/N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
    6. *-commutativeN/A

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

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\left(y-scale \cdot x-scale\right), \left(\frac{b}{\frac{y-scale}{-4}}\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
    8. *-commutativeN/A

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

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \left(\frac{b}{\frac{y-scale}{-4}}\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \left(\frac{y-scale}{-4}\right)\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
    11. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \mathsf{/.f64}\left(y-scale, -4\right)\right)\right)\right), \left(\frac{x-scale}{a}\right)\right)\right) \]
    12. /-lowering-/.f6484.1%

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \mathsf{/.f64}\left(y-scale, -4\right)\right)\right)\right), \mathsf{/.f64}\left(x-scale, \color{blue}{a}\right)\right)\right) \]
  11. Applied egg-rr84.1%

    \[\leadsto b \cdot \color{blue}{\frac{\frac{a}{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}}{\frac{x-scale}{a}}} \]
  12. Add Preprocessing

Alternative 6: 82.9% accurate, 99.6× speedup?

\[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ b \cdot \frac{a}{\frac{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}{\frac{a}{x-scale\_m}}} \end{array} \]
x-scale_m = (fabs.f64 x-scale)
(FPCore (a b angle x-scale_m y-scale)
 :precision binary64
 (*
  b
  (/ a (/ (/ (* x-scale_m y-scale) (/ b (/ y-scale -4.0))) (/ a x-scale_m)))))
x-scale_m = fabs(x_45_scale);
double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	return b * (a / (((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0))) / (a / x_45_scale_m)));
}
x-scale_m = abs(x_45scale)
real(8) function code(a, b, angle, x_45scale_m, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale_m
    real(8), intent (in) :: y_45scale
    code = b * (a / (((x_45scale_m * y_45scale) / (b / (y_45scale / (-4.0d0)))) / (a / x_45scale_m)))
end function
x-scale_m = Math.abs(x_45_scale);
public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale) {
	return b * (a / (((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0))) / (a / x_45_scale_m)));
}
x-scale_m = math.fabs(x_45_scale)
def code(a, b, angle, x_45_scale_m, y_45_scale):
	return b * (a / (((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0))) / (a / x_45_scale_m)))
x-scale_m = abs(x_45_scale)
function code(a, b, angle, x_45_scale_m, y_45_scale)
	return Float64(b * Float64(a / Float64(Float64(Float64(x_45_scale_m * y_45_scale) / Float64(b / Float64(y_45_scale / -4.0))) / Float64(a / x_45_scale_m))))
end
x-scale_m = abs(x_45_scale);
function tmp = code(a, b, angle, x_45_scale_m, y_45_scale)
	tmp = b * (a / (((x_45_scale_m * y_45_scale) / (b / (y_45_scale / -4.0))) / (a / x_45_scale_m)));
end
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale_] := N[(b * N[(a / N[(N[(N[(x$45$scale$95$m * y$45$scale), $MachinePrecision] / N[(b / N[(y$45$scale / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x-scale_m = \left|x-scale\right|

\\
b \cdot \frac{a}{\frac{\frac{x-scale\_m \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}{\frac{a}{x-scale\_m}}}
\end{array}
Derivation
  1. Initial program 26.7%

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

    \[\leadsto \color{blue}{-4 \cdot \frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
  4. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{\color{blue}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    2. *-commutativeN/A

      \[\leadsto \frac{-4 \cdot \left({a}^{2} \cdot {b}^{2}\right)}{{y-scale}^{2} \cdot \color{blue}{{x-scale}^{2}}} \]
    3. times-fracN/A

      \[\leadsto \frac{-4}{{y-scale}^{2}} \cdot \color{blue}{\frac{{a}^{2} \cdot {b}^{2}}{{x-scale}^{2}}} \]
    4. *-lowering-*.f64N/A

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \left({y-scale}^{2}\right)\right), \left(\frac{\color{blue}{{a}^{2} \cdot {b}^{2}}}{{x-scale}^{2}}\right)\right) \]
    6. unpow2N/A

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({a}^{2} \cdot {b}^{2}\right), \color{blue}{\left({x-scale}^{2}\right)}\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left({b}^{2} \cdot {a}^{2}\right), \left({\color{blue}{x-scale}}^{2}\right)\right)\right) \]
    10. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\left(\left(b \cdot b\right) \cdot {a}^{2}\right), \left({x-scale}^{2}\right)\right)\right) \]
    11. associate-*l*N/A

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
    14. unpow2N/A

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left({x-scale}^{2}\right)\right)\right) \]
    16. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \left(x-scale \cdot \color{blue}{x-scale}\right)\right)\right) \]
    17. *-lowering-*.f6455.6%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-4, \mathsf{*.f64}\left(y-scale, y-scale\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(x-scale, \color{blue}{x-scale}\right)\right)\right) \]
  5. Simplified55.6%

    \[\leadsto \color{blue}{\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale}} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale \cdot x-scale} \cdot \color{blue}{\frac{-4}{y-scale \cdot y-scale}} \]
    2. associate-/r*N/A

      \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\color{blue}{-4}}{y-scale \cdot y-scale} \]
    3. associate-/r*N/A

      \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale} \cdot \frac{\frac{-4}{y-scale}}{\color{blue}{y-scale}} \]
    4. frac-timesN/A

      \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{\color{blue}{x-scale \cdot y-scale}} \]
    5. *-commutativeN/A

      \[\leadsto \frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot \color{blue}{x-scale}} \]
    6. /-lowering-/.f64N/A

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \left(y-scale \cdot x-scale\right)\right) \]
    13. *-lowering-*.f6468.6%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), x-scale\right), \mathsf{/.f64}\left(-4, y-scale\right)\right), \mathsf{*.f64}\left(y-scale, \color{blue}{x-scale}\right)\right) \]
  7. Applied egg-rr68.6%

    \[\leadsto \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale} \cdot \frac{-4}{y-scale}}{y-scale \cdot x-scale}} \]
  8. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{\frac{-4}{y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{\color{blue}{y-scale} \cdot x-scale} \]
    2. frac-timesN/A

      \[\leadsto \frac{\frac{-4}{y-scale}}{y-scale} \cdot \color{blue}{\frac{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}{x-scale}} \]
    3. associate-/r*N/A

      \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{\color{blue}{\frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{x-scale}}}{x-scale} \]
    4. associate-/r*N/A

      \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \frac{b \cdot \left(b \cdot \left(a \cdot a\right)\right)}{\color{blue}{x-scale \cdot x-scale}} \]
    5. frac-timesN/A

      \[\leadsto \frac{-4}{y-scale \cdot y-scale} \cdot \left(\frac{b}{x-scale} \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}}\right) \]
    6. associate-*l*N/A

      \[\leadsto \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right) \cdot \color{blue}{\frac{b \cdot \left(a \cdot a\right)}{x-scale}} \]
    7. *-commutativeN/A

      \[\leadsto \frac{b \cdot \left(a \cdot a\right)}{x-scale} \cdot \color{blue}{\left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)} \]
    8. associate-/l*N/A

      \[\leadsto \left(b \cdot \frac{a \cdot a}{x-scale}\right) \cdot \left(\color{blue}{\frac{-4}{y-scale \cdot y-scale}} \cdot \frac{b}{x-scale}\right) \]
    9. associate-*l*N/A

      \[\leadsto b \cdot \color{blue}{\left(\frac{a \cdot a}{x-scale} \cdot \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)\right)} \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{a \cdot a}{x-scale} \cdot \left(\frac{-4}{y-scale \cdot y-scale} \cdot \frac{b}{x-scale}\right)\right)}\right) \]
    11. frac-timesN/A

      \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a \cdot a}{x-scale} \cdot \frac{-4 \cdot b}{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}\right)\right) \]
    12. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{a \cdot a}{x-scale} \cdot \frac{1}{\color{blue}{\frac{\left(y-scale \cdot y-scale\right) \cdot x-scale}{-4 \cdot b}}}\right)\right) \]
    13. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{\frac{a \cdot a}{x-scale}}{\color{blue}{\frac{\left(y-scale \cdot y-scale\right) \cdot x-scale}{-4 \cdot b}}}\right)\right) \]
    14. /-lowering-/.f64N/A

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

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(a \cdot \frac{a}{x-scale}\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
    16. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(a \cdot \frac{1}{\frac{x-scale}{a}}\right), \left(\frac{\left(y-scale \cdot y-scale\right) \cdot \color{blue}{x-scale}}{-4 \cdot b}\right)\right)\right) \]
    17. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\left(\frac{a}{\frac{x-scale}{a}}\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
    18. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \left(\frac{x-scale}{a}\right)\right), \left(\frac{\color{blue}{\left(y-scale \cdot y-scale\right) \cdot x-scale}}{-4 \cdot b}\right)\right)\right) \]
    19. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, \mathsf{/.f64}\left(x-scale, a\right)\right), \left(\frac{\left(y-scale \cdot y-scale\right) \cdot \color{blue}{x-scale}}{-4 \cdot b}\right)\right)\right) \]
  9. Applied egg-rr76.1%

    \[\leadsto \color{blue}{b \cdot \frac{\frac{a}{\frac{x-scale}{a}}}{x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}}} \]
  10. Step-by-step derivation
    1. associate-/l/N/A

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

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \color{blue}{\left(\left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right) \cdot \frac{x-scale}{a}\right)}\right)\right) \]
    3. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \left(\left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right) \cdot \frac{1}{\color{blue}{\frac{a}{x-scale}}}\right)\right)\right) \]
    4. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \left(\frac{x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}}{\color{blue}{\frac{a}{x-scale}}}\right)\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\left(x-scale \cdot \frac{y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right), \color{blue}{\left(\frac{a}{x-scale}\right)}\right)\right)\right) \]
    6. associate-*r/N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\left(\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}\right), \left(\frac{\color{blue}{a}}{x-scale}\right)\right)\right)\right) \]
    7. *-commutativeN/A

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

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y-scale \cdot x-scale\right), \left(\frac{b}{\frac{y-scale}{-4}}\right)\right), \left(\frac{\color{blue}{a}}{x-scale}\right)\right)\right)\right) \]
    9. *-commutativeN/A

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

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \left(\frac{b}{\frac{y-scale}{-4}}\right)\right), \left(\frac{a}{x-scale}\right)\right)\right)\right) \]
    11. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \left(\frac{y-scale}{-4}\right)\right)\right), \left(\frac{a}{x-scale}\right)\right)\right)\right) \]
    12. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \mathsf{/.f64}\left(y-scale, -4\right)\right)\right), \left(\frac{a}{x-scale}\right)\right)\right)\right) \]
    13. /-lowering-/.f6484.0%

      \[\leadsto \mathsf{*.f64}\left(b, \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x-scale, y-scale\right), \mathsf{/.f64}\left(b, \mathsf{/.f64}\left(y-scale, -4\right)\right)\right), \mathsf{/.f64}\left(a, \color{blue}{x-scale}\right)\right)\right)\right) \]
  11. Applied egg-rr84.0%

    \[\leadsto b \cdot \color{blue}{\frac{a}{\frac{\frac{x-scale \cdot y-scale}{\frac{b}{\frac{y-scale}{-4}}}}{\frac{a}{x-scale}}}} \]
  12. Add Preprocessing

Reproduce

?
herbie shell --seed 2024185 
(FPCore (a b angle x-scale y-scale)
  :name "Simplification of discriminant from scale-rotated-ellipse"
  :precision binary64
  (- (* (/ (/ (* (* (* 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 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) PI))) (cos (* (/ angle 180.0) PI))) x-scale) y-scale)) (* (* 4.0 (/ (/ (+ (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))))