a from scale-rotated-ellipse

Percentage Accurate: 2.9% → 60.1%
Time: 40.6s
Alternatives: 17
Speedup: 919.0×

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(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{y-scale}}{y-scale}\\ t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{x-scale}}{x-scale}\\ t_5 := \left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\\ t_6 := \frac{4 \cdot t\_5}{{\left(x-scale \cdot y-scale\right)}^{2}}\\ \frac{-\sqrt{\left(\left(2 \cdot t\_6\right) \cdot t\_5\right) \cdot \left(\left(t\_4 + t\_3\right) + \sqrt{{\left(t\_4 - t\_3\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_1\right) \cdot t\_2}{x-scale}}{y-scale}\right)}^{2}}\right)}}{t\_6} \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
         (/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) y-scale) y-scale))
        (t_4
         (/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) x-scale) x-scale))
        (t_5 (* (* b a) (* b (- a))))
        (t_6 (/ (* 4.0 t_5) (pow (* x-scale y-scale) 2.0))))
   (/
    (-
     (sqrt
      (*
       (* (* 2.0 t_6) t_5)
       (+
        (+ t_4 t_3)
        (sqrt
         (+
          (pow (- t_4 t_3) 2.0)
          (pow
           (/
            (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_1) t_2) x-scale)
            y-scale)
           2.0)))))))
    t_6)))
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 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale;
	double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale;
	double t_5 = (b * a) * (b * -a);
	double t_6 = (4.0 * t_5) / pow((x_45_scale * y_45_scale), 2.0);
	return -sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + sqrt((pow((t_4 - t_3), 2.0) + pow((((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6;
}
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 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale;
	double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale;
	double t_5 = (b * a) * (b * -a);
	double t_6 = (4.0 * t_5) / Math.pow((x_45_scale * y_45_scale), 2.0);
	return -Math.sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + Math.sqrt((Math.pow((t_4 - t_3), 2.0) + Math.pow((((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6;
}
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 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale
	t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale
	t_5 = (b * a) * (b * -a)
	t_6 = (4.0 * t_5) / math.pow((x_45_scale * y_45_scale), 2.0)
	return -math.sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + math.sqrt((math.pow((t_4 - t_3), 2.0) + math.pow((((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6
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(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale)
	t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale)
	t_5 = Float64(Float64(b * a) * Float64(b * Float64(-a)))
	t_6 = Float64(Float64(4.0 * t_5) / (Float64(x_45_scale * y_45_scale) ^ 2.0))
	return Float64(Float64(-sqrt(Float64(Float64(Float64(2.0 * t_6) * t_5) * Float64(Float64(t_4 + t_3) + sqrt(Float64((Float64(t_4 - t_3) ^ 2.0) + (Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale) ^ 2.0))))))) / t_6)
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 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale;
	t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale;
	t_5 = (b * a) * (b * -a);
	t_6 = (4.0 * t_5) / ((x_45_scale * y_45_scale) ^ 2.0);
	tmp = -sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + sqrt((((t_4 - t_3) ^ 2.0) + ((((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale) ^ 2.0)))))) / t_6;
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[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]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * a), $MachinePrecision] * N[(b * (-a)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(4.0 * t$95$5), $MachinePrecision] / N[Power[N[(x$45$scale * y$45$scale), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(N[(2.0 * t$95$6), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(N[(t$95$4 + t$95$3), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(t$95$4 - t$95$3), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[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], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$6), $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(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{y-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{x-scale}}{x-scale}\\
t_5 := \left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\\
t_6 := \frac{4 \cdot t\_5}{{\left(x-scale \cdot y-scale\right)}^{2}}\\
\frac{-\sqrt{\left(\left(2 \cdot t\_6\right) \cdot t\_5\right) \cdot \left(\left(t\_4 + t\_3\right) + \sqrt{{\left(t\_4 - t\_3\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_1\right) \cdot t\_2}{x-scale}}{y-scale}\right)}^{2}}\right)}}{t\_6}
\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 17 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: 2.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(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{y-scale}}{y-scale}\\ t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{x-scale}}{x-scale}\\ t_5 := \left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\\ t_6 := \frac{4 \cdot t\_5}{{\left(x-scale \cdot y-scale\right)}^{2}}\\ \frac{-\sqrt{\left(\left(2 \cdot t\_6\right) \cdot t\_5\right) \cdot \left(\left(t\_4 + t\_3\right) + \sqrt{{\left(t\_4 - t\_3\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_1\right) \cdot t\_2}{x-scale}}{y-scale}\right)}^{2}}\right)}}{t\_6} \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
         (/ (/ (+ (pow (* a t_2) 2.0) (pow (* b t_1) 2.0)) y-scale) y-scale))
        (t_4
         (/ (/ (+ (pow (* a t_1) 2.0) (pow (* b t_2) 2.0)) x-scale) x-scale))
        (t_5 (* (* b a) (* b (- a))))
        (t_6 (/ (* 4.0 t_5) (pow (* x-scale y-scale) 2.0))))
   (/
    (-
     (sqrt
      (*
       (* (* 2.0 t_6) t_5)
       (+
        (+ t_4 t_3)
        (sqrt
         (+
          (pow (- t_4 t_3) 2.0)
          (pow
           (/
            (/ (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) t_1) t_2) x-scale)
            y-scale)
           2.0)))))))
    t_6)))
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 = ((pow((a * t_2), 2.0) + pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale;
	double t_4 = ((pow((a * t_1), 2.0) + pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale;
	double t_5 = (b * a) * (b * -a);
	double t_6 = (4.0 * t_5) / pow((x_45_scale * y_45_scale), 2.0);
	return -sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + sqrt((pow((t_4 - t_3), 2.0) + pow((((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6;
}
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 = ((Math.pow((a * t_2), 2.0) + Math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale;
	double t_4 = ((Math.pow((a * t_1), 2.0) + Math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale;
	double t_5 = (b * a) * (b * -a);
	double t_6 = (4.0 * t_5) / Math.pow((x_45_scale * y_45_scale), 2.0);
	return -Math.sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + Math.sqrt((Math.pow((t_4 - t_3), 2.0) + Math.pow((((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6;
}
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 = ((math.pow((a * t_2), 2.0) + math.pow((b * t_1), 2.0)) / y_45_scale) / y_45_scale
	t_4 = ((math.pow((a * t_1), 2.0) + math.pow((b * t_2), 2.0)) / x_45_scale) / x_45_scale
	t_5 = (b * a) * (b * -a)
	t_6 = (4.0 * t_5) / math.pow((x_45_scale * y_45_scale), 2.0)
	return -math.sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + math.sqrt((math.pow((t_4 - t_3), 2.0) + math.pow((((((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale), 2.0)))))) / t_6
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(a * t_2) ^ 2.0) + (Float64(b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale)
	t_4 = Float64(Float64(Float64((Float64(a * t_1) ^ 2.0) + (Float64(b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale)
	t_5 = Float64(Float64(b * a) * Float64(b * Float64(-a)))
	t_6 = Float64(Float64(4.0 * t_5) / (Float64(x_45_scale * y_45_scale) ^ 2.0))
	return Float64(Float64(-sqrt(Float64(Float64(Float64(2.0 * t_6) * t_5) * Float64(Float64(t_4 + t_3) + sqrt(Float64((Float64(t_4 - t_3) ^ 2.0) + (Float64(Float64(Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale) ^ 2.0))))))) / t_6)
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 = ((((a * t_2) ^ 2.0) + ((b * t_1) ^ 2.0)) / y_45_scale) / y_45_scale;
	t_4 = ((((a * t_1) ^ 2.0) + ((b * t_2) ^ 2.0)) / x_45_scale) / x_45_scale;
	t_5 = (b * a) * (b * -a);
	t_6 = (4.0 * t_5) / ((x_45_scale * y_45_scale) ^ 2.0);
	tmp = -sqrt((((2.0 * t_6) * t_5) * ((t_4 + t_3) + sqrt((((t_4 - t_3) ^ 2.0) + ((((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * t_1) * t_2) / x_45_scale) / y_45_scale) ^ 2.0)))))) / t_6;
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[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]}, Block[{t$95$4 = N[(N[(N[(N[Power[N[(a * t$95$1), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * a), $MachinePrecision] * N[(b * (-a)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(4.0 * t$95$5), $MachinePrecision] / N[Power[N[(x$45$scale * y$45$scale), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(N[(2.0 * t$95$6), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(N[(t$95$4 + t$95$3), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(t$95$4 - t$95$3), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[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], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$6), $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(a \cdot t\_2\right)}^{2} + {\left(b \cdot t\_1\right)}^{2}}{y-scale}}{y-scale}\\
t_4 := \frac{\frac{{\left(a \cdot t\_1\right)}^{2} + {\left(b \cdot t\_2\right)}^{2}}{x-scale}}{x-scale}\\
t_5 := \left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\\
t_6 := \frac{4 \cdot t\_5}{{\left(x-scale \cdot y-scale\right)}^{2}}\\
\frac{-\sqrt{\left(\left(2 \cdot t\_6\right) \cdot t\_5\right) \cdot \left(\left(t\_4 + t\_3\right) + \sqrt{{\left(t\_4 - t\_3\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot t\_1\right) \cdot t\_2}{x-scale}}{y-scale}\right)}^{2}}\right)}}{t\_6}
\end{array}
\end{array}

Alternative 1: 60.1% accurate, 3.8× speedup?

\[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;x-scale\_m \leq 5 \cdot 10^{+27}:\\ \;\;\;\;\left(\left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\_m\right)\right) \cdot \sqrt{2}\right) \cdot \mathsf{hypot}\left(b \cdot \cos t\_0, a \cdot \sin t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right), a \cdot \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right)\right)\\ \end{array} \end{array} \]
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b angle x-scale_m y-scale_m)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI))))
   (if (<= x-scale_m 5e+27)
     (*
      (* (* 0.25 (* (sqrt 8.0) y-scale_m)) (sqrt 2.0))
      (hypot (* b (cos t_0)) (* a (sin t_0))))
     (*
      (sqrt 2.0)
      (*
       (hypot
        (* b (sin (* angle (* 0.005555555555555556 (pow (sqrt PI) 2.0)))))
        (* a (cos (* angle (* 0.005555555555555556 PI)))))
       (* 0.25 (* x-scale_m (sqrt 8.0))))))))
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double tmp;
	if (x_45_scale_m <= 5e+27) {
		tmp = ((0.25 * (sqrt(8.0) * y_45_scale_m)) * sqrt(2.0)) * hypot((b * cos(t_0)), (a * sin(t_0)));
	} else {
		tmp = sqrt(2.0) * (hypot((b * sin((angle * (0.005555555555555556 * pow(sqrt(((double) M_PI)), 2.0))))), (a * cos((angle * (0.005555555555555556 * ((double) M_PI)))))) * (0.25 * (x_45_scale_m * sqrt(8.0))));
	}
	return tmp;
}
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double tmp;
	if (x_45_scale_m <= 5e+27) {
		tmp = ((0.25 * (Math.sqrt(8.0) * y_45_scale_m)) * Math.sqrt(2.0)) * Math.hypot((b * Math.cos(t_0)), (a * Math.sin(t_0)));
	} else {
		tmp = Math.sqrt(2.0) * (Math.hypot((b * Math.sin((angle * (0.005555555555555556 * Math.pow(Math.sqrt(Math.PI), 2.0))))), (a * Math.cos((angle * (0.005555555555555556 * Math.PI))))) * (0.25 * (x_45_scale_m * Math.sqrt(8.0))));
	}
	return tmp;
}
x-scale_m = math.fabs(x_45_scale)
y-scale_m = math.fabs(y_45_scale)
def code(a, b, angle, x_45_scale_m, y_45_scale_m):
	t_0 = 0.005555555555555556 * (angle * math.pi)
	tmp = 0
	if x_45_scale_m <= 5e+27:
		tmp = ((0.25 * (math.sqrt(8.0) * y_45_scale_m)) * math.sqrt(2.0)) * math.hypot((b * math.cos(t_0)), (a * math.sin(t_0)))
	else:
		tmp = math.sqrt(2.0) * (math.hypot((b * math.sin((angle * (0.005555555555555556 * math.pow(math.sqrt(math.pi), 2.0))))), (a * math.cos((angle * (0.005555555555555556 * math.pi))))) * (0.25 * (x_45_scale_m * math.sqrt(8.0))))
	return tmp
x-scale_m = abs(x_45_scale)
y-scale_m = abs(y_45_scale)
function code(a, b, angle, x_45_scale_m, y_45_scale_m)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	tmp = 0.0
	if (x_45_scale_m <= 5e+27)
		tmp = Float64(Float64(Float64(0.25 * Float64(sqrt(8.0) * y_45_scale_m)) * sqrt(2.0)) * hypot(Float64(b * cos(t_0)), Float64(a * sin(t_0))));
	else
		tmp = Float64(sqrt(2.0) * Float64(hypot(Float64(b * sin(Float64(angle * Float64(0.005555555555555556 * (sqrt(pi) ^ 2.0))))), Float64(a * cos(Float64(angle * Float64(0.005555555555555556 * pi))))) * Float64(0.25 * Float64(x_45_scale_m * sqrt(8.0)))));
	end
	return tmp
end
x-scale_m = abs(x_45_scale);
y-scale_m = abs(y_45_scale);
function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
	t_0 = 0.005555555555555556 * (angle * pi);
	tmp = 0.0;
	if (x_45_scale_m <= 5e+27)
		tmp = ((0.25 * (sqrt(8.0) * y_45_scale_m)) * sqrt(2.0)) * hypot((b * cos(t_0)), (a * sin(t_0)));
	else
		tmp = sqrt(2.0) * (hypot((b * sin((angle * (0.005555555555555556 * (sqrt(pi) ^ 2.0))))), (a * cos((angle * (0.005555555555555556 * pi))))) * (0.25 * (x_45_scale_m * sqrt(8.0))));
	end
	tmp_2 = tmp;
end
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$45$scale$95$m, 5e+27], N[(N[(N[(0.25 * N[(N[Sqrt[8.0], $MachinePrecision] * y$45$scale$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(b * N[Sin[N[(angle * N[(0.005555555555555556 * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(a * N[Cos[N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] * N[(0.25 * N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;x-scale\_m \leq 5 \cdot 10^{+27}:\\
\;\;\;\;\left(\left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\_m\right)\right) \cdot \sqrt{2}\right) \cdot \mathsf{hypot}\left(b \cdot \cos t\_0, a \cdot \sin t\_0\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right), a \cdot \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x-scale < 4.99999999999999979e27

    1. Initial program 2.4%

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

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

        \[\leadsto \left(\frac{1}{4} \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
      2. *-lowering-*.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
      7. distribute-lft-outN/A

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

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

      \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    6. Step-by-step derivation
      1. sqrt-prodN/A

        \[\leadsto \left(\frac{1}{4} \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \color{blue}{\sqrt{\left(a \cdot a\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}}\right) \]
      2. pow1/2N/A

        \[\leadsto \left(\frac{1}{4} \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\color{blue}{\frac{1}{2}}}\right) \]
    7. Applied egg-rr25.8%

      \[\leadsto \color{blue}{\left(\left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\right)\right) \cdot \sqrt{2}\right) \cdot \mathsf{hypot}\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]

    if 4.99999999999999979e27 < x-scale

    1. Initial program 3.7%

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

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

        \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
      2. *-lowering-*.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
      7. distribute-lft-outN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
    5. Simplified63.3%

      \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
      2. sqrt-prodN/A

        \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
    7. Applied egg-rr68.1%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
    8. Step-by-step derivation
      1. add-sqr-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
      2. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\left({\left(\sqrt{\mathsf{PI}\left(\right)}\right)}^{2}\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{\mathsf{PI}\left(\right)}\right), 2\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right), 2\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
      5. PI-lowering-PI.f6468.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right), 2\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
    9. Applied egg-rr68.2%

      \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\color{blue}{{\left(\sqrt{\pi}\right)}^{2}} \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification35.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 5 \cdot 10^{+27}:\\ \;\;\;\;\left(\left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\right)\right) \cdot \sqrt{2}\right) \cdot \mathsf{hypot}\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right), a \cdot \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 60.1% accurate, 5.2× speedup?

\[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;x-scale\_m \leq 4.5 \cdot 10^{+27}:\\ \;\;\;\;\left(\left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\_m\right)\right) \cdot \sqrt{2}\right) \cdot \mathsf{hypot}\left(b \cdot \cos t\_0, a \cdot \sin t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot {\left({8}^{0.25}\right)}^{2}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a\right)\right)\\ \end{array} \end{array} \]
x-scale_m = (fabs.f64 x-scale)
y-scale_m = (fabs.f64 y-scale)
(FPCore (a b angle x-scale_m y-scale_m)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI))))
   (if (<= x-scale_m 4.5e+27)
     (*
      (* (* 0.25 (* (sqrt 8.0) y-scale_m)) (sqrt 2.0))
      (hypot (* b (cos t_0)) (* a (sin t_0))))
     (*
      (sqrt 2.0)
      (*
       (* 0.25 (* x-scale_m (pow (pow 8.0 0.25) 2.0)))
       (hypot (* b (sin (* angle (* 0.005555555555555556 PI)))) a))))))
x-scale_m = fabs(x_45_scale);
y-scale_m = fabs(y_45_scale);
double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double tmp;
	if (x_45_scale_m <= 4.5e+27) {
		tmp = ((0.25 * (sqrt(8.0) * y_45_scale_m)) * sqrt(2.0)) * hypot((b * cos(t_0)), (a * sin(t_0)));
	} else {
		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * pow(pow(8.0, 0.25), 2.0))) * hypot((b * sin((angle * (0.005555555555555556 * ((double) M_PI))))), a));
	}
	return tmp;
}
x-scale_m = Math.abs(x_45_scale);
y-scale_m = Math.abs(y_45_scale);
public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double tmp;
	if (x_45_scale_m <= 4.5e+27) {
		tmp = ((0.25 * (Math.sqrt(8.0) * y_45_scale_m)) * Math.sqrt(2.0)) * Math.hypot((b * Math.cos(t_0)), (a * Math.sin(t_0)));
	} else {
		tmp = Math.sqrt(2.0) * ((0.25 * (x_45_scale_m * Math.pow(Math.pow(8.0, 0.25), 2.0))) * Math.hypot((b * Math.sin((angle * (0.005555555555555556 * Math.PI)))), a));
	}
	return tmp;
}
x-scale_m = math.fabs(x_45_scale)
y-scale_m = math.fabs(y_45_scale)
def code(a, b, angle, x_45_scale_m, y_45_scale_m):
	t_0 = 0.005555555555555556 * (angle * math.pi)
	tmp = 0
	if x_45_scale_m <= 4.5e+27:
		tmp = ((0.25 * (math.sqrt(8.0) * y_45_scale_m)) * math.sqrt(2.0)) * math.hypot((b * math.cos(t_0)), (a * math.sin(t_0)))
	else:
		tmp = math.sqrt(2.0) * ((0.25 * (x_45_scale_m * math.pow(math.pow(8.0, 0.25), 2.0))) * math.hypot((b * math.sin((angle * (0.005555555555555556 * math.pi)))), a))
	return tmp
x-scale_m = abs(x_45_scale)
y-scale_m = abs(y_45_scale)
function code(a, b, angle, x_45_scale_m, y_45_scale_m)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	tmp = 0.0
	if (x_45_scale_m <= 4.5e+27)
		tmp = Float64(Float64(Float64(0.25 * Float64(sqrt(8.0) * y_45_scale_m)) * sqrt(2.0)) * hypot(Float64(b * cos(t_0)), Float64(a * sin(t_0))));
	else
		tmp = Float64(sqrt(2.0) * Float64(Float64(0.25 * Float64(x_45_scale_m * ((8.0 ^ 0.25) ^ 2.0))) * hypot(Float64(b * sin(Float64(angle * Float64(0.005555555555555556 * pi)))), a)));
	end
	return tmp
end
x-scale_m = abs(x_45_scale);
y-scale_m = abs(y_45_scale);
function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
	t_0 = 0.005555555555555556 * (angle * pi);
	tmp = 0.0;
	if (x_45_scale_m <= 4.5e+27)
		tmp = ((0.25 * (sqrt(8.0) * y_45_scale_m)) * sqrt(2.0)) * hypot((b * cos(t_0)), (a * sin(t_0)));
	else
		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * ((8.0 ^ 0.25) ^ 2.0))) * hypot((b * sin((angle * (0.005555555555555556 * pi)))), a));
	end
	tmp_2 = tmp;
end
x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$45$scale$95$m, 4.5e+27], N[(N[(N[(0.25 * N[(N[Sqrt[8.0], $MachinePrecision] * y$45$scale$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(0.25 * N[(x$45$scale$95$m * N[Power[N[Power[8.0, 0.25], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(b * N[Sin[N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + a ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x-scale_m = \left|x-scale\right|
\\
y-scale_m = \left|y-scale\right|

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;x-scale\_m \leq 4.5 \cdot 10^{+27}:\\
\;\;\;\;\left(\left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\_m\right)\right) \cdot \sqrt{2}\right) \cdot \mathsf{hypot}\left(b \cdot \cos t\_0, a \cdot \sin t\_0\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot {\left({8}^{0.25}\right)}^{2}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x-scale < 4.4999999999999999e27

    1. Initial program 2.4%

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

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

        \[\leadsto \left(\frac{1}{4} \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
      2. *-lowering-*.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
      7. distribute-lft-outN/A

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

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

      \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    6. Step-by-step derivation
      1. sqrt-prodN/A

        \[\leadsto \left(\frac{1}{4} \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \color{blue}{\sqrt{\left(a \cdot a\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}}\right) \]
      2. pow1/2N/A

        \[\leadsto \left(\frac{1}{4} \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\color{blue}{\frac{1}{2}}}\right) \]
    7. Applied egg-rr25.8%

      \[\leadsto \color{blue}{\left(\left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\right)\right) \cdot \sqrt{2}\right) \cdot \mathsf{hypot}\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]

    if 4.4999999999999999e27 < x-scale

    1. Initial program 3.7%

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

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

        \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
      2. *-lowering-*.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
      7. distribute-lft-outN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
    5. Simplified63.3%

      \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
      2. sqrt-prodN/A

        \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
    7. Applied egg-rr68.1%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
    8. Taylor expanded in angle around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \color{blue}{1}\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. Simplified68.3%

        \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \color{blue}{1}\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
      2. Step-by-step derivation
        1. pow1/2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \left({8}^{\color{blue}{\frac{1}{2}}}\right)\right)\right)\right)\right) \]
        2. sqr-powN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \left({8}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot \color{blue}{{8}^{\left(\frac{\frac{1}{2}}{2}\right)}}\right)\right)\right)\right)\right) \]
        3. pow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \left({\left({8}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{\color{blue}{2}}\right)\right)\right)\right)\right) \]
        4. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{pow.f64}\left(\left({8}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), \color{blue}{2}\right)\right)\right)\right)\right) \]
        5. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{pow.f64}\left(\left({8}^{\frac{1}{4}}\right), 2\right)\right)\right)\right)\right) \]
        6. pow-lowering-pow.f6468.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{pow.f64}\left(\mathsf{pow.f64}\left(8, \frac{1}{4}\right), 2\right)\right)\right)\right)\right) \]
      3. Applied egg-rr68.4%

        \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot 1\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \color{blue}{{\left({8}^{0.25}\right)}^{2}}\right)\right)\right) \]
    10. Recombined 2 regimes into one program.
    11. Final simplification35.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 4.5 \cdot 10^{+27}:\\ \;\;\;\;\left(\left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\right)\right) \cdot \sqrt{2}\right) \cdot \mathsf{hypot}\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale \cdot {\left({8}^{0.25}\right)}^{2}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a\right)\right)\\ \end{array} \]
    12. Add Preprocessing

    Alternative 3: 43.4% accurate, 5.2× speedup?

    \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\ \mathbf{if}\;y-scale\_m \leq 7.2 \cdot 10^{+59}:\\ \;\;\;\;\left(x-scale\_m \cdot \sqrt{8}\right) \cdot \left(\sqrt{2} \cdot \left(0.25 \cdot \mathsf{hypot}\left(b \cdot \sin t\_0, a \cdot \cos t\_0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \end{array} \]
    x-scale_m = (fabs.f64 x-scale)
    y-scale_m = (fabs.f64 y-scale)
    (FPCore (a b angle x-scale_m y-scale_m)
     :precision binary64
     (let* ((t_0 (* angle (* 0.005555555555555556 PI))))
       (if (<= y-scale_m 7.2e+59)
         (*
          (* x-scale_m (sqrt 8.0))
          (* (sqrt 2.0) (* 0.25 (hypot (* b (sin t_0)) (* a (cos t_0))))))
         (*
          (* 0.25 b)
          (*
           (*
            y-scale_m
            (+
             1.0
             (*
              (* angle angle)
              (+
               (* (* PI PI) -1.54320987654321e-5)
               (* (* (* angle angle) 3.969161205100849e-11) (pow PI 4.0))))))
           (* (sqrt 8.0) (sqrt 2.0)))))))
    x-scale_m = fabs(x_45_scale);
    y-scale_m = fabs(y_45_scale);
    double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
    	double t_0 = angle * (0.005555555555555556 * ((double) M_PI));
    	double tmp;
    	if (y_45_scale_m <= 7.2e+59) {
    		tmp = (x_45_scale_m * sqrt(8.0)) * (sqrt(2.0) * (0.25 * hypot((b * sin(t_0)), (a * cos(t_0)))));
    	} else {
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((((double) M_PI) * ((double) M_PI)) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * pow(((double) M_PI), 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
    	}
    	return tmp;
    }
    
    x-scale_m = Math.abs(x_45_scale);
    y-scale_m = Math.abs(y_45_scale);
    public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
    	double t_0 = angle * (0.005555555555555556 * Math.PI);
    	double tmp;
    	if (y_45_scale_m <= 7.2e+59) {
    		tmp = (x_45_scale_m * Math.sqrt(8.0)) * (Math.sqrt(2.0) * (0.25 * Math.hypot((b * Math.sin(t_0)), (a * Math.cos(t_0)))));
    	} else {
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((Math.PI * Math.PI) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * Math.pow(Math.PI, 4.0)))))) * (Math.sqrt(8.0) * Math.sqrt(2.0)));
    	}
    	return tmp;
    }
    
    x-scale_m = math.fabs(x_45_scale)
    y-scale_m = math.fabs(y_45_scale)
    def code(a, b, angle, x_45_scale_m, y_45_scale_m):
    	t_0 = angle * (0.005555555555555556 * math.pi)
    	tmp = 0
    	if y_45_scale_m <= 7.2e+59:
    		tmp = (x_45_scale_m * math.sqrt(8.0)) * (math.sqrt(2.0) * (0.25 * math.hypot((b * math.sin(t_0)), (a * math.cos(t_0)))))
    	else:
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((math.pi * math.pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * math.pow(math.pi, 4.0)))))) * (math.sqrt(8.0) * math.sqrt(2.0)))
    	return tmp
    
    x-scale_m = abs(x_45_scale)
    y-scale_m = abs(y_45_scale)
    function code(a, b, angle, x_45_scale_m, y_45_scale_m)
    	t_0 = Float64(angle * Float64(0.005555555555555556 * pi))
    	tmp = 0.0
    	if (y_45_scale_m <= 7.2e+59)
    		tmp = Float64(Float64(x_45_scale_m * sqrt(8.0)) * Float64(sqrt(2.0) * Float64(0.25 * hypot(Float64(b * sin(t_0)), Float64(a * cos(t_0))))));
    	else
    		tmp = Float64(Float64(0.25 * b) * Float64(Float64(y_45_scale_m * Float64(1.0 + Float64(Float64(angle * angle) * Float64(Float64(Float64(pi * pi) * -1.54320987654321e-5) + Float64(Float64(Float64(angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * Float64(sqrt(8.0) * sqrt(2.0))));
    	end
    	return tmp
    end
    
    x-scale_m = abs(x_45_scale);
    y-scale_m = abs(y_45_scale);
    function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
    	t_0 = angle * (0.005555555555555556 * pi);
    	tmp = 0.0;
    	if (y_45_scale_m <= 7.2e+59)
    		tmp = (x_45_scale_m * sqrt(8.0)) * (sqrt(2.0) * (0.25 * hypot((b * sin(t_0)), (a * cos(t_0)))));
    	else
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((pi * pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
    	end
    	tmp_2 = tmp;
    end
    
    x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
    y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
    code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 7.2e+59], N[(N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(0.25 * N[Sqrt[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(a * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.25 * b), $MachinePrecision] * N[(N[(y$45$scale$95$m * N[(1.0 + N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -1.54320987654321e-5), $MachinePrecision] + N[(N[(N[(angle * angle), $MachinePrecision] * 3.969161205100849e-11), $MachinePrecision] * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    x-scale_m = \left|x-scale\right|
    \\
    y-scale_m = \left|y-scale\right|
    
    \\
    \begin{array}{l}
    t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
    \mathbf{if}\;y-scale\_m \leq 7.2 \cdot 10^{+59}:\\
    \;\;\;\;\left(x-scale\_m \cdot \sqrt{8}\right) \cdot \left(\sqrt{2} \cdot \left(0.25 \cdot \mathsf{hypot}\left(b \cdot \sin t\_0, a \cdot \cos t\_0\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y-scale < 7.1999999999999997e59

      1. Initial program 2.4%

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

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

          \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
        2. *-lowering-*.f64N/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
        7. distribute-lft-outN/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
      5. Simplified23.3%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
        2. sqrt-prodN/A

          \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
        3. pow1/2N/A

          \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
        4. associate-*l*N/A

          \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
        5. *-lowering-*.f64N/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
      7. Applied egg-rr25.2%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
      8. Step-by-step derivation
        1. associate-*r*N/A

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

          \[\leadsto \left(\sqrt{2} \cdot \left(\sqrt{\left(b \cdot \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \left(b \cdot \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) + \left(a \cdot \cos \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \left(a \cdot \cos \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right)} \cdot \frac{1}{4}\right)\right) \cdot \color{blue}{\left(x-scale \cdot \sqrt{8}\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{2} \cdot \left(\sqrt{\left(b \cdot \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \left(b \cdot \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) + \left(a \cdot \cos \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \left(a \cdot \cos \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right)} \cdot \frac{1}{4}\right)\right), \color{blue}{\left(x-scale \cdot \sqrt{8}\right)}\right) \]
      9. Applied egg-rr25.1%

        \[\leadsto \color{blue}{\left(\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot 0.25\right)\right) \cdot \left(x-scale \cdot \sqrt{8}\right)} \]

      if 7.1999999999999997e59 < y-scale

      1. Initial program 3.5%

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

        \[\leadsto \color{blue}{\frac{1}{4} \cdot \left(\left(b \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)} \]
      4. Simplified18.8%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(\left(b \cdot x-scale\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{\frac{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}} \]
      5. Taylor expanded in x-scale around 0

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

          \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)}\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\color{blue}{y-scale} \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right) \]
        4. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
        8. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{\color{blue}{2}} \cdot \sqrt{8}\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
        11. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\left(\sqrt{2}\right), \color{blue}{\left(\sqrt{8}\right)}\right)\right)\right) \]
        13. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\sqrt{\color{blue}{8}}\right)\right)\right)\right) \]
        14. sqrt-lowering-sqrt.f6428.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
      7. Simplified28.7%

        \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
      8. Taylor expanded in angle around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(1 + {angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)}, y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
      9. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{2}\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({angle}^{2}\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({\mathsf{PI}\left(\right)}^{2}\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        10. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        11. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        12. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left({angle}^{2}\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        15. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left(angle \cdot angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        16. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        17. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        18. PI-lowering-PI.f6426.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
      10. Simplified26.0%

        \[\leadsto \left(0.25 \cdot b\right) \cdot \left(\left(\color{blue}{\left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(3.969161205100849 \cdot 10^{-11} \cdot \left(angle \cdot angle\right)\right) \cdot {\pi}^{4}\right)\right)} \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification25.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq 7.2 \cdot 10^{+59}:\\ \;\;\;\;\left(x-scale \cdot \sqrt{8}\right) \cdot \left(\sqrt{2} \cdot \left(0.25 \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a \cdot \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 43.4% accurate, 5.2× speedup?

    \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\ \mathbf{if}\;y-scale\_m \leq 1.95 \cdot 10^{+59}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin t\_0, a \cdot \cos t\_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \end{array} \]
    x-scale_m = (fabs.f64 x-scale)
    y-scale_m = (fabs.f64 y-scale)
    (FPCore (a b angle x-scale_m y-scale_m)
     :precision binary64
     (let* ((t_0 (* angle (* 0.005555555555555556 PI))))
       (if (<= y-scale_m 1.95e+59)
         (*
          (sqrt 2.0)
          (*
           (* 0.25 (* x-scale_m (sqrt 8.0)))
           (hypot (* b (sin t_0)) (* a (cos t_0)))))
         (*
          (* 0.25 b)
          (*
           (*
            y-scale_m
            (+
             1.0
             (*
              (* angle angle)
              (+
               (* (* PI PI) -1.54320987654321e-5)
               (* (* (* angle angle) 3.969161205100849e-11) (pow PI 4.0))))))
           (* (sqrt 8.0) (sqrt 2.0)))))))
    x-scale_m = fabs(x_45_scale);
    y-scale_m = fabs(y_45_scale);
    double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
    	double t_0 = angle * (0.005555555555555556 * ((double) M_PI));
    	double tmp;
    	if (y_45_scale_m <= 1.95e+59) {
    		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * sqrt(8.0))) * hypot((b * sin(t_0)), (a * cos(t_0))));
    	} else {
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((((double) M_PI) * ((double) M_PI)) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * pow(((double) M_PI), 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
    	}
    	return tmp;
    }
    
    x-scale_m = Math.abs(x_45_scale);
    y-scale_m = Math.abs(y_45_scale);
    public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
    	double t_0 = angle * (0.005555555555555556 * Math.PI);
    	double tmp;
    	if (y_45_scale_m <= 1.95e+59) {
    		tmp = Math.sqrt(2.0) * ((0.25 * (x_45_scale_m * Math.sqrt(8.0))) * Math.hypot((b * Math.sin(t_0)), (a * Math.cos(t_0))));
    	} else {
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((Math.PI * Math.PI) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * Math.pow(Math.PI, 4.0)))))) * (Math.sqrt(8.0) * Math.sqrt(2.0)));
    	}
    	return tmp;
    }
    
    x-scale_m = math.fabs(x_45_scale)
    y-scale_m = math.fabs(y_45_scale)
    def code(a, b, angle, x_45_scale_m, y_45_scale_m):
    	t_0 = angle * (0.005555555555555556 * math.pi)
    	tmp = 0
    	if y_45_scale_m <= 1.95e+59:
    		tmp = math.sqrt(2.0) * ((0.25 * (x_45_scale_m * math.sqrt(8.0))) * math.hypot((b * math.sin(t_0)), (a * math.cos(t_0))))
    	else:
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((math.pi * math.pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * math.pow(math.pi, 4.0)))))) * (math.sqrt(8.0) * math.sqrt(2.0)))
    	return tmp
    
    x-scale_m = abs(x_45_scale)
    y-scale_m = abs(y_45_scale)
    function code(a, b, angle, x_45_scale_m, y_45_scale_m)
    	t_0 = Float64(angle * Float64(0.005555555555555556 * pi))
    	tmp = 0.0
    	if (y_45_scale_m <= 1.95e+59)
    		tmp = Float64(sqrt(2.0) * Float64(Float64(0.25 * Float64(x_45_scale_m * sqrt(8.0))) * hypot(Float64(b * sin(t_0)), Float64(a * cos(t_0)))));
    	else
    		tmp = Float64(Float64(0.25 * b) * Float64(Float64(y_45_scale_m * Float64(1.0 + Float64(Float64(angle * angle) * Float64(Float64(Float64(pi * pi) * -1.54320987654321e-5) + Float64(Float64(Float64(angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * Float64(sqrt(8.0) * sqrt(2.0))));
    	end
    	return tmp
    end
    
    x-scale_m = abs(x_45_scale);
    y-scale_m = abs(y_45_scale);
    function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
    	t_0 = angle * (0.005555555555555556 * pi);
    	tmp = 0.0;
    	if (y_45_scale_m <= 1.95e+59)
    		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * sqrt(8.0))) * hypot((b * sin(t_0)), (a * cos(t_0))));
    	else
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((pi * pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
    	end
    	tmp_2 = tmp;
    end
    
    x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
    y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
    code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := Block[{t$95$0 = N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale$95$m, 1.95e+59], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(0.25 * N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(a * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.25 * b), $MachinePrecision] * N[(N[(y$45$scale$95$m * N[(1.0 + N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -1.54320987654321e-5), $MachinePrecision] + N[(N[(N[(angle * angle), $MachinePrecision] * 3.969161205100849e-11), $MachinePrecision] * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    x-scale_m = \left|x-scale\right|
    \\
    y-scale_m = \left|y-scale\right|
    
    \\
    \begin{array}{l}
    t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
    \mathbf{if}\;y-scale\_m \leq 1.95 \cdot 10^{+59}:\\
    \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin t\_0, a \cdot \cos t\_0\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y-scale < 1.95000000000000011e59

      1. Initial program 2.4%

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

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

          \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
        2. *-lowering-*.f64N/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
        7. distribute-lft-outN/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
      5. Simplified23.3%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
        2. sqrt-prodN/A

          \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
        3. pow1/2N/A

          \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
        4. associate-*l*N/A

          \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
        5. *-lowering-*.f64N/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
      7. Applied egg-rr25.2%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]

      if 1.95000000000000011e59 < y-scale

      1. Initial program 3.5%

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

        \[\leadsto \color{blue}{\frac{1}{4} \cdot \left(\left(b \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)} \]
      4. Simplified18.8%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(\left(b \cdot x-scale\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{\frac{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}} \]
      5. Taylor expanded in x-scale around 0

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

          \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)}\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\color{blue}{y-scale} \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right) \]
        4. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
        8. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{\color{blue}{2}} \cdot \sqrt{8}\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
        11. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\left(\sqrt{2}\right), \color{blue}{\left(\sqrt{8}\right)}\right)\right)\right) \]
        13. sqrt-lowering-sqrt.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\sqrt{\color{blue}{8}}\right)\right)\right)\right) \]
        14. sqrt-lowering-sqrt.f6428.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
      7. Simplified28.7%

        \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
      8. Taylor expanded in angle around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(1 + {angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)}, y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
      9. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{2}\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({angle}^{2}\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({\mathsf{PI}\left(\right)}^{2}\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        10. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        11. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        12. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left({angle}^{2}\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        15. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left(angle \cdot angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        16. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        17. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        18. PI-lowering-PI.f6426.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
      10. Simplified26.0%

        \[\leadsto \left(0.25 \cdot b\right) \cdot \left(\left(\color{blue}{\left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(3.969161205100849 \cdot 10^{-11} \cdot \left(angle \cdot angle\right)\right) \cdot {\pi}^{4}\right)\right)} \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification25.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq 1.95 \cdot 10^{+59}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a \cdot \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 43.6% accurate, 5.3× speedup?

    \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;y-scale\_m \leq 1.15 \cdot 10^{+63}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot {\left({8}^{0.25}\right)}^{2}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \end{array} \]
    x-scale_m = (fabs.f64 x-scale)
    y-scale_m = (fabs.f64 y-scale)
    (FPCore (a b angle x-scale_m y-scale_m)
     :precision binary64
     (if (<= y-scale_m 1.15e+63)
       (*
        (sqrt 2.0)
        (*
         (* 0.25 (* x-scale_m (pow (pow 8.0 0.25) 2.0)))
         (hypot (* b (sin (* angle (* 0.005555555555555556 PI)))) a)))
       (*
        (* 0.25 b)
        (*
         (*
          y-scale_m
          (+
           1.0
           (*
            (* angle angle)
            (+
             (* (* PI PI) -1.54320987654321e-5)
             (* (* (* angle angle) 3.969161205100849e-11) (pow PI 4.0))))))
         (* (sqrt 8.0) (sqrt 2.0))))))
    x-scale_m = fabs(x_45_scale);
    y-scale_m = fabs(y_45_scale);
    double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
    	double tmp;
    	if (y_45_scale_m <= 1.15e+63) {
    		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * pow(pow(8.0, 0.25), 2.0))) * hypot((b * sin((angle * (0.005555555555555556 * ((double) M_PI))))), a));
    	} else {
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((((double) M_PI) * ((double) M_PI)) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * pow(((double) M_PI), 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
    	}
    	return tmp;
    }
    
    x-scale_m = Math.abs(x_45_scale);
    y-scale_m = Math.abs(y_45_scale);
    public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
    	double tmp;
    	if (y_45_scale_m <= 1.15e+63) {
    		tmp = Math.sqrt(2.0) * ((0.25 * (x_45_scale_m * Math.pow(Math.pow(8.0, 0.25), 2.0))) * Math.hypot((b * Math.sin((angle * (0.005555555555555556 * Math.PI)))), a));
    	} else {
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((Math.PI * Math.PI) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * Math.pow(Math.PI, 4.0)))))) * (Math.sqrt(8.0) * Math.sqrt(2.0)));
    	}
    	return tmp;
    }
    
    x-scale_m = math.fabs(x_45_scale)
    y-scale_m = math.fabs(y_45_scale)
    def code(a, b, angle, x_45_scale_m, y_45_scale_m):
    	tmp = 0
    	if y_45_scale_m <= 1.15e+63:
    		tmp = math.sqrt(2.0) * ((0.25 * (x_45_scale_m * math.pow(math.pow(8.0, 0.25), 2.0))) * math.hypot((b * math.sin((angle * (0.005555555555555556 * math.pi)))), a))
    	else:
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((math.pi * math.pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * math.pow(math.pi, 4.0)))))) * (math.sqrt(8.0) * math.sqrt(2.0)))
    	return tmp
    
    x-scale_m = abs(x_45_scale)
    y-scale_m = abs(y_45_scale)
    function code(a, b, angle, x_45_scale_m, y_45_scale_m)
    	tmp = 0.0
    	if (y_45_scale_m <= 1.15e+63)
    		tmp = Float64(sqrt(2.0) * Float64(Float64(0.25 * Float64(x_45_scale_m * ((8.0 ^ 0.25) ^ 2.0))) * hypot(Float64(b * sin(Float64(angle * Float64(0.005555555555555556 * pi)))), a)));
    	else
    		tmp = Float64(Float64(0.25 * b) * Float64(Float64(y_45_scale_m * Float64(1.0 + Float64(Float64(angle * angle) * Float64(Float64(Float64(pi * pi) * -1.54320987654321e-5) + Float64(Float64(Float64(angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * Float64(sqrt(8.0) * sqrt(2.0))));
    	end
    	return tmp
    end
    
    x-scale_m = abs(x_45_scale);
    y-scale_m = abs(y_45_scale);
    function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
    	tmp = 0.0;
    	if (y_45_scale_m <= 1.15e+63)
    		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * ((8.0 ^ 0.25) ^ 2.0))) * hypot((b * sin((angle * (0.005555555555555556 * pi)))), a));
    	else
    		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((pi * pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
    	end
    	tmp_2 = tmp;
    end
    
    x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
    y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
    code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[y$45$scale$95$m, 1.15e+63], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(0.25 * N[(x$45$scale$95$m * N[Power[N[Power[8.0, 0.25], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(b * N[Sin[N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + a ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.25 * b), $MachinePrecision] * N[(N[(y$45$scale$95$m * N[(1.0 + N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -1.54320987654321e-5), $MachinePrecision] + N[(N[(N[(angle * angle), $MachinePrecision] * 3.969161205100849e-11), $MachinePrecision] * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    x-scale_m = \left|x-scale\right|
    \\
    y-scale_m = \left|y-scale\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y-scale\_m \leq 1.15 \cdot 10^{+63}:\\
    \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot {\left({8}^{0.25}\right)}^{2}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y-scale < 1.14999999999999997e63

      1. Initial program 2.4%

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

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

          \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
        2. *-lowering-*.f64N/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
        7. distribute-lft-outN/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
      5. Simplified23.3%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
        2. sqrt-prodN/A

          \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
        3. pow1/2N/A

          \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
        4. associate-*l*N/A

          \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
        5. *-lowering-*.f64N/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
      7. Applied egg-rr25.2%

        \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
      8. Taylor expanded in angle around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \color{blue}{1}\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
      9. Step-by-step derivation
        1. Simplified25.1%

          \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \color{blue}{1}\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
        2. Step-by-step derivation
          1. pow1/2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \left({8}^{\color{blue}{\frac{1}{2}}}\right)\right)\right)\right)\right) \]
          2. sqr-powN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \left({8}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot \color{blue}{{8}^{\left(\frac{\frac{1}{2}}{2}\right)}}\right)\right)\right)\right)\right) \]
          3. pow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \left({\left({8}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{\color{blue}{2}}\right)\right)\right)\right)\right) \]
          4. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{pow.f64}\left(\left({8}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), \color{blue}{2}\right)\right)\right)\right)\right) \]
          5. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{pow.f64}\left(\left({8}^{\frac{1}{4}}\right), 2\right)\right)\right)\right)\right) \]
          6. pow-lowering-pow.f6425.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{pow.f64}\left(\mathsf{pow.f64}\left(8, \frac{1}{4}\right), 2\right)\right)\right)\right)\right) \]
        3. Applied egg-rr25.2%

          \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot 1\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \color{blue}{{\left({8}^{0.25}\right)}^{2}}\right)\right)\right) \]

        if 1.14999999999999997e63 < y-scale

        1. Initial program 3.5%

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

          \[\leadsto \color{blue}{\frac{1}{4} \cdot \left(\left(b \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)} \]
        4. Simplified18.8%

          \[\leadsto \color{blue}{\left(0.25 \cdot \left(\left(b \cdot x-scale\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{\frac{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}} \]
        5. Taylor expanded in x-scale around 0

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

            \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)}\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\color{blue}{y-scale} \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right) \]
          4. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
          8. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{\color{blue}{2}} \cdot \sqrt{8}\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
          11. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\left(\sqrt{2}\right), \color{blue}{\left(\sqrt{8}\right)}\right)\right)\right) \]
          13. sqrt-lowering-sqrt.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\sqrt{\color{blue}{8}}\right)\right)\right)\right) \]
          14. sqrt-lowering-sqrt.f6428.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        7. Simplified28.7%

          \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
        8. Taylor expanded in angle around 0

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(1 + {angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)}, y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        9. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{2}\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({angle}^{2}\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          3. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({\mathsf{PI}\left(\right)}^{2}\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          10. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          11. PI-lowering-PI.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          12. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          14. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left({angle}^{2}\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          15. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left(angle \cdot angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          16. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          17. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          18. PI-lowering-PI.f6426.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
        10. Simplified26.0%

          \[\leadsto \left(0.25 \cdot b\right) \cdot \left(\left(\color{blue}{\left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(3.969161205100849 \cdot 10^{-11} \cdot \left(angle \cdot angle\right)\right) \cdot {\pi}^{4}\right)\right)} \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right) \]
      10. Recombined 2 regimes into one program.
      11. Final simplification25.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq 1.15 \cdot 10^{+63}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale \cdot {\left({8}^{0.25}\right)}^{2}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \]
      12. Add Preprocessing

      Alternative 6: 43.3% accurate, 6.5× speedup?

      \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;y-scale\_m \leq 2.7 \cdot 10^{+58}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \end{array} \]
      x-scale_m = (fabs.f64 x-scale)
      y-scale_m = (fabs.f64 y-scale)
      (FPCore (a b angle x-scale_m y-scale_m)
       :precision binary64
       (if (<= y-scale_m 2.7e+58)
         (*
          (sqrt 2.0)
          (*
           (* 0.25 (* x-scale_m (sqrt 8.0)))
           (hypot (* b (sin (* angle (* 0.005555555555555556 PI)))) a)))
         (*
          (* 0.25 b)
          (*
           (*
            y-scale_m
            (+
             1.0
             (*
              (* angle angle)
              (+
               (* (* PI PI) -1.54320987654321e-5)
               (* (* (* angle angle) 3.969161205100849e-11) (pow PI 4.0))))))
           (* (sqrt 8.0) (sqrt 2.0))))))
      x-scale_m = fabs(x_45_scale);
      y-scale_m = fabs(y_45_scale);
      double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
      	double tmp;
      	if (y_45_scale_m <= 2.7e+58) {
      		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * sqrt(8.0))) * hypot((b * sin((angle * (0.005555555555555556 * ((double) M_PI))))), a));
      	} else {
      		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((((double) M_PI) * ((double) M_PI)) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * pow(((double) M_PI), 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
      	}
      	return tmp;
      }
      
      x-scale_m = Math.abs(x_45_scale);
      y-scale_m = Math.abs(y_45_scale);
      public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
      	double tmp;
      	if (y_45_scale_m <= 2.7e+58) {
      		tmp = Math.sqrt(2.0) * ((0.25 * (x_45_scale_m * Math.sqrt(8.0))) * Math.hypot((b * Math.sin((angle * (0.005555555555555556 * Math.PI)))), a));
      	} else {
      		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((Math.PI * Math.PI) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * Math.pow(Math.PI, 4.0)))))) * (Math.sqrt(8.0) * Math.sqrt(2.0)));
      	}
      	return tmp;
      }
      
      x-scale_m = math.fabs(x_45_scale)
      y-scale_m = math.fabs(y_45_scale)
      def code(a, b, angle, x_45_scale_m, y_45_scale_m):
      	tmp = 0
      	if y_45_scale_m <= 2.7e+58:
      		tmp = math.sqrt(2.0) * ((0.25 * (x_45_scale_m * math.sqrt(8.0))) * math.hypot((b * math.sin((angle * (0.005555555555555556 * math.pi)))), a))
      	else:
      		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((math.pi * math.pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * math.pow(math.pi, 4.0)))))) * (math.sqrt(8.0) * math.sqrt(2.0)))
      	return tmp
      
      x-scale_m = abs(x_45_scale)
      y-scale_m = abs(y_45_scale)
      function code(a, b, angle, x_45_scale_m, y_45_scale_m)
      	tmp = 0.0
      	if (y_45_scale_m <= 2.7e+58)
      		tmp = Float64(sqrt(2.0) * Float64(Float64(0.25 * Float64(x_45_scale_m * sqrt(8.0))) * hypot(Float64(b * sin(Float64(angle * Float64(0.005555555555555556 * pi)))), a)));
      	else
      		tmp = Float64(Float64(0.25 * b) * Float64(Float64(y_45_scale_m * Float64(1.0 + Float64(Float64(angle * angle) * Float64(Float64(Float64(pi * pi) * -1.54320987654321e-5) + Float64(Float64(Float64(angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * Float64(sqrt(8.0) * sqrt(2.0))));
      	end
      	return tmp
      end
      
      x-scale_m = abs(x_45_scale);
      y-scale_m = abs(y_45_scale);
      function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
      	tmp = 0.0;
      	if (y_45_scale_m <= 2.7e+58)
      		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * sqrt(8.0))) * hypot((b * sin((angle * (0.005555555555555556 * pi)))), a));
      	else
      		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((pi * pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
      	end
      	tmp_2 = tmp;
      end
      
      x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
      y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
      code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[y$45$scale$95$m, 2.7e+58], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(0.25 * N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(b * N[Sin[N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + a ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.25 * b), $MachinePrecision] * N[(N[(y$45$scale$95$m * N[(1.0 + N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -1.54320987654321e-5), $MachinePrecision] + N[(N[(N[(angle * angle), $MachinePrecision] * 3.969161205100849e-11), $MachinePrecision] * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      x-scale_m = \left|x-scale\right|
      \\
      y-scale_m = \left|y-scale\right|
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y-scale\_m \leq 2.7 \cdot 10^{+58}:\\
      \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y-scale < 2.7000000000000001e58

        1. Initial program 2.4%

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

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

            \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
          2. *-lowering-*.f64N/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
          7. distribute-lft-outN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
        5. Simplified23.3%

          \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
          2. sqrt-prodN/A

            \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
          3. pow1/2N/A

            \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
          4. associate-*l*N/A

            \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
          5. *-lowering-*.f64N/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
        7. Applied egg-rr25.2%

          \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
        8. Taylor expanded in angle around 0

          \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \color{blue}{1}\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
        9. Step-by-step derivation
          1. Simplified25.1%

            \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \color{blue}{1}\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
          2. Step-by-step derivation
            1. *-rgt-identity25.1%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), a\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
          3. Applied egg-rr25.1%

            \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), \color{blue}{a}\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]

          if 2.7000000000000001e58 < y-scale

          1. Initial program 3.5%

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

            \[\leadsto \color{blue}{\frac{1}{4} \cdot \left(\left(b \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)} \]
          4. Simplified18.8%

            \[\leadsto \color{blue}{\left(0.25 \cdot \left(\left(b \cdot x-scale\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{\frac{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}} \]
          5. Taylor expanded in x-scale around 0

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

              \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)}\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\color{blue}{y-scale} \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right) \]
            4. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
            8. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{\color{blue}{2}} \cdot \sqrt{8}\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
            11. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\left(\sqrt{2}\right), \color{blue}{\left(\sqrt{8}\right)}\right)\right)\right) \]
            13. sqrt-lowering-sqrt.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\sqrt{\color{blue}{8}}\right)\right)\right)\right) \]
            14. sqrt-lowering-sqrt.f6428.7%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          7. Simplified28.7%

            \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
          8. Taylor expanded in angle around 0

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(1 + {angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)}, y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          9. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{2}\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({angle}^{2}\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({\mathsf{PI}\left(\right)}^{2}\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            8. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            10. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            11. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            12. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            13. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            14. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left({angle}^{2}\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            15. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left(angle \cdot angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            16. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            17. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            18. PI-lowering-PI.f6426.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
          10. Simplified26.0%

            \[\leadsto \left(0.25 \cdot b\right) \cdot \left(\left(\color{blue}{\left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(3.969161205100849 \cdot 10^{-11} \cdot \left(angle \cdot angle\right)\right) \cdot {\pi}^{4}\right)\right)} \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right) \]
        10. Recombined 2 regimes into one program.
        11. Final simplification25.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq 2.7 \cdot 10^{+58}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right), a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \]
        12. Add Preprocessing

        Alternative 7: 43.4% accurate, 6.5× speedup?

        \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;y-scale\_m \leq 10^{+62}:\\ \;\;\;\;\sqrt{2} \cdot \left(\sqrt{8} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), a\right) \cdot \left(x-scale\_m \cdot 0.25\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \end{array} \]
        x-scale_m = (fabs.f64 x-scale)
        y-scale_m = (fabs.f64 y-scale)
        (FPCore (a b angle x-scale_m y-scale_m)
         :precision binary64
         (if (<= y-scale_m 1e+62)
           (*
            (sqrt 2.0)
            (*
             (sqrt 8.0)
             (*
              (hypot (* b (sin (* 0.005555555555555556 (* angle PI)))) a)
              (* x-scale_m 0.25))))
           (*
            (* 0.25 b)
            (*
             (*
              y-scale_m
              (+
               1.0
               (*
                (* angle angle)
                (+
                 (* (* PI PI) -1.54320987654321e-5)
                 (* (* (* angle angle) 3.969161205100849e-11) (pow PI 4.0))))))
             (* (sqrt 8.0) (sqrt 2.0))))))
        x-scale_m = fabs(x_45_scale);
        y-scale_m = fabs(y_45_scale);
        double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
        	double tmp;
        	if (y_45_scale_m <= 1e+62) {
        		tmp = sqrt(2.0) * (sqrt(8.0) * (hypot((b * sin((0.005555555555555556 * (angle * ((double) M_PI))))), a) * (x_45_scale_m * 0.25)));
        	} else {
        		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((((double) M_PI) * ((double) M_PI)) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * pow(((double) M_PI), 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
        	}
        	return tmp;
        }
        
        x-scale_m = Math.abs(x_45_scale);
        y-scale_m = Math.abs(y_45_scale);
        public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
        	double tmp;
        	if (y_45_scale_m <= 1e+62) {
        		tmp = Math.sqrt(2.0) * (Math.sqrt(8.0) * (Math.hypot((b * Math.sin((0.005555555555555556 * (angle * Math.PI)))), a) * (x_45_scale_m * 0.25)));
        	} else {
        		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((Math.PI * Math.PI) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * Math.pow(Math.PI, 4.0)))))) * (Math.sqrt(8.0) * Math.sqrt(2.0)));
        	}
        	return tmp;
        }
        
        x-scale_m = math.fabs(x_45_scale)
        y-scale_m = math.fabs(y_45_scale)
        def code(a, b, angle, x_45_scale_m, y_45_scale_m):
        	tmp = 0
        	if y_45_scale_m <= 1e+62:
        		tmp = math.sqrt(2.0) * (math.sqrt(8.0) * (math.hypot((b * math.sin((0.005555555555555556 * (angle * math.pi)))), a) * (x_45_scale_m * 0.25)))
        	else:
        		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((math.pi * math.pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * math.pow(math.pi, 4.0)))))) * (math.sqrt(8.0) * math.sqrt(2.0)))
        	return tmp
        
        x-scale_m = abs(x_45_scale)
        y-scale_m = abs(y_45_scale)
        function code(a, b, angle, x_45_scale_m, y_45_scale_m)
        	tmp = 0.0
        	if (y_45_scale_m <= 1e+62)
        		tmp = Float64(sqrt(2.0) * Float64(sqrt(8.0) * Float64(hypot(Float64(b * sin(Float64(0.005555555555555556 * Float64(angle * pi)))), a) * Float64(x_45_scale_m * 0.25))));
        	else
        		tmp = Float64(Float64(0.25 * b) * Float64(Float64(y_45_scale_m * Float64(1.0 + Float64(Float64(angle * angle) * Float64(Float64(Float64(pi * pi) * -1.54320987654321e-5) + Float64(Float64(Float64(angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * Float64(sqrt(8.0) * sqrt(2.0))));
        	end
        	return tmp
        end
        
        x-scale_m = abs(x_45_scale);
        y-scale_m = abs(y_45_scale);
        function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
        	tmp = 0.0;
        	if (y_45_scale_m <= 1e+62)
        		tmp = sqrt(2.0) * (sqrt(8.0) * (hypot((b * sin((0.005555555555555556 * (angle * pi)))), a) * (x_45_scale_m * 0.25)));
        	else
        		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((pi * pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
        	end
        	tmp_2 = tmp;
        end
        
        x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
        y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
        code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[y$45$scale$95$m, 1e+62], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[8.0], $MachinePrecision] * N[(N[Sqrt[N[(b * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + a ^ 2], $MachinePrecision] * N[(x$45$scale$95$m * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.25 * b), $MachinePrecision] * N[(N[(y$45$scale$95$m * N[(1.0 + N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -1.54320987654321e-5), $MachinePrecision] + N[(N[(N[(angle * angle), $MachinePrecision] * 3.969161205100849e-11), $MachinePrecision] * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        x-scale_m = \left|x-scale\right|
        \\
        y-scale_m = \left|y-scale\right|
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y-scale\_m \leq 10^{+62}:\\
        \;\;\;\;\sqrt{2} \cdot \left(\sqrt{8} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), a\right) \cdot \left(x-scale\_m \cdot 0.25\right)\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y-scale < 1.00000000000000004e62

          1. Initial program 2.4%

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

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

              \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
            2. *-lowering-*.f64N/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
            7. distribute-lft-outN/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
          5. Simplified23.3%

            \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
          6. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
            2. sqrt-prodN/A

              \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
            3. pow1/2N/A

              \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
            4. associate-*l*N/A

              \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
            5. *-lowering-*.f64N/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
          7. Applied egg-rr25.2%

            \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
          8. Taylor expanded in angle around 0

            \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \color{blue}{1}\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
          9. Step-by-step derivation
            1. Simplified25.1%

              \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \color{blue}{1}\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
            2. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\sqrt{\left(b \cdot \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \left(b \cdot \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) + \left(a \cdot 1\right) \cdot \left(a \cdot 1\right)} \cdot \left(\left(\frac{1}{4} \cdot x-scale\right) \cdot \color{blue}{\sqrt{8}}\right)\right)\right) \]
              2. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\left(\sqrt{\left(b \cdot \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \left(b \cdot \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) + \left(a \cdot 1\right) \cdot \left(a \cdot 1\right)} \cdot \left(\frac{1}{4} \cdot x-scale\right)\right) \cdot \color{blue}{\sqrt{8}}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\left(\sqrt{\left(b \cdot \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \left(b \cdot \sin \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)\right)\right) + \left(a \cdot 1\right) \cdot \left(a \cdot 1\right)} \cdot \left(\frac{1}{4} \cdot x-scale\right)\right), \color{blue}{\left(\sqrt{8}\right)}\right)\right) \]
            3. Applied egg-rr25.1%

              \[\leadsto \sqrt{2} \cdot \color{blue}{\left(\left(\mathsf{hypot}\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), a\right) \cdot \left(0.25 \cdot x-scale\right)\right) \cdot \sqrt{8}\right)} \]

            if 1.00000000000000004e62 < y-scale

            1. Initial program 3.5%

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

              \[\leadsto \color{blue}{\frac{1}{4} \cdot \left(\left(b \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)} \]
            4. Simplified18.8%

              \[\leadsto \color{blue}{\left(0.25 \cdot \left(\left(b \cdot x-scale\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{\frac{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}} \]
            5. Taylor expanded in x-scale around 0

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

                \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)}\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\color{blue}{y-scale} \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
              8. cos-lowering-cos.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{\color{blue}{2}} \cdot \sqrt{8}\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
              11. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\left(\sqrt{2}\right), \color{blue}{\left(\sqrt{8}\right)}\right)\right)\right) \]
              13. sqrt-lowering-sqrt.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\sqrt{\color{blue}{8}}\right)\right)\right)\right) \]
              14. sqrt-lowering-sqrt.f6428.7%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            7. Simplified28.7%

              \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
            8. Taylor expanded in angle around 0

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(1 + {angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)}, y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            9. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{2}\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({angle}^{2}\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              3. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({\mathsf{PI}\left(\right)}^{2}\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              8. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              10. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              11. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              12. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              13. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              14. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left({angle}^{2}\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              15. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left(angle \cdot angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              17. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              18. PI-lowering-PI.f6426.0%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
            10. Simplified26.0%

              \[\leadsto \left(0.25 \cdot b\right) \cdot \left(\left(\color{blue}{\left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(3.969161205100849 \cdot 10^{-11} \cdot \left(angle \cdot angle\right)\right) \cdot {\pi}^{4}\right)\right)} \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right) \]
          10. Recombined 2 regimes into one program.
          11. Final simplification25.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq 10^{+62}:\\ \;\;\;\;\sqrt{2} \cdot \left(\sqrt{8} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), a\right) \cdot \left(x-scale \cdot 0.25\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \]
          12. Add Preprocessing

          Alternative 8: 41.6% accurate, 8.2× speedup?

          \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;y-scale\_m \leq 6.6 \cdot 10^{+62}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right), a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \end{array} \]
          x-scale_m = (fabs.f64 x-scale)
          y-scale_m = (fabs.f64 y-scale)
          (FPCore (a b angle x-scale_m y-scale_m)
           :precision binary64
           (if (<= y-scale_m 6.6e+62)
             (*
              (sqrt 2.0)
              (*
               (* 0.25 (* x-scale_m (sqrt 8.0)))
               (hypot (* 0.005555555555555556 (* angle (* b PI))) a)))
             (*
              (* 0.25 b)
              (*
               (*
                y-scale_m
                (+
                 1.0
                 (*
                  (* angle angle)
                  (+
                   (* (* PI PI) -1.54320987654321e-5)
                   (* (* (* angle angle) 3.969161205100849e-11) (pow PI 4.0))))))
               (* (sqrt 8.0) (sqrt 2.0))))))
          x-scale_m = fabs(x_45_scale);
          y-scale_m = fabs(y_45_scale);
          double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
          	double tmp;
          	if (y_45_scale_m <= 6.6e+62) {
          		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * sqrt(8.0))) * hypot((0.005555555555555556 * (angle * (b * ((double) M_PI)))), a));
          	} else {
          		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((((double) M_PI) * ((double) M_PI)) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * pow(((double) M_PI), 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
          	}
          	return tmp;
          }
          
          x-scale_m = Math.abs(x_45_scale);
          y-scale_m = Math.abs(y_45_scale);
          public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
          	double tmp;
          	if (y_45_scale_m <= 6.6e+62) {
          		tmp = Math.sqrt(2.0) * ((0.25 * (x_45_scale_m * Math.sqrt(8.0))) * Math.hypot((0.005555555555555556 * (angle * (b * Math.PI))), a));
          	} else {
          		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((Math.PI * Math.PI) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * Math.pow(Math.PI, 4.0)))))) * (Math.sqrt(8.0) * Math.sqrt(2.0)));
          	}
          	return tmp;
          }
          
          x-scale_m = math.fabs(x_45_scale)
          y-scale_m = math.fabs(y_45_scale)
          def code(a, b, angle, x_45_scale_m, y_45_scale_m):
          	tmp = 0
          	if y_45_scale_m <= 6.6e+62:
          		tmp = math.sqrt(2.0) * ((0.25 * (x_45_scale_m * math.sqrt(8.0))) * math.hypot((0.005555555555555556 * (angle * (b * math.pi))), a))
          	else:
          		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((math.pi * math.pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * math.pow(math.pi, 4.0)))))) * (math.sqrt(8.0) * math.sqrt(2.0)))
          	return tmp
          
          x-scale_m = abs(x_45_scale)
          y-scale_m = abs(y_45_scale)
          function code(a, b, angle, x_45_scale_m, y_45_scale_m)
          	tmp = 0.0
          	if (y_45_scale_m <= 6.6e+62)
          		tmp = Float64(sqrt(2.0) * Float64(Float64(0.25 * Float64(x_45_scale_m * sqrt(8.0))) * hypot(Float64(0.005555555555555556 * Float64(angle * Float64(b * pi))), a)));
          	else
          		tmp = Float64(Float64(0.25 * b) * Float64(Float64(y_45_scale_m * Float64(1.0 + Float64(Float64(angle * angle) * Float64(Float64(Float64(pi * pi) * -1.54320987654321e-5) + Float64(Float64(Float64(angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * Float64(sqrt(8.0) * sqrt(2.0))));
          	end
          	return tmp
          end
          
          x-scale_m = abs(x_45_scale);
          y-scale_m = abs(y_45_scale);
          function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
          	tmp = 0.0;
          	if (y_45_scale_m <= 6.6e+62)
          		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * sqrt(8.0))) * hypot((0.005555555555555556 * (angle * (b * pi))), a));
          	else
          		tmp = (0.25 * b) * ((y_45_scale_m * (1.0 + ((angle * angle) * (((pi * pi) * -1.54320987654321e-5) + (((angle * angle) * 3.969161205100849e-11) * (pi ^ 4.0)))))) * (sqrt(8.0) * sqrt(2.0)));
          	end
          	tmp_2 = tmp;
          end
          
          x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
          y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
          code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[y$45$scale$95$m, 6.6e+62], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(0.25 * N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(0.005555555555555556 * N[(angle * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2 + a ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.25 * b), $MachinePrecision] * N[(N[(y$45$scale$95$m * N[(1.0 + N[(N[(angle * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -1.54320987654321e-5), $MachinePrecision] + N[(N[(N[(angle * angle), $MachinePrecision] * 3.969161205100849e-11), $MachinePrecision] * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          x-scale_m = \left|x-scale\right|
          \\
          y-scale_m = \left|y-scale\right|
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y-scale\_m \leq 6.6 \cdot 10^{+62}:\\
          \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right), a\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale\_m \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y-scale < 6.6e62

            1. Initial program 2.4%

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

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

                \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
              2. *-lowering-*.f64N/A

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
              7. distribute-lft-outN/A

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
            5. Simplified23.3%

              \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
              2. sqrt-prodN/A

                \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
              3. pow1/2N/A

                \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
              4. associate-*l*N/A

                \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
              5. *-lowering-*.f64N/A

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
            7. Applied egg-rr25.2%

              \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
            8. Taylor expanded in angle around 0

              \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \color{blue}{1}\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
            9. Step-by-step derivation
              1. Simplified25.1%

                \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \color{blue}{1}\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
              2. Taylor expanded in angle around 0

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)\right)}, \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
              3. Step-by-step derivation
                1. *-lowering-*.f64N/A

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \left(b \cdot \mathsf{PI}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                3. *-commutativeN/A

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), b\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                5. PI-lowering-PI.f6425.8%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), b\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
              4. Simplified25.8%

                \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(\color{blue}{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)}, a \cdot 1\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]

              if 6.6e62 < y-scale

              1. Initial program 3.5%

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

                \[\leadsto \color{blue}{\frac{1}{4} \cdot \left(\left(b \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)} \]
              4. Simplified18.8%

                \[\leadsto \color{blue}{\left(0.25 \cdot \left(\left(b \cdot x-scale\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{\frac{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}} \]
              5. Taylor expanded in x-scale around 0

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

                  \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)} \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), \color{blue}{\left(y-scale \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)}\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\color{blue}{y-scale} \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right) \]
                4. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(y-scale \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
                6. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), y-scale\right), \left(\color{blue}{\sqrt{2}} \cdot \sqrt{8}\right)\right)\right) \]
                8. cos-lowering-cos.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{\color{blue}{2}} \cdot \sqrt{8}\right)\right)\right) \]
                9. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
                11. PI-lowering-PI.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right) \]
                12. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\left(\sqrt{2}\right), \color{blue}{\left(\sqrt{8}\right)}\right)\right)\right) \]
                13. sqrt-lowering-sqrt.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\sqrt{\color{blue}{8}}\right)\right)\right)\right) \]
                14. sqrt-lowering-sqrt.f6428.7%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              7. Simplified28.7%

                \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
              8. Taylor expanded in angle around 0

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(1 + {angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)}, y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              9. Step-by-step derivation
                1. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \left({angle}^{2} \cdot \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{2}\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({angle}^{2}\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                3. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left(\frac{-1}{64800} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                6. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({\mathsf{PI}\left(\right)}^{2}\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                8. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                9. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                10. PI-lowering-PI.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                11. PI-lowering-PI.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\frac{1}{25194240000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                12. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                13. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\left(\frac{1}{25194240000} \cdot {angle}^{2}\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                14. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left({angle}^{2}\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                15. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \left(angle \cdot angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                16. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \left({\mathsf{PI}\left(\right)}^{4}\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                17. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                18. PI-lowering-PI.f6426.0%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{64800}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{25194240000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), 4\right)\right)\right)\right)\right), y-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
              10. Simplified26.0%

                \[\leadsto \left(0.25 \cdot b\right) \cdot \left(\left(\color{blue}{\left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(3.969161205100849 \cdot 10^{-11} \cdot \left(angle \cdot angle\right)\right) \cdot {\pi}^{4}\right)\right)} \cdot y-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right) \]
            10. Recombined 2 regimes into one program.
            11. Final simplification25.9%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq 6.6 \cdot 10^{+62}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right), a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5} + \left(\left(angle \cdot angle\right) \cdot 3.969161205100849 \cdot 10^{-11}\right) \cdot {\pi}^{4}\right)\right)\right) \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\\ \end{array} \]
            12. Add Preprocessing

            Alternative 9: 42.5% accurate, 8.6× speedup?

            \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;x-scale\_m \leq 4.5 \cdot 10^{+27}:\\ \;\;\;\;y-scale\_m \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right), a\right)\right)\\ \end{array} \end{array} \]
            x-scale_m = (fabs.f64 x-scale)
            y-scale_m = (fabs.f64 y-scale)
            (FPCore (a b angle x-scale_m y-scale_m)
             :precision binary64
             (if (<= x-scale_m 4.5e+27)
               (* y-scale_m b)
               (*
                (sqrt 2.0)
                (*
                 (* 0.25 (* x-scale_m (sqrt 8.0)))
                 (hypot (* 0.005555555555555556 (* angle (* b PI))) a)))))
            x-scale_m = fabs(x_45_scale);
            y-scale_m = fabs(y_45_scale);
            double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
            	double tmp;
            	if (x_45_scale_m <= 4.5e+27) {
            		tmp = y_45_scale_m * b;
            	} else {
            		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * sqrt(8.0))) * hypot((0.005555555555555556 * (angle * (b * ((double) M_PI)))), a));
            	}
            	return tmp;
            }
            
            x-scale_m = Math.abs(x_45_scale);
            y-scale_m = Math.abs(y_45_scale);
            public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
            	double tmp;
            	if (x_45_scale_m <= 4.5e+27) {
            		tmp = y_45_scale_m * b;
            	} else {
            		tmp = Math.sqrt(2.0) * ((0.25 * (x_45_scale_m * Math.sqrt(8.0))) * Math.hypot((0.005555555555555556 * (angle * (b * Math.PI))), a));
            	}
            	return tmp;
            }
            
            x-scale_m = math.fabs(x_45_scale)
            y-scale_m = math.fabs(y_45_scale)
            def code(a, b, angle, x_45_scale_m, y_45_scale_m):
            	tmp = 0
            	if x_45_scale_m <= 4.5e+27:
            		tmp = y_45_scale_m * b
            	else:
            		tmp = math.sqrt(2.0) * ((0.25 * (x_45_scale_m * math.sqrt(8.0))) * math.hypot((0.005555555555555556 * (angle * (b * math.pi))), a))
            	return tmp
            
            x-scale_m = abs(x_45_scale)
            y-scale_m = abs(y_45_scale)
            function code(a, b, angle, x_45_scale_m, y_45_scale_m)
            	tmp = 0.0
            	if (x_45_scale_m <= 4.5e+27)
            		tmp = Float64(y_45_scale_m * b);
            	else
            		tmp = Float64(sqrt(2.0) * Float64(Float64(0.25 * Float64(x_45_scale_m * sqrt(8.0))) * hypot(Float64(0.005555555555555556 * Float64(angle * Float64(b * pi))), a)));
            	end
            	return tmp
            end
            
            x-scale_m = abs(x_45_scale);
            y-scale_m = abs(y_45_scale);
            function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
            	tmp = 0.0;
            	if (x_45_scale_m <= 4.5e+27)
            		tmp = y_45_scale_m * b;
            	else
            		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * sqrt(8.0))) * hypot((0.005555555555555556 * (angle * (b * pi))), a));
            	end
            	tmp_2 = tmp;
            end
            
            x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
            y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
            code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[x$45$scale$95$m, 4.5e+27], N[(y$45$scale$95$m * b), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(0.25 * N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(0.005555555555555556 * N[(angle * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2 + a ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            x-scale_m = \left|x-scale\right|
            \\
            y-scale_m = \left|y-scale\right|
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x-scale\_m \leq 4.5 \cdot 10^{+27}:\\
            \;\;\;\;y-scale\_m \cdot b\\
            
            \mathbf{else}:\\
            \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right), a\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x-scale < 4.4999999999999999e27

              1. Initial program 2.4%

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

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

                  \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
                2. *-lowering-*.f64N/A

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \left(\sqrt{8}\right)\right)\right) \]
                8. sqrt-lowering-sqrt.f6419.2%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \mathsf{sqrt.f64}\left(8\right)\right)\right) \]
              5. Simplified19.2%

                \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \sqrt{8}\right)} \]
              6. Step-by-step derivation
                1. associate-*l*N/A

                  \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right) \]
                2. sqrt-unprodN/A

                  \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{2 \cdot 8}\right) \]
                3. metadata-evalN/A

                  \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{16}\right) \]
                4. metadata-evalN/A

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), y-scale\right), 4\right) \]
                8. *-lowering-*.f6419.3%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), y-scale\right), 4\right) \]
              7. Applied egg-rr19.3%

                \[\leadsto \color{blue}{\left(\left(0.25 \cdot b\right) \cdot y-scale\right) \cdot 4} \]
              8. Taylor expanded in b around 0

                \[\leadsto \color{blue}{b \cdot y-scale} \]
              9. Step-by-step derivation
                1. *-lowering-*.f6419.3%

                  \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{y-scale}\right) \]
              10. Simplified19.3%

                \[\leadsto \color{blue}{b \cdot y-scale} \]

              if 4.4999999999999999e27 < x-scale

              1. Initial program 3.7%

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

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

                  \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
                2. *-lowering-*.f64N/A

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                7. distribute-lft-outN/A

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
              5. Simplified63.3%

                \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
              6. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
                2. sqrt-prodN/A

                  \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
                3. pow1/2N/A

                  \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
                4. associate-*l*N/A

                  \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
                5. *-lowering-*.f64N/A

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
              7. Applied egg-rr68.1%

                \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
              8. Taylor expanded in angle around 0

                \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \color{blue}{1}\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
              9. Step-by-step derivation
                1. Simplified68.3%

                  \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \color{blue}{1}\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
                2. Taylor expanded in angle around 0

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)\right)}, \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                3. Step-by-step derivation
                  1. *-lowering-*.f64N/A

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \left(b \cdot \mathsf{PI}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                  3. *-commutativeN/A

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), b\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                  5. PI-lowering-PI.f6466.7%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), b\right)\right)\right), \mathsf{*.f64}\left(a, 1\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                4. Simplified66.7%

                  \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(\color{blue}{0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)}, a \cdot 1\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
              10. Recombined 2 regimes into one program.
              11. Final simplification30.4%

                \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 4.5 \cdot 10^{+27}:\\ \;\;\;\;y-scale \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \mathsf{hypot}\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right), a\right)\right)\\ \end{array} \]
              12. Add Preprocessing

              Alternative 10: 24.7% accurate, 12.0× speedup?

              \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;x-scale\_m \leq 0.00065:\\ \;\;\;\;y-scale\_m \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \left(a + 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{\pi \cdot \pi}{a}\right)\right)\right)\right)\\ \end{array} \end{array} \]
              x-scale_m = (fabs.f64 x-scale)
              y-scale_m = (fabs.f64 y-scale)
              (FPCore (a b angle x-scale_m y-scale_m)
               :precision binary64
               (if (<= x-scale_m 0.00065)
                 (* y-scale_m b)
                 (*
                  (sqrt 2.0)
                  (*
                   (* 0.25 (* x-scale_m (sqrt 8.0)))
                   (+
                    a
                    (*
                     1.54320987654321e-5
                     (* (* angle angle) (* (* b b) (/ (* PI PI) a)))))))))
              x-scale_m = fabs(x_45_scale);
              y-scale_m = fabs(y_45_scale);
              double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
              	double tmp;
              	if (x_45_scale_m <= 0.00065) {
              		tmp = y_45_scale_m * b;
              	} else {
              		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * sqrt(8.0))) * (a + (1.54320987654321e-5 * ((angle * angle) * ((b * b) * ((((double) M_PI) * ((double) M_PI)) / a))))));
              	}
              	return tmp;
              }
              
              x-scale_m = Math.abs(x_45_scale);
              y-scale_m = Math.abs(y_45_scale);
              public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
              	double tmp;
              	if (x_45_scale_m <= 0.00065) {
              		tmp = y_45_scale_m * b;
              	} else {
              		tmp = Math.sqrt(2.0) * ((0.25 * (x_45_scale_m * Math.sqrt(8.0))) * (a + (1.54320987654321e-5 * ((angle * angle) * ((b * b) * ((Math.PI * Math.PI) / a))))));
              	}
              	return tmp;
              }
              
              x-scale_m = math.fabs(x_45_scale)
              y-scale_m = math.fabs(y_45_scale)
              def code(a, b, angle, x_45_scale_m, y_45_scale_m):
              	tmp = 0
              	if x_45_scale_m <= 0.00065:
              		tmp = y_45_scale_m * b
              	else:
              		tmp = math.sqrt(2.0) * ((0.25 * (x_45_scale_m * math.sqrt(8.0))) * (a + (1.54320987654321e-5 * ((angle * angle) * ((b * b) * ((math.pi * math.pi) / a))))))
              	return tmp
              
              x-scale_m = abs(x_45_scale)
              y-scale_m = abs(y_45_scale)
              function code(a, b, angle, x_45_scale_m, y_45_scale_m)
              	tmp = 0.0
              	if (x_45_scale_m <= 0.00065)
              		tmp = Float64(y_45_scale_m * b);
              	else
              		tmp = Float64(sqrt(2.0) * Float64(Float64(0.25 * Float64(x_45_scale_m * sqrt(8.0))) * Float64(a + Float64(1.54320987654321e-5 * Float64(Float64(angle * angle) * Float64(Float64(b * b) * Float64(Float64(pi * pi) / a)))))));
              	end
              	return tmp
              end
              
              x-scale_m = abs(x_45_scale);
              y-scale_m = abs(y_45_scale);
              function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
              	tmp = 0.0;
              	if (x_45_scale_m <= 0.00065)
              		tmp = y_45_scale_m * b;
              	else
              		tmp = sqrt(2.0) * ((0.25 * (x_45_scale_m * sqrt(8.0))) * (a + (1.54320987654321e-5 * ((angle * angle) * ((b * b) * ((pi * pi) / a))))));
              	end
              	tmp_2 = tmp;
              end
              
              x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
              y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
              code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[x$45$scale$95$m, 0.00065], N[(y$45$scale$95$m * b), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(0.25 * N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a + N[(1.54320987654321e-5 * N[(N[(angle * angle), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              x-scale_m = \left|x-scale\right|
              \\
              y-scale_m = \left|y-scale\right|
              
              \\
              \begin{array}{l}
              \mathbf{if}\;x-scale\_m \leq 0.00065:\\
              \;\;\;\;y-scale\_m \cdot b\\
              
              \mathbf{else}:\\
              \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \left(a + 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{\pi \cdot \pi}{a}\right)\right)\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x-scale < 6.4999999999999997e-4

                1. Initial program 2.5%

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

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

                    \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
                  2. *-lowering-*.f64N/A

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \left(\sqrt{8}\right)\right)\right) \]
                  8. sqrt-lowering-sqrt.f6418.9%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \mathsf{sqrt.f64}\left(8\right)\right)\right) \]
                5. Simplified18.9%

                  \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \sqrt{8}\right)} \]
                6. Step-by-step derivation
                  1. associate-*l*N/A

                    \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right) \]
                  2. sqrt-unprodN/A

                    \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{2 \cdot 8}\right) \]
                  3. metadata-evalN/A

                    \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{16}\right) \]
                  4. metadata-evalN/A

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), y-scale\right), 4\right) \]
                  8. *-lowering-*.f6419.1%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), y-scale\right), 4\right) \]
                7. Applied egg-rr19.1%

                  \[\leadsto \color{blue}{\left(\left(0.25 \cdot b\right) \cdot y-scale\right) \cdot 4} \]
                8. Taylor expanded in b around 0

                  \[\leadsto \color{blue}{b \cdot y-scale} \]
                9. Step-by-step derivation
                  1. *-lowering-*.f6419.1%

                    \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{y-scale}\right) \]
                10. Simplified19.1%

                  \[\leadsto \color{blue}{b \cdot y-scale} \]

                if 6.4999999999999997e-4 < x-scale

                1. Initial program 3.2%

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

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

                    \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
                  2. *-lowering-*.f64N/A

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                  7. distribute-lft-outN/A

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                5. Simplified58.7%

                  \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
                6. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
                  2. sqrt-prodN/A

                    \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
                  3. pow1/2N/A

                    \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
                  4. associate-*l*N/A

                    \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
                  5. *-lowering-*.f64N/A

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
                7. Applied egg-rr62.2%

                  \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
                8. Taylor expanded in angle around 0

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(\mathsf{*.f64}\left(b, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), \mathsf{*.f64}\left(a, \color{blue}{1}\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                9. Step-by-step derivation
                  1. Simplified62.1%

                    \[\leadsto \sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \color{blue}{1}\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
                  2. Taylor expanded in angle around 0

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\color{blue}{\left(a + \frac{1}{64800} \cdot \frac{{angle}^{2} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}{a}\right)}, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                  3. Step-by-step derivation
                    1. +-lowering-+.f64N/A

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \left(\frac{{angle}^{2} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}{a}\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    3. associate-/l*N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \left({angle}^{2} \cdot \frac{{b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{a}\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    4. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\left({angle}^{2}\right), \left(\frac{{b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{a}\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    5. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\frac{{b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{a}\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\frac{{b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}}{a}\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    7. associate-/l*N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left({b}^{2} \cdot \frac{{\mathsf{PI}\left(\right)}^{2}}{a}\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    8. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\left({b}^{2}\right), \left(\frac{{\mathsf{PI}\left(\right)}^{2}}{a}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    9. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\left(b \cdot b\right), \left(\frac{{\mathsf{PI}\left(\right)}^{2}}{a}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    10. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\frac{{\mathsf{PI}\left(\right)}^{2}}{a}\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    11. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{/.f64}\left(\left({\mathsf{PI}\left(\right)}^{2}\right), a\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    12. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{/.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), a\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    13. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right), a\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    14. PI-lowering-PI.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right), a\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                    15. PI-lowering-PI.f6422.7%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{64800}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), a\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                  4. Simplified22.7%

                    \[\leadsto \sqrt{2} \cdot \left(\color{blue}{\left(a + 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{\pi \cdot \pi}{a}\right)\right)\right)} \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
                10. Recombined 2 regimes into one program.
                11. Final simplification20.1%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 0.00065:\\ \;\;\;\;y-scale \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a + 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \frac{\pi \cdot \pi}{a}\right)\right)\right)\right)\\ \end{array} \]
                12. Add Preprocessing

                Alternative 11: 27.0% accurate, 12.6× speedup?

                \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 10^{+94}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(\sqrt{8} \cdot y-scale\_m\right) \cdot \left(x-scale\_m \cdot b\right)\right)\right) \cdot \frac{\sqrt{2}}{x-scale\_m}\\ \end{array} \end{array} \]
                x-scale_m = (fabs.f64 x-scale)
                y-scale_m = (fabs.f64 y-scale)
                (FPCore (a b angle x-scale_m y-scale_m)
                 :precision binary64
                 (if (<= b 1e+94)
                   (* (* 0.25 (* x-scale_m (sqrt 8.0))) (* (sqrt 2.0) a))
                   (*
                    (* 0.25 (* (* (sqrt 8.0) y-scale_m) (* x-scale_m b)))
                    (/ (sqrt 2.0) x-scale_m))))
                x-scale_m = fabs(x_45_scale);
                y-scale_m = fabs(y_45_scale);
                double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                	double tmp;
                	if (b <= 1e+94) {
                		tmp = (0.25 * (x_45_scale_m * sqrt(8.0))) * (sqrt(2.0) * a);
                	} else {
                		tmp = (0.25 * ((sqrt(8.0) * y_45_scale_m) * (x_45_scale_m * b))) * (sqrt(2.0) / x_45_scale_m);
                	}
                	return tmp;
                }
                
                x-scale_m = abs(x_45scale)
                y-scale_m = abs(y_45scale)
                real(8) function code(a, b, angle, x_45scale_m, y_45scale_m)
                    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_m
                    real(8) :: tmp
                    if (b <= 1d+94) then
                        tmp = (0.25d0 * (x_45scale_m * sqrt(8.0d0))) * (sqrt(2.0d0) * a)
                    else
                        tmp = (0.25d0 * ((sqrt(8.0d0) * y_45scale_m) * (x_45scale_m * b))) * (sqrt(2.0d0) / x_45scale_m)
                    end if
                    code = tmp
                end function
                
                x-scale_m = Math.abs(x_45_scale);
                y-scale_m = Math.abs(y_45_scale);
                public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                	double tmp;
                	if (b <= 1e+94) {
                		tmp = (0.25 * (x_45_scale_m * Math.sqrt(8.0))) * (Math.sqrt(2.0) * a);
                	} else {
                		tmp = (0.25 * ((Math.sqrt(8.0) * y_45_scale_m) * (x_45_scale_m * b))) * (Math.sqrt(2.0) / x_45_scale_m);
                	}
                	return tmp;
                }
                
                x-scale_m = math.fabs(x_45_scale)
                y-scale_m = math.fabs(y_45_scale)
                def code(a, b, angle, x_45_scale_m, y_45_scale_m):
                	tmp = 0
                	if b <= 1e+94:
                		tmp = (0.25 * (x_45_scale_m * math.sqrt(8.0))) * (math.sqrt(2.0) * a)
                	else:
                		tmp = (0.25 * ((math.sqrt(8.0) * y_45_scale_m) * (x_45_scale_m * b))) * (math.sqrt(2.0) / x_45_scale_m)
                	return tmp
                
                x-scale_m = abs(x_45_scale)
                y-scale_m = abs(y_45_scale)
                function code(a, b, angle, x_45_scale_m, y_45_scale_m)
                	tmp = 0.0
                	if (b <= 1e+94)
                		tmp = Float64(Float64(0.25 * Float64(x_45_scale_m * sqrt(8.0))) * Float64(sqrt(2.0) * a));
                	else
                		tmp = Float64(Float64(0.25 * Float64(Float64(sqrt(8.0) * y_45_scale_m) * Float64(x_45_scale_m * b))) * Float64(sqrt(2.0) / x_45_scale_m));
                	end
                	return tmp
                end
                
                x-scale_m = abs(x_45_scale);
                y-scale_m = abs(y_45_scale);
                function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
                	tmp = 0.0;
                	if (b <= 1e+94)
                		tmp = (0.25 * (x_45_scale_m * sqrt(8.0))) * (sqrt(2.0) * a);
                	else
                		tmp = (0.25 * ((sqrt(8.0) * y_45_scale_m) * (x_45_scale_m * b))) * (sqrt(2.0) / x_45_scale_m);
                	end
                	tmp_2 = tmp;
                end
                
                x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
                y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
                code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[b, 1e+94], N[(N[(0.25 * N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * y$45$scale$95$m), $MachinePrecision] * N[(x$45$scale$95$m * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / x$45$scale$95$m), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                x-scale_m = \left|x-scale\right|
                \\
                y-scale_m = \left|y-scale\right|
                
                \\
                \begin{array}{l}
                \mathbf{if}\;b \leq 10^{+94}:\\
                \;\;\;\;\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot a\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(0.25 \cdot \left(\left(\sqrt{8} \cdot y-scale\_m\right) \cdot \left(x-scale\_m \cdot b\right)\right)\right) \cdot \frac{\sqrt{2}}{x-scale\_m}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if b < 1e94

                  1. Initial program 2.8%

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

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

                      \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
                    2. *-lowering-*.f64N/A

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                    7. distribute-lft-outN/A

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                  5. Simplified23.0%

                    \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
                  6. Taylor expanded in angle around 0

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \color{blue}{\left(a \cdot \sqrt{2}\right)}\right) \]
                  7. Step-by-step derivation
                    1. *-commutativeN/A

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{*.f64}\left(\left(\sqrt{2}\right), \color{blue}{a}\right)\right) \]
                    3. sqrt-lowering-sqrt.f6417.5%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), a\right)\right) \]
                  8. Simplified17.5%

                    \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot a\right)} \]

                  if 1e94 < b

                  1. Initial program 2.1%

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

                    \[\leadsto \color{blue}{\frac{1}{4} \cdot \left(\left(b \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)} \]
                  4. Simplified18.1%

                    \[\leadsto \color{blue}{\left(0.25 \cdot \left(\left(b \cdot x-scale\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{\frac{4 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{\left(x-scale \cdot x-scale\right) \cdot \left(y-scale \cdot y-scale\right)} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}} \]
                  5. Taylor expanded in angle around 0

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, x-scale\right), \mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right), \color{blue}{\left(\frac{\sqrt{2}}{x-scale}\right)}\right) \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, x-scale\right), \mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\sqrt{2}\right), \color{blue}{x-scale}\right)\right) \]
                    2. sqrt-lowering-sqrt.f6437.7%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, x-scale\right), \mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), x-scale\right)\right) \]
                  7. Simplified37.7%

                    \[\leadsto \left(0.25 \cdot \left(\left(b \cdot x-scale\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \color{blue}{\frac{\sqrt{2}}{x-scale}} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification21.7%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 10^{+94}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(\sqrt{8} \cdot y-scale\right) \cdot \left(x-scale \cdot b\right)\right)\right) \cdot \frac{\sqrt{2}}{x-scale}\\ \end{array} \]
                5. Add Preprocessing

                Alternative 12: 23.3% accurate, 12.9× speedup?

                \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;x-scale\_m \leq 1.35 \cdot 10^{+31}:\\ \;\;\;\;y-scale\_m \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot a\right)\\ \end{array} \end{array} \]
                x-scale_m = (fabs.f64 x-scale)
                y-scale_m = (fabs.f64 y-scale)
                (FPCore (a b angle x-scale_m y-scale_m)
                 :precision binary64
                 (if (<= x-scale_m 1.35e+31)
                   (* y-scale_m b)
                   (* (* 0.25 (* x-scale_m (sqrt 8.0))) (* (sqrt 2.0) a))))
                x-scale_m = fabs(x_45_scale);
                y-scale_m = fabs(y_45_scale);
                double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                	double tmp;
                	if (x_45_scale_m <= 1.35e+31) {
                		tmp = y_45_scale_m * b;
                	} else {
                		tmp = (0.25 * (x_45_scale_m * sqrt(8.0))) * (sqrt(2.0) * a);
                	}
                	return tmp;
                }
                
                x-scale_m = abs(x_45scale)
                y-scale_m = abs(y_45scale)
                real(8) function code(a, b, angle, x_45scale_m, y_45scale_m)
                    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_m
                    real(8) :: tmp
                    if (x_45scale_m <= 1.35d+31) then
                        tmp = y_45scale_m * b
                    else
                        tmp = (0.25d0 * (x_45scale_m * sqrt(8.0d0))) * (sqrt(2.0d0) * a)
                    end if
                    code = tmp
                end function
                
                x-scale_m = Math.abs(x_45_scale);
                y-scale_m = Math.abs(y_45_scale);
                public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                	double tmp;
                	if (x_45_scale_m <= 1.35e+31) {
                		tmp = y_45_scale_m * b;
                	} else {
                		tmp = (0.25 * (x_45_scale_m * Math.sqrt(8.0))) * (Math.sqrt(2.0) * a);
                	}
                	return tmp;
                }
                
                x-scale_m = math.fabs(x_45_scale)
                y-scale_m = math.fabs(y_45_scale)
                def code(a, b, angle, x_45_scale_m, y_45_scale_m):
                	tmp = 0
                	if x_45_scale_m <= 1.35e+31:
                		tmp = y_45_scale_m * b
                	else:
                		tmp = (0.25 * (x_45_scale_m * math.sqrt(8.0))) * (math.sqrt(2.0) * a)
                	return tmp
                
                x-scale_m = abs(x_45_scale)
                y-scale_m = abs(y_45_scale)
                function code(a, b, angle, x_45_scale_m, y_45_scale_m)
                	tmp = 0.0
                	if (x_45_scale_m <= 1.35e+31)
                		tmp = Float64(y_45_scale_m * b);
                	else
                		tmp = Float64(Float64(0.25 * Float64(x_45_scale_m * sqrt(8.0))) * Float64(sqrt(2.0) * a));
                	end
                	return tmp
                end
                
                x-scale_m = abs(x_45_scale);
                y-scale_m = abs(y_45_scale);
                function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
                	tmp = 0.0;
                	if (x_45_scale_m <= 1.35e+31)
                		tmp = y_45_scale_m * b;
                	else
                		tmp = (0.25 * (x_45_scale_m * sqrt(8.0))) * (sqrt(2.0) * a);
                	end
                	tmp_2 = tmp;
                end
                
                x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
                y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
                code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[x$45$scale$95$m, 1.35e+31], N[(y$45$scale$95$m * b), $MachinePrecision], N[(N[(0.25 * N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                x-scale_m = \left|x-scale\right|
                \\
                y-scale_m = \left|y-scale\right|
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x-scale\_m \leq 1.35 \cdot 10^{+31}:\\
                \;\;\;\;y-scale\_m \cdot b\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot a\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x-scale < 1.34999999999999993e31

                  1. Initial program 2.4%

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

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

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
                    2. *-lowering-*.f64N/A

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \left(\sqrt{8}\right)\right)\right) \]
                    8. sqrt-lowering-sqrt.f6419.2%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \mathsf{sqrt.f64}\left(8\right)\right)\right) \]
                  5. Simplified19.2%

                    \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \sqrt{8}\right)} \]
                  6. Step-by-step derivation
                    1. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right) \]
                    2. sqrt-unprodN/A

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{2 \cdot 8}\right) \]
                    3. metadata-evalN/A

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{16}\right) \]
                    4. metadata-evalN/A

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), y-scale\right), 4\right) \]
                    8. *-lowering-*.f6419.3%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), y-scale\right), 4\right) \]
                  7. Applied egg-rr19.3%

                    \[\leadsto \color{blue}{\left(\left(0.25 \cdot b\right) \cdot y-scale\right) \cdot 4} \]
                  8. Taylor expanded in b around 0

                    \[\leadsto \color{blue}{b \cdot y-scale} \]
                  9. Step-by-step derivation
                    1. *-lowering-*.f6419.3%

                      \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{y-scale}\right) \]
                  10. Simplified19.3%

                    \[\leadsto \color{blue}{b \cdot y-scale} \]

                  if 1.34999999999999993e31 < x-scale

                  1. Initial program 3.7%

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

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

                      \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
                    2. *-lowering-*.f64N/A

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                    7. distribute-lft-outN/A

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                  5. Simplified63.3%

                    \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
                  6. Taylor expanded in angle around 0

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \color{blue}{\left(a \cdot \sqrt{2}\right)}\right) \]
                  7. Step-by-step derivation
                    1. *-commutativeN/A

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{*.f64}\left(\left(\sqrt{2}\right), \color{blue}{a}\right)\right) \]
                    3. sqrt-lowering-sqrt.f6419.2%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), a\right)\right) \]
                  8. Simplified19.2%

                    \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot a\right)} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification19.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 1.35 \cdot 10^{+31}:\\ \;\;\;\;y-scale \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot a\right)\\ \end{array} \]
                5. Add Preprocessing

                Alternative 13: 23.3% accurate, 12.9× speedup?

                \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;x-scale\_m \leq 4.6 \cdot 10^{+28}:\\ \;\;\;\;y-scale\_m \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(a \cdot \left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right)\right)\\ \end{array} \end{array} \]
                x-scale_m = (fabs.f64 x-scale)
                y-scale_m = (fabs.f64 y-scale)
                (FPCore (a b angle x-scale_m y-scale_m)
                 :precision binary64
                 (if (<= x-scale_m 4.6e+28)
                   (* y-scale_m b)
                   (* (sqrt 2.0) (* a (* 0.25 (* x-scale_m (sqrt 8.0)))))))
                x-scale_m = fabs(x_45_scale);
                y-scale_m = fabs(y_45_scale);
                double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                	double tmp;
                	if (x_45_scale_m <= 4.6e+28) {
                		tmp = y_45_scale_m * b;
                	} else {
                		tmp = sqrt(2.0) * (a * (0.25 * (x_45_scale_m * sqrt(8.0))));
                	}
                	return tmp;
                }
                
                x-scale_m = abs(x_45scale)
                y-scale_m = abs(y_45scale)
                real(8) function code(a, b, angle, x_45scale_m, y_45scale_m)
                    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_m
                    real(8) :: tmp
                    if (x_45scale_m <= 4.6d+28) then
                        tmp = y_45scale_m * b
                    else
                        tmp = sqrt(2.0d0) * (a * (0.25d0 * (x_45scale_m * sqrt(8.0d0))))
                    end if
                    code = tmp
                end function
                
                x-scale_m = Math.abs(x_45_scale);
                y-scale_m = Math.abs(y_45_scale);
                public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                	double tmp;
                	if (x_45_scale_m <= 4.6e+28) {
                		tmp = y_45_scale_m * b;
                	} else {
                		tmp = Math.sqrt(2.0) * (a * (0.25 * (x_45_scale_m * Math.sqrt(8.0))));
                	}
                	return tmp;
                }
                
                x-scale_m = math.fabs(x_45_scale)
                y-scale_m = math.fabs(y_45_scale)
                def code(a, b, angle, x_45_scale_m, y_45_scale_m):
                	tmp = 0
                	if x_45_scale_m <= 4.6e+28:
                		tmp = y_45_scale_m * b
                	else:
                		tmp = math.sqrt(2.0) * (a * (0.25 * (x_45_scale_m * math.sqrt(8.0))))
                	return tmp
                
                x-scale_m = abs(x_45_scale)
                y-scale_m = abs(y_45_scale)
                function code(a, b, angle, x_45_scale_m, y_45_scale_m)
                	tmp = 0.0
                	if (x_45_scale_m <= 4.6e+28)
                		tmp = Float64(y_45_scale_m * b);
                	else
                		tmp = Float64(sqrt(2.0) * Float64(a * Float64(0.25 * Float64(x_45_scale_m * sqrt(8.0)))));
                	end
                	return tmp
                end
                
                x-scale_m = abs(x_45_scale);
                y-scale_m = abs(y_45_scale);
                function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
                	tmp = 0.0;
                	if (x_45_scale_m <= 4.6e+28)
                		tmp = y_45_scale_m * b;
                	else
                		tmp = sqrt(2.0) * (a * (0.25 * (x_45_scale_m * sqrt(8.0))));
                	end
                	tmp_2 = tmp;
                end
                
                x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
                y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
                code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[x$45$scale$95$m, 4.6e+28], N[(y$45$scale$95$m * b), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(a * N[(0.25 * N[(x$45$scale$95$m * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                x-scale_m = \left|x-scale\right|
                \\
                y-scale_m = \left|y-scale\right|
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x-scale\_m \leq 4.6 \cdot 10^{+28}:\\
                \;\;\;\;y-scale\_m \cdot b\\
                
                \mathbf{else}:\\
                \;\;\;\;\sqrt{2} \cdot \left(a \cdot \left(0.25 \cdot \left(x-scale\_m \cdot \sqrt{8}\right)\right)\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x-scale < 4.59999999999999968e28

                  1. Initial program 2.4%

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

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

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
                    2. *-lowering-*.f64N/A

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \left(\sqrt{8}\right)\right)\right) \]
                    8. sqrt-lowering-sqrt.f6419.2%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \mathsf{sqrt.f64}\left(8\right)\right)\right) \]
                  5. Simplified19.2%

                    \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \sqrt{8}\right)} \]
                  6. Step-by-step derivation
                    1. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right) \]
                    2. sqrt-unprodN/A

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{2 \cdot 8}\right) \]
                    3. metadata-evalN/A

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{16}\right) \]
                    4. metadata-evalN/A

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), y-scale\right), 4\right) \]
                    8. *-lowering-*.f6419.3%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), y-scale\right), 4\right) \]
                  7. Applied egg-rr19.3%

                    \[\leadsto \color{blue}{\left(\left(0.25 \cdot b\right) \cdot y-scale\right) \cdot 4} \]
                  8. Taylor expanded in b around 0

                    \[\leadsto \color{blue}{b \cdot y-scale} \]
                  9. Step-by-step derivation
                    1. *-lowering-*.f6419.3%

                      \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{y-scale}\right) \]
                  10. Simplified19.3%

                    \[\leadsto \color{blue}{b \cdot y-scale} \]

                  if 4.59999999999999968e28 < x-scale

                  1. Initial program 3.7%

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

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

                      \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
                    2. *-lowering-*.f64N/A

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                    7. distribute-lft-outN/A

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                  5. Simplified63.3%

                    \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
                  6. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)} \cdot \color{blue}{\left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)} \]
                    2. sqrt-prodN/A

                      \[\leadsto \left(\sqrt{2} \cdot \sqrt{\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}}\right) \cdot \left(\color{blue}{\frac{1}{4}} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
                    3. pow1/2N/A

                      \[\leadsto \left(\sqrt{2} \cdot {\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}\right) \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
                    5. *-lowering-*.f64N/A

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\color{blue}{{\left(\left(a \cdot a\right) \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}^{\frac{1}{2}}} \cdot \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\right) \]
                  7. Applied egg-rr68.1%

                    \[\leadsto \color{blue}{\sqrt{2} \cdot \left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right), a \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right) \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)} \]
                  8. Taylor expanded in angle around 0

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{*.f64}\left(\color{blue}{a}, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right)\right)\right) \]
                  9. Step-by-step derivation
                    1. Simplified19.2%

                      \[\leadsto \sqrt{2} \cdot \left(\color{blue}{a} \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \]
                  10. Recombined 2 regimes into one program.
                  11. Final simplification19.3%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 4.6 \cdot 10^{+28}:\\ \;\;\;\;y-scale \cdot b\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(a \cdot \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right)\\ \end{array} \]
                  12. Add Preprocessing

                  Alternative 14: 23.3% accurate, 12.9× speedup?

                  \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;x-scale\_m \leq 2.05 \cdot 10^{+37}:\\ \;\;\;\;y-scale\_m \cdot b\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot \sqrt{2}\right) \cdot \left(x-scale\_m \cdot a\right)\right)\\ \end{array} \end{array} \]
                  x-scale_m = (fabs.f64 x-scale)
                  y-scale_m = (fabs.f64 y-scale)
                  (FPCore (a b angle x-scale_m y-scale_m)
                   :precision binary64
                   (if (<= x-scale_m 2.05e+37)
                     (* y-scale_m b)
                     (* 0.25 (* (* (sqrt 8.0) (sqrt 2.0)) (* x-scale_m a)))))
                  x-scale_m = fabs(x_45_scale);
                  y-scale_m = fabs(y_45_scale);
                  double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                  	double tmp;
                  	if (x_45_scale_m <= 2.05e+37) {
                  		tmp = y_45_scale_m * b;
                  	} else {
                  		tmp = 0.25 * ((sqrt(8.0) * sqrt(2.0)) * (x_45_scale_m * a));
                  	}
                  	return tmp;
                  }
                  
                  x-scale_m = abs(x_45scale)
                  y-scale_m = abs(y_45scale)
                  real(8) function code(a, b, angle, x_45scale_m, y_45scale_m)
                      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_m
                      real(8) :: tmp
                      if (x_45scale_m <= 2.05d+37) then
                          tmp = y_45scale_m * b
                      else
                          tmp = 0.25d0 * ((sqrt(8.0d0) * sqrt(2.0d0)) * (x_45scale_m * a))
                      end if
                      code = tmp
                  end function
                  
                  x-scale_m = Math.abs(x_45_scale);
                  y-scale_m = Math.abs(y_45_scale);
                  public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                  	double tmp;
                  	if (x_45_scale_m <= 2.05e+37) {
                  		tmp = y_45_scale_m * b;
                  	} else {
                  		tmp = 0.25 * ((Math.sqrt(8.0) * Math.sqrt(2.0)) * (x_45_scale_m * a));
                  	}
                  	return tmp;
                  }
                  
                  x-scale_m = math.fabs(x_45_scale)
                  y-scale_m = math.fabs(y_45_scale)
                  def code(a, b, angle, x_45_scale_m, y_45_scale_m):
                  	tmp = 0
                  	if x_45_scale_m <= 2.05e+37:
                  		tmp = y_45_scale_m * b
                  	else:
                  		tmp = 0.25 * ((math.sqrt(8.0) * math.sqrt(2.0)) * (x_45_scale_m * a))
                  	return tmp
                  
                  x-scale_m = abs(x_45_scale)
                  y-scale_m = abs(y_45_scale)
                  function code(a, b, angle, x_45_scale_m, y_45_scale_m)
                  	tmp = 0.0
                  	if (x_45_scale_m <= 2.05e+37)
                  		tmp = Float64(y_45_scale_m * b);
                  	else
                  		tmp = Float64(0.25 * Float64(Float64(sqrt(8.0) * sqrt(2.0)) * Float64(x_45_scale_m * a)));
                  	end
                  	return tmp
                  end
                  
                  x-scale_m = abs(x_45_scale);
                  y-scale_m = abs(y_45_scale);
                  function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
                  	tmp = 0.0;
                  	if (x_45_scale_m <= 2.05e+37)
                  		tmp = y_45_scale_m * b;
                  	else
                  		tmp = 0.25 * ((sqrt(8.0) * sqrt(2.0)) * (x_45_scale_m * a));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
                  y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
                  code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[x$45$scale$95$m, 2.05e+37], N[(y$45$scale$95$m * b), $MachinePrecision], N[(0.25 * N[(N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(x$45$scale$95$m * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  x-scale_m = \left|x-scale\right|
                  \\
                  y-scale_m = \left|y-scale\right|
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x-scale\_m \leq 2.05 \cdot 10^{+37}:\\
                  \;\;\;\;y-scale\_m \cdot b\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot \sqrt{2}\right) \cdot \left(x-scale\_m \cdot a\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x-scale < 2.0499999999999999e37

                    1. Initial program 2.4%

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

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

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
                      2. *-lowering-*.f64N/A

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \left(\sqrt{8}\right)\right)\right) \]
                      8. sqrt-lowering-sqrt.f6419.2%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \mathsf{sqrt.f64}\left(8\right)\right)\right) \]
                    5. Simplified19.2%

                      \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \sqrt{8}\right)} \]
                    6. Step-by-step derivation
                      1. associate-*l*N/A

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right) \]
                      2. sqrt-unprodN/A

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{2 \cdot 8}\right) \]
                      3. metadata-evalN/A

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{16}\right) \]
                      4. metadata-evalN/A

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), y-scale\right), 4\right) \]
                      8. *-lowering-*.f6419.3%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), y-scale\right), 4\right) \]
                    7. Applied egg-rr19.3%

                      \[\leadsto \color{blue}{\left(\left(0.25 \cdot b\right) \cdot y-scale\right) \cdot 4} \]
                    8. Taylor expanded in b around 0

                      \[\leadsto \color{blue}{b \cdot y-scale} \]
                    9. Step-by-step derivation
                      1. *-lowering-*.f6419.3%

                        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{y-scale}\right) \]
                    10. Simplified19.3%

                      \[\leadsto \color{blue}{b \cdot y-scale} \]

                    if 2.0499999999999999e37 < x-scale

                    1. Initial program 3.7%

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

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

                        \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
                      2. *-lowering-*.f64N/A

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                      7. distribute-lft-outN/A

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                    5. Simplified63.3%

                      \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
                    6. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{\frac{1}{4} \cdot \left(a \cdot \left(x-scale \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)} \]
                    7. Step-by-step derivation
                      1. *-lowering-*.f64N/A

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, x-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\sqrt{\color{blue}{8}}\right)\right)\right)\right) \]
                      7. sqrt-lowering-sqrt.f6419.2%

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, x-scale\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right)\right)\right) \]
                    8. Simplified19.2%

                      \[\leadsto \color{blue}{0.25 \cdot \left(\left(a \cdot x-scale\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification19.3%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 2.05 \cdot 10^{+37}:\\ \;\;\;\;y-scale \cdot b\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(\sqrt{8} \cdot \sqrt{2}\right) \cdot \left(x-scale \cdot a\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 15: 19.8% accurate, 23.4× speedup?

                  \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;x-scale\_m \leq 5 \cdot 10^{+118}:\\ \;\;\;\;y-scale\_m \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x-scale\_m \cdot 0.25\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot 4\right)\right)\\ \end{array} \end{array} \]
                  x-scale_m = (fabs.f64 x-scale)
                  y-scale_m = (fabs.f64 y-scale)
                  (FPCore (a b angle x-scale_m y-scale_m)
                   :precision binary64
                   (if (<= x-scale_m 5e+118)
                     (* y-scale_m b)
                     (*
                      (* x-scale_m 0.25)
                      (* (sin (* 0.005555555555555556 (* angle PI))) (* b 4.0)))))
                  x-scale_m = fabs(x_45_scale);
                  y-scale_m = fabs(y_45_scale);
                  double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                  	double tmp;
                  	if (x_45_scale_m <= 5e+118) {
                  		tmp = y_45_scale_m * b;
                  	} else {
                  		tmp = (x_45_scale_m * 0.25) * (sin((0.005555555555555556 * (angle * ((double) M_PI)))) * (b * 4.0));
                  	}
                  	return tmp;
                  }
                  
                  x-scale_m = Math.abs(x_45_scale);
                  y-scale_m = Math.abs(y_45_scale);
                  public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                  	double tmp;
                  	if (x_45_scale_m <= 5e+118) {
                  		tmp = y_45_scale_m * b;
                  	} else {
                  		tmp = (x_45_scale_m * 0.25) * (Math.sin((0.005555555555555556 * (angle * Math.PI))) * (b * 4.0));
                  	}
                  	return tmp;
                  }
                  
                  x-scale_m = math.fabs(x_45_scale)
                  y-scale_m = math.fabs(y_45_scale)
                  def code(a, b, angle, x_45_scale_m, y_45_scale_m):
                  	tmp = 0
                  	if x_45_scale_m <= 5e+118:
                  		tmp = y_45_scale_m * b
                  	else:
                  		tmp = (x_45_scale_m * 0.25) * (math.sin((0.005555555555555556 * (angle * math.pi))) * (b * 4.0))
                  	return tmp
                  
                  x-scale_m = abs(x_45_scale)
                  y-scale_m = abs(y_45_scale)
                  function code(a, b, angle, x_45_scale_m, y_45_scale_m)
                  	tmp = 0.0
                  	if (x_45_scale_m <= 5e+118)
                  		tmp = Float64(y_45_scale_m * b);
                  	else
                  		tmp = Float64(Float64(x_45_scale_m * 0.25) * Float64(sin(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(b * 4.0)));
                  	end
                  	return tmp
                  end
                  
                  x-scale_m = abs(x_45_scale);
                  y-scale_m = abs(y_45_scale);
                  function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
                  	tmp = 0.0;
                  	if (x_45_scale_m <= 5e+118)
                  		tmp = y_45_scale_m * b;
                  	else
                  		tmp = (x_45_scale_m * 0.25) * (sin((0.005555555555555556 * (angle * pi))) * (b * 4.0));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
                  y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
                  code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[x$45$scale$95$m, 5e+118], N[(y$45$scale$95$m * b), $MachinePrecision], N[(N[(x$45$scale$95$m * 0.25), $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  x-scale_m = \left|x-scale\right|
                  \\
                  y-scale_m = \left|y-scale\right|
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x-scale\_m \leq 5 \cdot 10^{+118}:\\
                  \;\;\;\;y-scale\_m \cdot b\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(x-scale\_m \cdot 0.25\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot 4\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x-scale < 4.99999999999999972e118

                    1. Initial program 2.2%

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

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

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
                      2. *-lowering-*.f64N/A

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \left(\sqrt{8}\right)\right)\right) \]
                      8. sqrt-lowering-sqrt.f6420.4%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \mathsf{sqrt.f64}\left(8\right)\right)\right) \]
                    5. Simplified20.4%

                      \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \sqrt{8}\right)} \]
                    6. Step-by-step derivation
                      1. associate-*l*N/A

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right) \]
                      2. sqrt-unprodN/A

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{2 \cdot 8}\right) \]
                      3. metadata-evalN/A

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{16}\right) \]
                      4. metadata-evalN/A

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), y-scale\right), 4\right) \]
                      8. *-lowering-*.f6420.6%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), y-scale\right), 4\right) \]
                    7. Applied egg-rr20.6%

                      \[\leadsto \color{blue}{\left(\left(0.25 \cdot b\right) \cdot y-scale\right) \cdot 4} \]
                    8. Taylor expanded in b around 0

                      \[\leadsto \color{blue}{b \cdot y-scale} \]
                    9. Step-by-step derivation
                      1. *-lowering-*.f6420.6%

                        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{y-scale}\right) \]
                    10. Simplified20.6%

                      \[\leadsto \color{blue}{b \cdot y-scale} \]

                    if 4.99999999999999972e118 < x-scale

                    1. Initial program 5.1%

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

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

                        \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
                      2. *-lowering-*.f64N/A

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                      7. distribute-lft-outN/A

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                    5. Simplified74.3%

                      \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
                    6. Taylor expanded in a around 0

                      \[\leadsto \color{blue}{\frac{1}{4} \cdot \left(b \cdot \left(x-scale \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right)} \]
                    7. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(b \cdot \left(x-scale \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right)}\right) \]
                      2. associate-*r*N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(b \cdot x-scale\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)}\right)\right) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(b \cdot x-scale\right), \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)}\right)\right) \]
                      4. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(x-scale \cdot b\right), \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right) \]
                      5. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right) \]
                      6. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\left(\sqrt{2} \cdot \sqrt{8}\right), \color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right) \]
                      8. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{2}\right), \left(\sqrt{8}\right)\right), \sin \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right) \]
                      9. sqrt-lowering-sqrt.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\sqrt{8}\right)\right), \sin \left(\color{blue}{\frac{1}{180}} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
                      10. sqrt-lowering-sqrt.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right), \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right)\right) \]
                      11. sin-lowering-sin.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right), \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
                      12. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
                      13. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
                      14. PI-lowering-PI.f6432.4%

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right) \]
                    8. Simplified32.4%

                      \[\leadsto \color{blue}{0.25 \cdot \left(\left(x-scale \cdot b\right) \cdot \left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
                    9. Step-by-step derivation
                      1. associate-*l*N/A

                        \[\leadsto \frac{1}{4} \cdot \left(x-scale \cdot \color{blue}{\left(b \cdot \left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)}\right) \]
                      2. associate-*r*N/A

                        \[\leadsto \left(\frac{1}{4} \cdot x-scale\right) \cdot \color{blue}{\left(b \cdot \left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{4} \cdot x-scale\right), \color{blue}{\left(b \cdot \left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)}\right) \]
                      4. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, x-scale\right), \left(\color{blue}{b} \cdot \left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
                      5. associate-*r*N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, x-scale\right), \left(\left(b \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right) \]
                      6. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, x-scale\right), \mathsf{*.f64}\left(\left(b \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right), \color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \left(\sqrt{2} \cdot \sqrt{8}\right)\right), \sin \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right) \]
                      8. sqrt-unprodN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \left(\sqrt{2 \cdot 8}\right)\right), \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
                      9. metadata-evalN/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \left(\sqrt{16}\right)\right), \sin \left(\frac{1}{180} \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
                      10. metadata-evalN/A

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, 4\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
                      14. PI-lowering-PI.f6427.9%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, x-scale\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, 4\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right) \]
                    10. Applied egg-rr27.9%

                      \[\leadsto \color{blue}{\left(0.25 \cdot x-scale\right) \cdot \left(\left(b \cdot 4\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification21.8%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 5 \cdot 10^{+118}:\\ \;\;\;\;y-scale \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x-scale \cdot 0.25\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot 4\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 16: 19.8% accurate, 23.4× speedup?

                  \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ \begin{array}{l} \mathbf{if}\;x-scale\_m \leq 4.5 \cdot 10^{+117}:\\ \;\;\;\;y-scale\_m \cdot b\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(b \cdot \left(x-scale\_m \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot 4\right)\right)\right)\\ \end{array} \end{array} \]
                  x-scale_m = (fabs.f64 x-scale)
                  y-scale_m = (fabs.f64 y-scale)
                  (FPCore (a b angle x-scale_m y-scale_m)
                   :precision binary64
                   (if (<= x-scale_m 4.5e+117)
                     (* y-scale_m b)
                     (*
                      0.25
                      (* b (* x-scale_m (* (sin (* 0.005555555555555556 (* angle PI))) 4.0))))))
                  x-scale_m = fabs(x_45_scale);
                  y-scale_m = fabs(y_45_scale);
                  double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                  	double tmp;
                  	if (x_45_scale_m <= 4.5e+117) {
                  		tmp = y_45_scale_m * b;
                  	} else {
                  		tmp = 0.25 * (b * (x_45_scale_m * (sin((0.005555555555555556 * (angle * ((double) M_PI)))) * 4.0)));
                  	}
                  	return tmp;
                  }
                  
                  x-scale_m = Math.abs(x_45_scale);
                  y-scale_m = Math.abs(y_45_scale);
                  public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                  	double tmp;
                  	if (x_45_scale_m <= 4.5e+117) {
                  		tmp = y_45_scale_m * b;
                  	} else {
                  		tmp = 0.25 * (b * (x_45_scale_m * (Math.sin((0.005555555555555556 * (angle * Math.PI))) * 4.0)));
                  	}
                  	return tmp;
                  }
                  
                  x-scale_m = math.fabs(x_45_scale)
                  y-scale_m = math.fabs(y_45_scale)
                  def code(a, b, angle, x_45_scale_m, y_45_scale_m):
                  	tmp = 0
                  	if x_45_scale_m <= 4.5e+117:
                  		tmp = y_45_scale_m * b
                  	else:
                  		tmp = 0.25 * (b * (x_45_scale_m * (math.sin((0.005555555555555556 * (angle * math.pi))) * 4.0)))
                  	return tmp
                  
                  x-scale_m = abs(x_45_scale)
                  y-scale_m = abs(y_45_scale)
                  function code(a, b, angle, x_45_scale_m, y_45_scale_m)
                  	tmp = 0.0
                  	if (x_45_scale_m <= 4.5e+117)
                  		tmp = Float64(y_45_scale_m * b);
                  	else
                  		tmp = Float64(0.25 * Float64(b * Float64(x_45_scale_m * Float64(sin(Float64(0.005555555555555556 * Float64(angle * pi))) * 4.0))));
                  	end
                  	return tmp
                  end
                  
                  x-scale_m = abs(x_45_scale);
                  y-scale_m = abs(y_45_scale);
                  function tmp_2 = code(a, b, angle, x_45_scale_m, y_45_scale_m)
                  	tmp = 0.0;
                  	if (x_45_scale_m <= 4.5e+117)
                  		tmp = y_45_scale_m * b;
                  	else
                  		tmp = 0.25 * (b * (x_45_scale_m * (sin((0.005555555555555556 * (angle * pi))) * 4.0)));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
                  y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
                  code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := If[LessEqual[x$45$scale$95$m, 4.5e+117], N[(y$45$scale$95$m * b), $MachinePrecision], N[(0.25 * N[(b * N[(x$45$scale$95$m * N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  x-scale_m = \left|x-scale\right|
                  \\
                  y-scale_m = \left|y-scale\right|
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x-scale\_m \leq 4.5 \cdot 10^{+117}:\\
                  \;\;\;\;y-scale\_m \cdot b\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.25 \cdot \left(b \cdot \left(x-scale\_m \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot 4\right)\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x-scale < 4.5e117

                    1. Initial program 2.2%

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

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

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
                      2. *-lowering-*.f64N/A

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \left(\sqrt{8}\right)\right)\right) \]
                      8. sqrt-lowering-sqrt.f6420.4%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \mathsf{sqrt.f64}\left(8\right)\right)\right) \]
                    5. Simplified20.4%

                      \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \sqrt{8}\right)} \]
                    6. Step-by-step derivation
                      1. associate-*l*N/A

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right) \]
                      2. sqrt-unprodN/A

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{2 \cdot 8}\right) \]
                      3. metadata-evalN/A

                        \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{16}\right) \]
                      4. metadata-evalN/A

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), y-scale\right), 4\right) \]
                      8. *-lowering-*.f6420.6%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), y-scale\right), 4\right) \]
                    7. Applied egg-rr20.6%

                      \[\leadsto \color{blue}{\left(\left(0.25 \cdot b\right) \cdot y-scale\right) \cdot 4} \]
                    8. Taylor expanded in b around 0

                      \[\leadsto \color{blue}{b \cdot y-scale} \]
                    9. Step-by-step derivation
                      1. *-lowering-*.f6420.6%

                        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{y-scale}\right) \]
                    10. Simplified20.6%

                      \[\leadsto \color{blue}{b \cdot y-scale} \]

                    if 4.5e117 < x-scale

                    1. Initial program 5.1%

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

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

                        \[\leadsto \left(\frac{1}{4} \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}} \]
                      2. *-lowering-*.f64N/A

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\left(2 \cdot \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                      7. distribute-lft-outN/A

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(x-scale, \mathsf{sqrt.f64}\left(8\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \left({a}^{2} \cdot {\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right)\right)\right) \]
                    5. Simplified74.3%

                      \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\left(a \cdot a\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
                    6. Taylor expanded in a around 0

                      \[\leadsto \color{blue}{\frac{1}{4} \cdot \left(b \cdot \left(x-scale \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right)} \]
                    7. Step-by-step derivation
                      1. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(b \cdot \left(x-scale \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right)}\right) \]
                      2. associate-*r*N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(b \cdot x-scale\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)}\right)\right) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(b \cdot x-scale\right), \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)}\right)\right) \]
                      4. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(x-scale \cdot b\right), \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right) \]
                      5. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\right) \]
                      6. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\left(\sqrt{2} \cdot \sqrt{8}\right), \color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right) \]
                      8. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{2}\right), \left(\sqrt{8}\right)\right), \sin \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right)\right) \]
                      9. sqrt-lowering-sqrt.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\sqrt{8}\right)\right), \sin \left(\color{blue}{\frac{1}{180}} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
                      10. sqrt-lowering-sqrt.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right), \sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right)\right) \]
                      11. sin-lowering-sin.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right), \mathsf{sin.f64}\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
                      12. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
                      13. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right) \]
                      14. PI-lowering-PI.f6432.4%

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x-scale, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{sqrt.f64}\left(8\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right) \]
                    8. Simplified32.4%

                      \[\leadsto \color{blue}{0.25 \cdot \left(\left(x-scale \cdot b\right) \cdot \left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
                    9. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(x-scale \cdot b\right)}\right)\right) \]
                      2. associate-*r*N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(\left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot x-scale\right) \cdot \color{blue}{b}\right)\right) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(\left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot x-scale\right), \color{blue}{b}\right)\right) \]
                      4. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\sqrt{2} \cdot \sqrt{8}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), x-scale\right), b\right)\right) \]
                      5. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{2} \cdot \sqrt{8}\right), \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), x-scale\right), b\right)\right) \]
                      6. sqrt-unprodN/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{2 \cdot 8}\right), \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), x-scale\right), b\right)\right) \]
                      7. metadata-evalN/A

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{16}\right), \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right), x-scale\right), b\right)\right) \]
                      8. metadata-evalN/A

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right)\right)\right), x-scale\right), b\right)\right) \]
                      12. PI-lowering-PI.f6427.9%

                        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\frac{1}{180}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), x-scale\right), b\right)\right) \]
                    10. Applied egg-rr27.9%

                      \[\leadsto 0.25 \cdot \color{blue}{\left(\left(\left(4 \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot x-scale\right) \cdot b\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification21.8%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq 4.5 \cdot 10^{+117}:\\ \;\;\;\;y-scale \cdot b\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(b \cdot \left(x-scale \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot 4\right)\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 17: 17.2% accurate, 919.0× speedup?

                  \[\begin{array}{l} x-scale_m = \left|x-scale\right| \\ y-scale_m = \left|y-scale\right| \\ y-scale\_m \cdot b \end{array} \]
                  x-scale_m = (fabs.f64 x-scale)
                  y-scale_m = (fabs.f64 y-scale)
                  (FPCore (a b angle x-scale_m y-scale_m) :precision binary64 (* y-scale_m b))
                  x-scale_m = fabs(x_45_scale);
                  y-scale_m = fabs(y_45_scale);
                  double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                  	return y_45_scale_m * b;
                  }
                  
                  x-scale_m = abs(x_45scale)
                  y-scale_m = abs(y_45scale)
                  real(8) function code(a, b, angle, x_45scale_m, y_45scale_m)
                      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_m
                      code = y_45scale_m * b
                  end function
                  
                  x-scale_m = Math.abs(x_45_scale);
                  y-scale_m = Math.abs(y_45_scale);
                  public static double code(double a, double b, double angle, double x_45_scale_m, double y_45_scale_m) {
                  	return y_45_scale_m * b;
                  }
                  
                  x-scale_m = math.fabs(x_45_scale)
                  y-scale_m = math.fabs(y_45_scale)
                  def code(a, b, angle, x_45_scale_m, y_45_scale_m):
                  	return y_45_scale_m * b
                  
                  x-scale_m = abs(x_45_scale)
                  y-scale_m = abs(y_45_scale)
                  function code(a, b, angle, x_45_scale_m, y_45_scale_m)
                  	return Float64(y_45_scale_m * b)
                  end
                  
                  x-scale_m = abs(x_45_scale);
                  y-scale_m = abs(y_45_scale);
                  function tmp = code(a, b, angle, x_45_scale_m, y_45_scale_m)
                  	tmp = y_45_scale_m * b;
                  end
                  
                  x-scale_m = N[Abs[x$45$scale], $MachinePrecision]
                  y-scale_m = N[Abs[y$45$scale], $MachinePrecision]
                  code[a_, b_, angle_, x$45$scale$95$m_, y$45$scale$95$m_] := N[(y$45$scale$95$m * b), $MachinePrecision]
                  
                  \begin{array}{l}
                  x-scale_m = \left|x-scale\right|
                  \\
                  y-scale_m = \left|y-scale\right|
                  
                  \\
                  y-scale\_m \cdot b
                  \end{array}
                  
                  Derivation
                  1. Initial program 2.7%

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

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

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \color{blue}{\left(y-scale \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)} \]
                    2. *-lowering-*.f64N/A

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \left(\sqrt{8}\right)\right)\right) \]
                    8. sqrt-lowering-sqrt.f6418.6%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(y-scale, \mathsf{sqrt.f64}\left(2\right)\right), \mathsf{sqrt.f64}\left(8\right)\right)\right) \]
                  5. Simplified18.6%

                    \[\leadsto \color{blue}{\left(0.25 \cdot b\right) \cdot \left(\left(y-scale \cdot \sqrt{2}\right) \cdot \sqrt{8}\right)} \]
                  6. Step-by-step derivation
                    1. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right) \]
                    2. sqrt-unprodN/A

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{2 \cdot 8}\right) \]
                    3. metadata-evalN/A

                      \[\leadsto \left(\frac{1}{4} \cdot b\right) \cdot \left(y-scale \cdot \sqrt{16}\right) \]
                    4. metadata-evalN/A

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot b\right), y-scale\right), 4\right) \]
                    8. *-lowering-*.f6418.6%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, b\right), y-scale\right), 4\right) \]
                  7. Applied egg-rr18.6%

                    \[\leadsto \color{blue}{\left(\left(0.25 \cdot b\right) \cdot y-scale\right) \cdot 4} \]
                  8. Taylor expanded in b around 0

                    \[\leadsto \color{blue}{b \cdot y-scale} \]
                  9. Step-by-step derivation
                    1. *-lowering-*.f6418.6%

                      \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{y-scale}\right) \]
                  10. Simplified18.6%

                    \[\leadsto \color{blue}{b \cdot y-scale} \]
                  11. Final simplification18.6%

                    \[\leadsto y-scale \cdot b \]
                  12. Add Preprocessing

                  Reproduce

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