a from scale-rotated-ellipse

Percentage Accurate: 2.7% → 45.1%
Time: 2.1min
Alternatives: 18
Speedup: 34.4×

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 18 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.7% 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: 45.1% accurate, 4.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\ t_1 := -\sqrt{2}\\ t_2 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_3 := a \cdot \sin t_2\\ t_4 := \cos t_2\\ t_5 := b \cdot t_4\\ t_6 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\ t_7 := t_6 \cdot \left(t_4 \cdot \left(a \cdot t_1\right)\right)\\ \mathbf{if}\;y-scale \leq -1.1 \cdot 10^{-34}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \left(\mathsf{hypot}\left(t_3, t_5\right) \cdot \frac{t_1}{x-scale}\right)\\ \mathbf{elif}\;y-scale \leq -2 \cdot 10^{-275}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;y-scale \leq 1.6 \cdot 10^{-265}:\\ \;\;\;\;t_6 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_4\right)\right)\\ \mathbf{elif}\;y-scale \leq 2.5 \cdot 10^{-228}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;y-scale \leq 18500000000000:\\ \;\;\;\;t_0 \cdot \sqrt{2 \cdot \left({t_5}^{2} + {t_3}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* 0.25 (* y-scale (sqrt 8.0))))
        (t_1 (- (sqrt 2.0)))
        (t_2 (* 0.005555555555555556 (* angle PI)))
        (t_3 (* a (sin t_2)))
        (t_4 (cos t_2))
        (t_5 (* b t_4))
        (t_6 (* 0.25 (* x-scale (sqrt 8.0))))
        (t_7 (* t_6 (* t_4 (* a t_1)))))
   (if (<= y-scale -1.1e-34)
     (*
      (* 0.25 (* (* y-scale x-scale) (sqrt 8.0)))
      (* (hypot t_3 t_5) (/ t_1 x-scale)))
     (if (<= y-scale -2e-275)
       t_7
       (if (<= y-scale 1.6e-265)
         (* t_6 (* (sqrt 2.0) (* a t_4)))
         (if (<= y-scale 2.5e-228)
           t_7
           (if (<= y-scale 18500000000000.0)
             (* t_0 (sqrt (* 2.0 (+ (pow t_5 2.0) (pow t_3 2.0)))))
             (*
              t_0
              (*
               (pow 2.0 0.25)
               (*
                (pow 2.0 0.25)
                (hypot
                 (* a (sin (* PI (* 0.005555555555555556 angle))))
                 b)))))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.25 * (y_45_scale * sqrt(8.0));
	double t_1 = -sqrt(2.0);
	double t_2 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_3 = a * sin(t_2);
	double t_4 = cos(t_2);
	double t_5 = b * t_4;
	double t_6 = 0.25 * (x_45_scale * sqrt(8.0));
	double t_7 = t_6 * (t_4 * (a * t_1));
	double tmp;
	if (y_45_scale <= -1.1e-34) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * sqrt(8.0))) * (hypot(t_3, t_5) * (t_1 / x_45_scale));
	} else if (y_45_scale <= -2e-275) {
		tmp = t_7;
	} else if (y_45_scale <= 1.6e-265) {
		tmp = t_6 * (sqrt(2.0) * (a * t_4));
	} else if (y_45_scale <= 2.5e-228) {
		tmp = t_7;
	} else if (y_45_scale <= 18500000000000.0) {
		tmp = t_0 * sqrt((2.0 * (pow(t_5, 2.0) + pow(t_3, 2.0))));
	} else {
		tmp = t_0 * (pow(2.0, 0.25) * (pow(2.0, 0.25) * hypot((a * sin((((double) M_PI) * (0.005555555555555556 * angle)))), b)));
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.25 * (y_45_scale * Math.sqrt(8.0));
	double t_1 = -Math.sqrt(2.0);
	double t_2 = 0.005555555555555556 * (angle * Math.PI);
	double t_3 = a * Math.sin(t_2);
	double t_4 = Math.cos(t_2);
	double t_5 = b * t_4;
	double t_6 = 0.25 * (x_45_scale * Math.sqrt(8.0));
	double t_7 = t_6 * (t_4 * (a * t_1));
	double tmp;
	if (y_45_scale <= -1.1e-34) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * Math.sqrt(8.0))) * (Math.hypot(t_3, t_5) * (t_1 / x_45_scale));
	} else if (y_45_scale <= -2e-275) {
		tmp = t_7;
	} else if (y_45_scale <= 1.6e-265) {
		tmp = t_6 * (Math.sqrt(2.0) * (a * t_4));
	} else if (y_45_scale <= 2.5e-228) {
		tmp = t_7;
	} else if (y_45_scale <= 18500000000000.0) {
		tmp = t_0 * Math.sqrt((2.0 * (Math.pow(t_5, 2.0) + Math.pow(t_3, 2.0))));
	} else {
		tmp = t_0 * (Math.pow(2.0, 0.25) * (Math.pow(2.0, 0.25) * Math.hypot((a * Math.sin((Math.PI * (0.005555555555555556 * angle)))), b)));
	}
	return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = 0.25 * (y_45_scale * math.sqrt(8.0))
	t_1 = -math.sqrt(2.0)
	t_2 = 0.005555555555555556 * (angle * math.pi)
	t_3 = a * math.sin(t_2)
	t_4 = math.cos(t_2)
	t_5 = b * t_4
	t_6 = 0.25 * (x_45_scale * math.sqrt(8.0))
	t_7 = t_6 * (t_4 * (a * t_1))
	tmp = 0
	if y_45_scale <= -1.1e-34:
		tmp = (0.25 * ((y_45_scale * x_45_scale) * math.sqrt(8.0))) * (math.hypot(t_3, t_5) * (t_1 / x_45_scale))
	elif y_45_scale <= -2e-275:
		tmp = t_7
	elif y_45_scale <= 1.6e-265:
		tmp = t_6 * (math.sqrt(2.0) * (a * t_4))
	elif y_45_scale <= 2.5e-228:
		tmp = t_7
	elif y_45_scale <= 18500000000000.0:
		tmp = t_0 * math.sqrt((2.0 * (math.pow(t_5, 2.0) + math.pow(t_3, 2.0))))
	else:
		tmp = t_0 * (math.pow(2.0, 0.25) * (math.pow(2.0, 0.25) * math.hypot((a * math.sin((math.pi * (0.005555555555555556 * angle)))), b)))
	return tmp
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(0.25 * Float64(y_45_scale * sqrt(8.0)))
	t_1 = Float64(-sqrt(2.0))
	t_2 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_3 = Float64(a * sin(t_2))
	t_4 = cos(t_2)
	t_5 = Float64(b * t_4)
	t_6 = Float64(0.25 * Float64(x_45_scale * sqrt(8.0)))
	t_7 = Float64(t_6 * Float64(t_4 * Float64(a * t_1)))
	tmp = 0.0
	if (y_45_scale <= -1.1e-34)
		tmp = Float64(Float64(0.25 * Float64(Float64(y_45_scale * x_45_scale) * sqrt(8.0))) * Float64(hypot(t_3, t_5) * Float64(t_1 / x_45_scale)));
	elseif (y_45_scale <= -2e-275)
		tmp = t_7;
	elseif (y_45_scale <= 1.6e-265)
		tmp = Float64(t_6 * Float64(sqrt(2.0) * Float64(a * t_4)));
	elseif (y_45_scale <= 2.5e-228)
		tmp = t_7;
	elseif (y_45_scale <= 18500000000000.0)
		tmp = Float64(t_0 * sqrt(Float64(2.0 * Float64((t_5 ^ 2.0) + (t_3 ^ 2.0)))));
	else
		tmp = Float64(t_0 * Float64((2.0 ^ 0.25) * Float64((2.0 ^ 0.25) * hypot(Float64(a * sin(Float64(pi * Float64(0.005555555555555556 * angle)))), b))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = 0.25 * (y_45_scale * sqrt(8.0));
	t_1 = -sqrt(2.0);
	t_2 = 0.005555555555555556 * (angle * pi);
	t_3 = a * sin(t_2);
	t_4 = cos(t_2);
	t_5 = b * t_4;
	t_6 = 0.25 * (x_45_scale * sqrt(8.0));
	t_7 = t_6 * (t_4 * (a * t_1));
	tmp = 0.0;
	if (y_45_scale <= -1.1e-34)
		tmp = (0.25 * ((y_45_scale * x_45_scale) * sqrt(8.0))) * (hypot(t_3, t_5) * (t_1 / x_45_scale));
	elseif (y_45_scale <= -2e-275)
		tmp = t_7;
	elseif (y_45_scale <= 1.6e-265)
		tmp = t_6 * (sqrt(2.0) * (a * t_4));
	elseif (y_45_scale <= 2.5e-228)
		tmp = t_7;
	elseif (y_45_scale <= 18500000000000.0)
		tmp = t_0 * sqrt((2.0 * ((t_5 ^ 2.0) + (t_3 ^ 2.0))));
	else
		tmp = t_0 * ((2.0 ^ 0.25) * ((2.0 ^ 0.25) * hypot((a * sin((pi * (0.005555555555555556 * angle)))), b)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.25 * N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[Sqrt[2.0], $MachinePrecision])}, Block[{t$95$2 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(b * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$6 * N[(t$95$4 * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -1.1e-34], N[(N[(0.25 * N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[t$95$3 ^ 2 + t$95$5 ^ 2], $MachinePrecision] * N[(t$95$1 / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -2e-275], t$95$7, If[LessEqual[y$45$scale, 1.6e-265], N[(t$95$6 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(a * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 2.5e-228], t$95$7, If[LessEqual[y$45$scale, 18500000000000.0], N[(t$95$0 * N[Sqrt[N[(2.0 * N[(N[Power[t$95$5, 2.0], $MachinePrecision] + N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\
t_1 := -\sqrt{2}\\
t_2 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_3 := a \cdot \sin t_2\\
t_4 := \cos t_2\\
t_5 := b \cdot t_4\\
t_6 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\
t_7 := t_6 \cdot \left(t_4 \cdot \left(a \cdot t_1\right)\right)\\
\mathbf{if}\;y-scale \leq -1.1 \cdot 10^{-34}:\\
\;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \left(\mathsf{hypot}\left(t_3, t_5\right) \cdot \frac{t_1}{x-scale}\right)\\

\mathbf{elif}\;y-scale \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;y-scale \leq 1.6 \cdot 10^{-265}:\\
\;\;\;\;t_6 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_4\right)\right)\\

\mathbf{elif}\;y-scale \leq 2.5 \cdot 10^{-228}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;y-scale \leq 18500000000000:\\
\;\;\;\;t_0 \cdot \sqrt{2 \cdot \left({t_5}^{2} + {t_3}^{2}\right)}\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y-scale < -1.0999999999999999e-34

    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. Taylor expanded in y-scale around inf 11.5%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*11.5%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}} \]
      2. associate-*r*11.5%

        \[\leadsto \left(0.25 \cdot \color{blue}{\left(\left(x-scale \cdot y-scale\right) \cdot \sqrt{8}\right)}\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      3. *-commutative11.5%

        \[\leadsto \left(0.25 \cdot \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      4. distribute-lft-out11.5%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(\frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
      5. +-commutative11.5%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\left(\frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
    4. Simplified14.7%

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

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

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\frac{\sqrt{2}}{x-scale} \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
      2. *-commutative39.2%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}} \cdot \frac{\sqrt{2}}{x-scale}}\right) \]
      3. distribute-rgt-neg-in39.2%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}} \cdot \left(-\frac{\sqrt{2}}{x-scale}\right)\right)} \]
    7. Simplified49.8%

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

    if -1.0999999999999999e-34 < y-scale < -1.99999999999999987e-275 or 1.6e-265 < y-scale < 2.49999999999999986e-228

    1. Initial program 0.6%

      \[\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. Taylor expanded in y-scale around 0 18.2%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out18.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def18.2%

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

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg28.7%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*28.7%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in28.7%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified28.7%

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

    if -1.99999999999999987e-275 < y-scale < 1.6e-265

    1. Initial program 6.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. Taylor expanded in y-scale around 0 19.2%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out19.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def19.2%

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

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

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

    if 2.49999999999999986e-228 < y-scale < 1.85e13

    1. Initial program 0.3%

      \[\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. Taylor expanded in x-scale around 0 41.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*41.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified41.9%

      \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}\right)}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(1 \cdot \sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}\right)}\right)} \]
      2. *-commutative41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(1 \cdot \sqrt{2 \cdot \left({\color{blue}{\left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot a\right)}}^{2} + {\left(b \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}\right)}\right) \]
      3. *-commutative41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(1 \cdot \sqrt{2 \cdot \left({\left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot a\right)}^{2} + {\color{blue}{\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot b\right)}}^{2}\right)}\right) \]
    6. Applied egg-rr41.9%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(1 \cdot \sqrt{2 \cdot \left({\left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot a\right)}^{2} + {\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot b\right)}^{2}\right)}\right)} \]
    7. Step-by-step derivation
      1. *-lft-identity41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({\left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot a\right)}^{2} + {\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot b\right)}^{2}\right)}} \]
      2. *-commutative41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({\left(\sin \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot a\right)}^{2} + {\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot b\right)}^{2}\right)} \]
      3. associate-*r*41.8%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({\left(\sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)} \cdot a\right)}^{2} + {\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot b\right)}^{2}\right)} \]
      4. *-commutative41.8%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot a\right)}^{2} + {\left(\cos \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot b\right)}^{2}\right)} \]
      5. associate-*r*42.0%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot a\right)}^{2} + {\left(\cos \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)} \cdot b\right)}^{2}\right)} \]
    8. Simplified42.0%

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

    if 1.85e13 < y-scale

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

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*54.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out54.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative54.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified58.3%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr58.4%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}} \]
    8. Step-by-step derivation
      1. unpow-prod-down58.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left({2}^{0.5} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)} \]
      2. pow1/258.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right) \]
      3. add-sqr-sqrt58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\left(\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}\right)} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right) \]
      4. associate-*l*58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right)} \]
      5. pow1/258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{\color{blue}{{2}^{0.5}}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      6. sqrt-pow158.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{{2}^{\left(\frac{0.5}{2}\right)}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      7. metadata-eval58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{\color{blue}{0.25}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      8. pow1/258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left(\sqrt{\color{blue}{{2}^{0.5}}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      9. sqrt-pow158.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left(\color{blue}{{2}^{\left(\frac{0.5}{2}\right)}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      10. metadata-eval58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{\color{blue}{0.25}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      11. pow1/258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \color{blue}{\sqrt{{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b}}\right)\right) \]
      12. unpow258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \sqrt{\color{blue}{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} + b \cdot b}\right)\right) \]
      13. hypot-def66.2%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \color{blue}{\mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)}\right)\right) \]
    9. Applied egg-rr66.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -1.1 \cdot 10^{-34}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \left(\mathsf{hypot}\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \frac{-\sqrt{2}}{x-scale}\right)\\ \mathbf{elif}\;y-scale \leq -2 \cdot 10^{-275}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 1.6 \cdot 10^{-265}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 2.5 \cdot 10^{-228}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 18500000000000:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\right)\\ \end{array} \]

Alternative 2: 45.1% accurate, 5.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\ t_1 := -\sqrt{2}\\ t_2 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_3 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\ t_4 := \cos t_2\\ t_5 := t_3 \cdot \left(t_4 \cdot \left(a \cdot t_1\right)\right)\\ t_6 := a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\ \mathbf{if}\;y-scale \leq -1.08 \cdot 10^{-35}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \left(\mathsf{hypot}\left(a \cdot \sin t_2, b \cdot t_4\right) \cdot \frac{t_1}{x-scale}\right)\\ \mathbf{elif}\;y-scale \leq -1.46 \cdot 10^{-279}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y-scale \leq 2.4 \cdot 10^{-259}:\\ \;\;\;\;t_3 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_4\right)\right)\\ \mathbf{elif}\;y-scale \leq 8.8 \cdot 10^{-225}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y-scale \leq 7800000000000:\\ \;\;\;\;t_0 \cdot {\left(2 \cdot \left({t_6}^{2} + b \cdot b\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(t_6, b\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* 0.25 (* y-scale (sqrt 8.0))))
        (t_1 (- (sqrt 2.0)))
        (t_2 (* 0.005555555555555556 (* angle PI)))
        (t_3 (* 0.25 (* x-scale (sqrt 8.0))))
        (t_4 (cos t_2))
        (t_5 (* t_3 (* t_4 (* a t_1))))
        (t_6 (* a (sin (* PI (* 0.005555555555555556 angle))))))
   (if (<= y-scale -1.08e-35)
     (*
      (* 0.25 (* (* y-scale x-scale) (sqrt 8.0)))
      (* (hypot (* a (sin t_2)) (* b t_4)) (/ t_1 x-scale)))
     (if (<= y-scale -1.46e-279)
       t_5
       (if (<= y-scale 2.4e-259)
         (* t_3 (* (sqrt 2.0) (* a t_4)))
         (if (<= y-scale 8.8e-225)
           t_5
           (if (<= y-scale 7800000000000.0)
             (* t_0 (pow (* 2.0 (+ (pow t_6 2.0) (* b b))) 0.5))
             (* t_0 (* (pow 2.0 0.25) (* (pow 2.0 0.25) (hypot t_6 b)))))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.25 * (y_45_scale * sqrt(8.0));
	double t_1 = -sqrt(2.0);
	double t_2 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_3 = 0.25 * (x_45_scale * sqrt(8.0));
	double t_4 = cos(t_2);
	double t_5 = t_3 * (t_4 * (a * t_1));
	double t_6 = a * sin((((double) M_PI) * (0.005555555555555556 * angle)));
	double tmp;
	if (y_45_scale <= -1.08e-35) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * sqrt(8.0))) * (hypot((a * sin(t_2)), (b * t_4)) * (t_1 / x_45_scale));
	} else if (y_45_scale <= -1.46e-279) {
		tmp = t_5;
	} else if (y_45_scale <= 2.4e-259) {
		tmp = t_3 * (sqrt(2.0) * (a * t_4));
	} else if (y_45_scale <= 8.8e-225) {
		tmp = t_5;
	} else if (y_45_scale <= 7800000000000.0) {
		tmp = t_0 * pow((2.0 * (pow(t_6, 2.0) + (b * b))), 0.5);
	} else {
		tmp = t_0 * (pow(2.0, 0.25) * (pow(2.0, 0.25) * hypot(t_6, b)));
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.25 * (y_45_scale * Math.sqrt(8.0));
	double t_1 = -Math.sqrt(2.0);
	double t_2 = 0.005555555555555556 * (angle * Math.PI);
	double t_3 = 0.25 * (x_45_scale * Math.sqrt(8.0));
	double t_4 = Math.cos(t_2);
	double t_5 = t_3 * (t_4 * (a * t_1));
	double t_6 = a * Math.sin((Math.PI * (0.005555555555555556 * angle)));
	double tmp;
	if (y_45_scale <= -1.08e-35) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * Math.sqrt(8.0))) * (Math.hypot((a * Math.sin(t_2)), (b * t_4)) * (t_1 / x_45_scale));
	} else if (y_45_scale <= -1.46e-279) {
		tmp = t_5;
	} else if (y_45_scale <= 2.4e-259) {
		tmp = t_3 * (Math.sqrt(2.0) * (a * t_4));
	} else if (y_45_scale <= 8.8e-225) {
		tmp = t_5;
	} else if (y_45_scale <= 7800000000000.0) {
		tmp = t_0 * Math.pow((2.0 * (Math.pow(t_6, 2.0) + (b * b))), 0.5);
	} else {
		tmp = t_0 * (Math.pow(2.0, 0.25) * (Math.pow(2.0, 0.25) * Math.hypot(t_6, b)));
	}
	return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = 0.25 * (y_45_scale * math.sqrt(8.0))
	t_1 = -math.sqrt(2.0)
	t_2 = 0.005555555555555556 * (angle * math.pi)
	t_3 = 0.25 * (x_45_scale * math.sqrt(8.0))
	t_4 = math.cos(t_2)
	t_5 = t_3 * (t_4 * (a * t_1))
	t_6 = a * math.sin((math.pi * (0.005555555555555556 * angle)))
	tmp = 0
	if y_45_scale <= -1.08e-35:
		tmp = (0.25 * ((y_45_scale * x_45_scale) * math.sqrt(8.0))) * (math.hypot((a * math.sin(t_2)), (b * t_4)) * (t_1 / x_45_scale))
	elif y_45_scale <= -1.46e-279:
		tmp = t_5
	elif y_45_scale <= 2.4e-259:
		tmp = t_3 * (math.sqrt(2.0) * (a * t_4))
	elif y_45_scale <= 8.8e-225:
		tmp = t_5
	elif y_45_scale <= 7800000000000.0:
		tmp = t_0 * math.pow((2.0 * (math.pow(t_6, 2.0) + (b * b))), 0.5)
	else:
		tmp = t_0 * (math.pow(2.0, 0.25) * (math.pow(2.0, 0.25) * math.hypot(t_6, b)))
	return tmp
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(0.25 * Float64(y_45_scale * sqrt(8.0)))
	t_1 = Float64(-sqrt(2.0))
	t_2 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_3 = Float64(0.25 * Float64(x_45_scale * sqrt(8.0)))
	t_4 = cos(t_2)
	t_5 = Float64(t_3 * Float64(t_4 * Float64(a * t_1)))
	t_6 = Float64(a * sin(Float64(pi * Float64(0.005555555555555556 * angle))))
	tmp = 0.0
	if (y_45_scale <= -1.08e-35)
		tmp = Float64(Float64(0.25 * Float64(Float64(y_45_scale * x_45_scale) * sqrt(8.0))) * Float64(hypot(Float64(a * sin(t_2)), Float64(b * t_4)) * Float64(t_1 / x_45_scale)));
	elseif (y_45_scale <= -1.46e-279)
		tmp = t_5;
	elseif (y_45_scale <= 2.4e-259)
		tmp = Float64(t_3 * Float64(sqrt(2.0) * Float64(a * t_4)));
	elseif (y_45_scale <= 8.8e-225)
		tmp = t_5;
	elseif (y_45_scale <= 7800000000000.0)
		tmp = Float64(t_0 * (Float64(2.0 * Float64((t_6 ^ 2.0) + Float64(b * b))) ^ 0.5));
	else
		tmp = Float64(t_0 * Float64((2.0 ^ 0.25) * Float64((2.0 ^ 0.25) * hypot(t_6, b))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = 0.25 * (y_45_scale * sqrt(8.0));
	t_1 = -sqrt(2.0);
	t_2 = 0.005555555555555556 * (angle * pi);
	t_3 = 0.25 * (x_45_scale * sqrt(8.0));
	t_4 = cos(t_2);
	t_5 = t_3 * (t_4 * (a * t_1));
	t_6 = a * sin((pi * (0.005555555555555556 * angle)));
	tmp = 0.0;
	if (y_45_scale <= -1.08e-35)
		tmp = (0.25 * ((y_45_scale * x_45_scale) * sqrt(8.0))) * (hypot((a * sin(t_2)), (b * t_4)) * (t_1 / x_45_scale));
	elseif (y_45_scale <= -1.46e-279)
		tmp = t_5;
	elseif (y_45_scale <= 2.4e-259)
		tmp = t_3 * (sqrt(2.0) * (a * t_4));
	elseif (y_45_scale <= 8.8e-225)
		tmp = t_5;
	elseif (y_45_scale <= 7800000000000.0)
		tmp = t_0 * ((2.0 * ((t_6 ^ 2.0) + (b * b))) ^ 0.5);
	else
		tmp = t_0 * ((2.0 ^ 0.25) * ((2.0 ^ 0.25) * hypot(t_6, b)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.25 * N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[Sqrt[2.0], $MachinePrecision])}, Block[{t$95$2 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 * N[(t$95$4 * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(a * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -1.08e-35], N[(N[(0.25 * N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(a * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(b * t$95$4), $MachinePrecision] ^ 2], $MachinePrecision] * N[(t$95$1 / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -1.46e-279], t$95$5, If[LessEqual[y$45$scale, 2.4e-259], N[(t$95$3 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(a * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 8.8e-225], t$95$5, If[LessEqual[y$45$scale, 7800000000000.0], N[(t$95$0 * N[Power[N[(2.0 * N[(N[Power[t$95$6, 2.0], $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[Sqrt[t$95$6 ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\
t_1 := -\sqrt{2}\\
t_2 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_3 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\
t_4 := \cos t_2\\
t_5 := t_3 \cdot \left(t_4 \cdot \left(a \cdot t_1\right)\right)\\
t_6 := a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
\mathbf{if}\;y-scale \leq -1.08 \cdot 10^{-35}:\\
\;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \left(\mathsf{hypot}\left(a \cdot \sin t_2, b \cdot t_4\right) \cdot \frac{t_1}{x-scale}\right)\\

\mathbf{elif}\;y-scale \leq -1.46 \cdot 10^{-279}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;y-scale \leq 2.4 \cdot 10^{-259}:\\
\;\;\;\;t_3 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_4\right)\right)\\

\mathbf{elif}\;y-scale \leq 8.8 \cdot 10^{-225}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;y-scale \leq 7800000000000:\\
\;\;\;\;t_0 \cdot {\left(2 \cdot \left({t_6}^{2} + b \cdot b\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(t_6, b\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y-scale < -1.08000000000000003e-35

    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. Taylor expanded in y-scale around inf 11.5%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*11.5%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}} \]
      2. associate-*r*11.5%

        \[\leadsto \left(0.25 \cdot \color{blue}{\left(\left(x-scale \cdot y-scale\right) \cdot \sqrt{8}\right)}\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      3. *-commutative11.5%

        \[\leadsto \left(0.25 \cdot \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      4. distribute-lft-out11.5%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(\frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
      5. +-commutative11.5%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\left(\frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
    4. Simplified14.7%

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

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

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\frac{\sqrt{2}}{x-scale} \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
      2. *-commutative39.2%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}} \cdot \frac{\sqrt{2}}{x-scale}}\right) \]
      3. distribute-rgt-neg-in39.2%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2} + {a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}} \cdot \left(-\frac{\sqrt{2}}{x-scale}\right)\right)} \]
    7. Simplified49.8%

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

    if -1.08000000000000003e-35 < y-scale < -1.46000000000000005e-279 or 2.4000000000000001e-259 < y-scale < 8.8e-225

    1. Initial program 0.6%

      \[\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. Taylor expanded in y-scale around 0 18.2%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out18.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def18.2%

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

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg28.7%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*28.7%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in28.7%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified28.7%

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

    if -1.46000000000000005e-279 < y-scale < 2.4000000000000001e-259

    1. Initial program 6.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. Taylor expanded in y-scale around 0 19.2%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out19.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def19.2%

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

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

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

    if 8.8e-225 < y-scale < 7.8e12

    1. Initial program 0.3%

      \[\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. Taylor expanded in x-scale around 0 41.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*41.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified41.9%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow241.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr41.9%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}} \]

    if 7.8e12 < y-scale

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

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*54.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out54.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative54.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified58.3%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr58.4%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}} \]
    8. Step-by-step derivation
      1. unpow-prod-down58.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left({2}^{0.5} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)} \]
      2. pow1/258.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right) \]
      3. add-sqr-sqrt58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\left(\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}\right)} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right) \]
      4. associate-*l*58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right)} \]
      5. pow1/258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{\color{blue}{{2}^{0.5}}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      6. sqrt-pow158.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{{2}^{\left(\frac{0.5}{2}\right)}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      7. metadata-eval58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{\color{blue}{0.25}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      8. pow1/258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left(\sqrt{\color{blue}{{2}^{0.5}}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      9. sqrt-pow158.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left(\color{blue}{{2}^{\left(\frac{0.5}{2}\right)}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      10. metadata-eval58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{\color{blue}{0.25}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      11. pow1/258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \color{blue}{\sqrt{{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b}}\right)\right) \]
      12. unpow258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \sqrt{\color{blue}{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} + b \cdot b}\right)\right) \]
      13. hypot-def66.2%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \color{blue}{\mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)}\right)\right) \]
    9. Applied egg-rr66.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -1.08 \cdot 10^{-35}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \left(\mathsf{hypot}\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \frac{-\sqrt{2}}{x-scale}\right)\\ \mathbf{elif}\;y-scale \leq -1.46 \cdot 10^{-279}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 2.4 \cdot 10^{-259}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 8.8 \cdot 10^{-225}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 7800000000000:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\right)\\ \end{array} \]

Alternative 3: 34.8% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \cos t_0\\ t_2 := b \cdot \sqrt{2}\\ t_3 := y-scale \cdot \sqrt{8}\\ t_4 := a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\ t_5 := 0.25 \cdot t_3\\ t_6 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\ t_7 := t_6 \cdot \left(t_1 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{if}\;y-scale \leq -1.65 \cdot 10^{+232}:\\ \;\;\;\;\left(0.25 \cdot \sqrt[3]{{t_3}^{3}}\right) \cdot \left(t_1 \cdot t_2\right)\\ \mathbf{elif}\;y-scale \leq -6.2 \cdot 10^{+36}:\\ \;\;\;\;t_5 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -1.1 \cdot 10^{-34}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{t_2}{x-scale}\\ \mathbf{elif}\;y-scale \leq -2.1 \cdot 10^{-166}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;y-scale \leq -2.25 \cdot 10^{-198}:\\ \;\;\;\;t_6 \cdot \left(\sqrt{2} \cdot \left(\sin t_0 \cdot \left(-b\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -3.7 \cdot 10^{-280}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;y-scale \leq 5.8 \cdot 10^{-266}:\\ \;\;\;\;t_6 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_1\right)\right)\\ \mathbf{elif}\;y-scale \leq 14200000000000:\\ \;\;\;\;t_5 \cdot {\left(2 \cdot \left({t_4}^{2} + b \cdot b\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;t_5 \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(t_4, b\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI)))
        (t_1 (cos t_0))
        (t_2 (* b (sqrt 2.0)))
        (t_3 (* y-scale (sqrt 8.0)))
        (t_4 (* a (sin (* PI (* 0.005555555555555556 angle)))))
        (t_5 (* 0.25 t_3))
        (t_6 (* 0.25 (* x-scale (sqrt 8.0))))
        (t_7 (* t_6 (* t_1 (* a (- (sqrt 2.0)))))))
   (if (<= y-scale -1.65e+232)
     (* (* 0.25 (cbrt (pow t_3 3.0))) (* t_1 t_2))
     (if (<= y-scale -6.2e+36)
       (* t_5 (* (sqrt 2.0) (- b)))
       (if (<= y-scale -1.1e-34)
         (* (* 0.25 (* (* y-scale x-scale) (sqrt 8.0))) (/ t_2 x-scale))
         (if (<= y-scale -2.1e-166)
           t_7
           (if (<= y-scale -2.25e-198)
             (* t_6 (* (sqrt 2.0) (* (sin t_0) (- b))))
             (if (<= y-scale -3.7e-280)
               t_7
               (if (<= y-scale 5.8e-266)
                 (* t_6 (* (sqrt 2.0) (* a t_1)))
                 (if (<= y-scale 14200000000000.0)
                   (* t_5 (pow (* 2.0 (+ (pow t_4 2.0) (* b b))) 0.5))
                   (*
                    t_5
                    (*
                     (pow 2.0 0.25)
                     (* (pow 2.0 0.25) (hypot t_4 b))))))))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = cos(t_0);
	double t_2 = b * sqrt(2.0);
	double t_3 = y_45_scale * sqrt(8.0);
	double t_4 = a * sin((((double) M_PI) * (0.005555555555555556 * angle)));
	double t_5 = 0.25 * t_3;
	double t_6 = 0.25 * (x_45_scale * sqrt(8.0));
	double t_7 = t_6 * (t_1 * (a * -sqrt(2.0)));
	double tmp;
	if (y_45_scale <= -1.65e+232) {
		tmp = (0.25 * cbrt(pow(t_3, 3.0))) * (t_1 * t_2);
	} else if (y_45_scale <= -6.2e+36) {
		tmp = t_5 * (sqrt(2.0) * -b);
	} else if (y_45_scale <= -1.1e-34) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * sqrt(8.0))) * (t_2 / x_45_scale);
	} else if (y_45_scale <= -2.1e-166) {
		tmp = t_7;
	} else if (y_45_scale <= -2.25e-198) {
		tmp = t_6 * (sqrt(2.0) * (sin(t_0) * -b));
	} else if (y_45_scale <= -3.7e-280) {
		tmp = t_7;
	} else if (y_45_scale <= 5.8e-266) {
		tmp = t_6 * (sqrt(2.0) * (a * t_1));
	} else if (y_45_scale <= 14200000000000.0) {
		tmp = t_5 * pow((2.0 * (pow(t_4, 2.0) + (b * b))), 0.5);
	} else {
		tmp = t_5 * (pow(2.0, 0.25) * (pow(2.0, 0.25) * hypot(t_4, b)));
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.cos(t_0);
	double t_2 = b * Math.sqrt(2.0);
	double t_3 = y_45_scale * Math.sqrt(8.0);
	double t_4 = a * Math.sin((Math.PI * (0.005555555555555556 * angle)));
	double t_5 = 0.25 * t_3;
	double t_6 = 0.25 * (x_45_scale * Math.sqrt(8.0));
	double t_7 = t_6 * (t_1 * (a * -Math.sqrt(2.0)));
	double tmp;
	if (y_45_scale <= -1.65e+232) {
		tmp = (0.25 * Math.cbrt(Math.pow(t_3, 3.0))) * (t_1 * t_2);
	} else if (y_45_scale <= -6.2e+36) {
		tmp = t_5 * (Math.sqrt(2.0) * -b);
	} else if (y_45_scale <= -1.1e-34) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * Math.sqrt(8.0))) * (t_2 / x_45_scale);
	} else if (y_45_scale <= -2.1e-166) {
		tmp = t_7;
	} else if (y_45_scale <= -2.25e-198) {
		tmp = t_6 * (Math.sqrt(2.0) * (Math.sin(t_0) * -b));
	} else if (y_45_scale <= -3.7e-280) {
		tmp = t_7;
	} else if (y_45_scale <= 5.8e-266) {
		tmp = t_6 * (Math.sqrt(2.0) * (a * t_1));
	} else if (y_45_scale <= 14200000000000.0) {
		tmp = t_5 * Math.pow((2.0 * (Math.pow(t_4, 2.0) + (b * b))), 0.5);
	} else {
		tmp = t_5 * (Math.pow(2.0, 0.25) * (Math.pow(2.0, 0.25) * Math.hypot(t_4, b)));
	}
	return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_1 = cos(t_0)
	t_2 = Float64(b * sqrt(2.0))
	t_3 = Float64(y_45_scale * sqrt(8.0))
	t_4 = Float64(a * sin(Float64(pi * Float64(0.005555555555555556 * angle))))
	t_5 = Float64(0.25 * t_3)
	t_6 = Float64(0.25 * Float64(x_45_scale * sqrt(8.0)))
	t_7 = Float64(t_6 * Float64(t_1 * Float64(a * Float64(-sqrt(2.0)))))
	tmp = 0.0
	if (y_45_scale <= -1.65e+232)
		tmp = Float64(Float64(0.25 * cbrt((t_3 ^ 3.0))) * Float64(t_1 * t_2));
	elseif (y_45_scale <= -6.2e+36)
		tmp = Float64(t_5 * Float64(sqrt(2.0) * Float64(-b)));
	elseif (y_45_scale <= -1.1e-34)
		tmp = Float64(Float64(0.25 * Float64(Float64(y_45_scale * x_45_scale) * sqrt(8.0))) * Float64(t_2 / x_45_scale));
	elseif (y_45_scale <= -2.1e-166)
		tmp = t_7;
	elseif (y_45_scale <= -2.25e-198)
		tmp = Float64(t_6 * Float64(sqrt(2.0) * Float64(sin(t_0) * Float64(-b))));
	elseif (y_45_scale <= -3.7e-280)
		tmp = t_7;
	elseif (y_45_scale <= 5.8e-266)
		tmp = Float64(t_6 * Float64(sqrt(2.0) * Float64(a * t_1)));
	elseif (y_45_scale <= 14200000000000.0)
		tmp = Float64(t_5 * (Float64(2.0 * Float64((t_4 ^ 2.0) + Float64(b * b))) ^ 0.5));
	else
		tmp = Float64(t_5 * Float64((2.0 ^ 0.25) * Float64((2.0 ^ 0.25) * hypot(t_4, b))));
	end
	return tmp
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(a * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(0.25 * t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$6 * N[(t$95$1 * N[(a * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -1.65e+232], N[(N[(0.25 * N[Power[N[Power[t$95$3, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -6.2e+36], N[(t$95$5 * N[(N[Sqrt[2.0], $MachinePrecision] * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -1.1e-34], N[(N[(0.25 * N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 / x$45$scale), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -2.1e-166], t$95$7, If[LessEqual[y$45$scale, -2.25e-198], N[(t$95$6 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -3.7e-280], t$95$7, If[LessEqual[y$45$scale, 5.8e-266], N[(t$95$6 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 14200000000000.0], N[(t$95$5 * N[Power[N[(2.0 * N[(N[Power[t$95$4, 2.0], $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(t$95$5 * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[Sqrt[t$95$4 ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t_0\\
t_2 := b \cdot \sqrt{2}\\
t_3 := y-scale \cdot \sqrt{8}\\
t_4 := a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
t_5 := 0.25 \cdot t_3\\
t_6 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\
t_7 := t_6 \cdot \left(t_1 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\
\mathbf{if}\;y-scale \leq -1.65 \cdot 10^{+232}:\\
\;\;\;\;\left(0.25 \cdot \sqrt[3]{{t_3}^{3}}\right) \cdot \left(t_1 \cdot t_2\right)\\

\mathbf{elif}\;y-scale \leq -6.2 \cdot 10^{+36}:\\
\;\;\;\;t_5 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\

\mathbf{elif}\;y-scale \leq -1.1 \cdot 10^{-34}:\\
\;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{t_2}{x-scale}\\

\mathbf{elif}\;y-scale \leq -2.1 \cdot 10^{-166}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;y-scale \leq -2.25 \cdot 10^{-198}:\\
\;\;\;\;t_6 \cdot \left(\sqrt{2} \cdot \left(\sin t_0 \cdot \left(-b\right)\right)\right)\\

\mathbf{elif}\;y-scale \leq -3.7 \cdot 10^{-280}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;y-scale \leq 5.8 \cdot 10^{-266}:\\
\;\;\;\;t_6 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_1\right)\right)\\

\mathbf{elif}\;y-scale \leq 14200000000000:\\
\;\;\;\;t_5 \cdot {\left(2 \cdot \left({t_4}^{2} + b \cdot b\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;t_5 \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(t_4, b\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if y-scale < -1.65e232

    1. Initial program 0.0%

      \[\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. Taylor expanded in x-scale around 0 0.0%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*0.0%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out0.0%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative0.0%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified0.1%

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*51.0%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified51.0%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    8. Step-by-step derivation
      1. add-cbrt-cube59.9%

        \[\leadsto \left(0.25 \cdot \color{blue}{\sqrt[3]{\left(\left(y-scale \cdot \sqrt{8}\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(y-scale \cdot \sqrt{8}\right)}}\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
    9. Applied egg-rr59.9%

      \[\leadsto \left(0.25 \cdot \color{blue}{\sqrt[3]{\left(\left(y-scale \cdot \sqrt{8}\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(y-scale \cdot \sqrt{8}\right)}}\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
    10. Step-by-step derivation
      1. associate-*l*59.9%

        \[\leadsto \left(0.25 \cdot \sqrt[3]{\color{blue}{\left(y-scale \cdot \sqrt{8}\right) \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right)}}\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      2. cube-unmult59.9%

        \[\leadsto \left(0.25 \cdot \sqrt[3]{\color{blue}{{\left(y-scale \cdot \sqrt{8}\right)}^{3}}}\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
    11. Simplified59.9%

      \[\leadsto \left(0.25 \cdot \color{blue}{\sqrt[3]{{\left(y-scale \cdot \sqrt{8}\right)}^{3}}}\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]

    if -1.65e232 < y-scale < -6.1999999999999999e36

    1. Initial program 4.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. Taylor expanded in x-scale around 0 0.6%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*0.6%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified0.6%

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

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot b\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot b\right)} \]
      2. distribute-rgt-neg-in32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-b\right)\right)} \]
    8. Simplified32.7%

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

    if -6.1999999999999999e36 < y-scale < -1.0999999999999999e-34

    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. Taylor expanded in y-scale around inf 13.8%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*13.8%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}} \]
      2. associate-*r*13.8%

        \[\leadsto \left(0.25 \cdot \color{blue}{\left(\left(x-scale \cdot y-scale\right) \cdot \sqrt{8}\right)}\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      3. *-commutative13.8%

        \[\leadsto \left(0.25 \cdot \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      4. distribute-lft-out13.8%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(\frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
      5. +-commutative13.8%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\left(\frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
    4. Simplified13.8%

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

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

    if -1.0999999999999999e-34 < y-scale < -2.0999999999999999e-166 or -2.2499999999999999e-198 < y-scale < -3.6999999999999998e-280

    1. Initial program 0.6%

      \[\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. Taylor expanded in y-scale around 0 18.4%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out18.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def18.4%

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

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg28.8%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*28.8%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in28.8%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified28.8%

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

    if -2.0999999999999999e-166 < y-scale < -2.2499999999999999e-198

    1. Initial program 0.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. Taylor expanded in y-scale around 0 24.3%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out24.3%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def24.3%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified24.3%

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg35.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. distribute-rgt-neg-in35.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      3. *-commutative35.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-\color{blue}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot b}\right)\right) \]
    7. Simplified35.4%

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

    if -3.6999999999999998e-280 < y-scale < 5.79999999999999991e-266

    1. Initial program 6.9%

      \[\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. Taylor expanded in y-scale around 0 20.4%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out20.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def20.4%

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

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

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

    if 5.79999999999999991e-266 < y-scale < 1.42e13

    1. Initial program 0.3%

      \[\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. Taylor expanded in x-scale around 0 41.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*41.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified41.9%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow241.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity41.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr41.9%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}} \]

    if 1.42e13 < y-scale

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

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*54.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out54.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative54.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified58.3%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr58.4%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}} \]
    8. Step-by-step derivation
      1. unpow-prod-down58.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left({2}^{0.5} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)} \]
      2. pow1/258.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right) \]
      3. add-sqr-sqrt58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\left(\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}\right)} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right) \]
      4. associate-*l*58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right)} \]
      5. pow1/258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{\color{blue}{{2}^{0.5}}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      6. sqrt-pow158.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{{2}^{\left(\frac{0.5}{2}\right)}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      7. metadata-eval58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{\color{blue}{0.25}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      8. pow1/258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left(\sqrt{\color{blue}{{2}^{0.5}}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      9. sqrt-pow158.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left(\color{blue}{{2}^{\left(\frac{0.5}{2}\right)}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      10. metadata-eval58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{\color{blue}{0.25}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      11. pow1/258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \color{blue}{\sqrt{{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b}}\right)\right) \]
      12. unpow258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \sqrt{\color{blue}{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} + b \cdot b}\right)\right) \]
      13. hypot-def66.2%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \color{blue}{\mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)}\right)\right) \]
    9. Applied egg-rr66.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -1.65 \cdot 10^{+232}:\\ \;\;\;\;\left(0.25 \cdot \sqrt[3]{{\left(y-scale \cdot \sqrt{8}\right)}^{3}}\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot \sqrt{2}\right)\right)\\ \mathbf{elif}\;y-scale \leq -6.2 \cdot 10^{+36}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -1.1 \cdot 10^{-34}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\ \mathbf{elif}\;y-scale \leq -2.1 \cdot 10^{-166}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -2.25 \cdot 10^{-198}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-b\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -3.7 \cdot 10^{-280}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 5.8 \cdot 10^{-266}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 14200000000000:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\right)\\ \end{array} \]

Alternative 4: 36.0% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\ t_1 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\ \mathbf{if}\;x-scale \leq -5.5 \cdot 10^{+166}:\\ \;\;\;\;t_1 \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;x-scale \leq -1.05 \cdot 10^{+73}:\\ \;\;\;\;t_1 \cdot \left(\left(a \cdot \sqrt{2}\right) \cdot \left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot {\pi}^{2}\right)\right)\right)\\ \mathbf{elif}\;x-scale \leq 1.05 \cdot 10^{-82}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(a \cdot t_0, b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, 1, \left(b \cdot b\right) \cdot {t_0}^{2}\right)}\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (sin (* PI (* 0.005555555555555556 angle))))
        (t_1 (* 0.25 (* x-scale (sqrt 8.0)))))
   (if (<= x-scale -5.5e+166)
     (*
      t_1
      (* (cos (* 0.005555555555555556 (* angle PI))) (* a (- (sqrt 2.0)))))
     (if (<= x-scale -1.05e+73)
       (*
        t_1
        (*
         (* a (sqrt 2.0))
         (+ 1.0 (* -1.54320987654321e-5 (* (* angle angle) (pow PI 2.0))))))
       (if (<= x-scale 1.05e-82)
         (*
          (* 0.25 (* y-scale (sqrt 8.0)))
          (* (pow 2.0 0.25) (* (pow 2.0 0.25) (hypot (* a t_0) b))))
         (*
          t_1
          (sqrt (* 2.0 (fma (* a a) 1.0 (* (* b b) (pow t_0 2.0)))))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = sin((((double) M_PI) * (0.005555555555555556 * angle)));
	double t_1 = 0.25 * (x_45_scale * sqrt(8.0));
	double tmp;
	if (x_45_scale <= -5.5e+166) {
		tmp = t_1 * (cos((0.005555555555555556 * (angle * ((double) M_PI)))) * (a * -sqrt(2.0)));
	} else if (x_45_scale <= -1.05e+73) {
		tmp = t_1 * ((a * sqrt(2.0)) * (1.0 + (-1.54320987654321e-5 * ((angle * angle) * pow(((double) M_PI), 2.0)))));
	} else if (x_45_scale <= 1.05e-82) {
		tmp = (0.25 * (y_45_scale * sqrt(8.0))) * (pow(2.0, 0.25) * (pow(2.0, 0.25) * hypot((a * t_0), b)));
	} else {
		tmp = t_1 * sqrt((2.0 * fma((a * a), 1.0, ((b * b) * pow(t_0, 2.0)))));
	}
	return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = sin(Float64(pi * Float64(0.005555555555555556 * angle)))
	t_1 = Float64(0.25 * Float64(x_45_scale * sqrt(8.0)))
	tmp = 0.0
	if (x_45_scale <= -5.5e+166)
		tmp = Float64(t_1 * Float64(cos(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(a * Float64(-sqrt(2.0)))));
	elseif (x_45_scale <= -1.05e+73)
		tmp = Float64(t_1 * Float64(Float64(a * sqrt(2.0)) * Float64(1.0 + Float64(-1.54320987654321e-5 * Float64(Float64(angle * angle) * (pi ^ 2.0))))));
	elseif (x_45_scale <= 1.05e-82)
		tmp = Float64(Float64(0.25 * Float64(y_45_scale * sqrt(8.0))) * Float64((2.0 ^ 0.25) * Float64((2.0 ^ 0.25) * hypot(Float64(a * t_0), b))));
	else
		tmp = Float64(t_1 * sqrt(Float64(2.0 * fma(Float64(a * a), 1.0, Float64(Float64(b * b) * (t_0 ^ 2.0))))));
	end
	return tmp
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$45$scale, -5.5e+166], N[(t$95$1 * N[(N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, -1.05e+73], N[(t$95$1 * N[(N[(a * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-1.54320987654321e-5 * N[(N[(angle * angle), $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, 1.05e-82], N[(N[(0.25 * N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] * N[Sqrt[N[(a * t$95$0), $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(2.0 * N[(N[(a * a), $MachinePrecision] * 1.0 + N[(N[(b * b), $MachinePrecision] * N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
t_1 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\
\mathbf{if}\;x-scale \leq -5.5 \cdot 10^{+166}:\\
\;\;\;\;t_1 \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\

\mathbf{elif}\;x-scale \leq -1.05 \cdot 10^{+73}:\\
\;\;\;\;t_1 \cdot \left(\left(a \cdot \sqrt{2}\right) \cdot \left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot {\pi}^{2}\right)\right)\right)\\

\mathbf{elif}\;x-scale \leq 1.05 \cdot 10^{-82}:\\
\;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(a \cdot t_0, b\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, 1, \left(b \cdot b\right) \cdot {t_0}^{2}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x-scale < -5.50000000000000008e166

    1. Initial program 0.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. Taylor expanded in y-scale around 0 0.5%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out0.5%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def0.5%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified0.5%

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg42.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*42.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in42.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified42.2%

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

    if -5.50000000000000008e166 < x-scale < -1.0500000000000001e73

    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. Taylor expanded in y-scale around 0 0.5%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out0.5%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def0.5%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified0.5%

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*30.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified30.6%

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot a\right) \cdot \color{blue}{\left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}\right) \]
    9. Step-by-step derivation
      1. unpow246.1%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot a\right) \cdot \left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left(\color{blue}{\left(angle \cdot angle\right)} \cdot {\pi}^{2}\right)\right)\right) \]
    10. Simplified46.1%

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot a\right) \cdot \color{blue}{\left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot {\pi}^{2}\right)\right)}\right) \]

    if -1.0500000000000001e73 < x-scale < 1.05e-82

    1. Initial program 2.6%

      \[\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. Taylor expanded in x-scale around 0 24.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*24.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out24.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative24.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified26.6%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow226.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity26.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity26.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr26.7%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}} \]
    8. Step-by-step derivation
      1. unpow-prod-down26.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left({2}^{0.5} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)} \]
      2. pow1/226.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right) \]
      3. add-sqr-sqrt26.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\left(\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}\right)} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right) \]
      4. associate-*l*26.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{\sqrt{2}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right)} \]
      5. pow1/226.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{\color{blue}{{2}^{0.5}}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      6. sqrt-pow126.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{{2}^{\left(\frac{0.5}{2}\right)}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      7. metadata-eval26.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{\color{blue}{0.25}} \cdot \left(\sqrt{\sqrt{2}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      8. pow1/226.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left(\sqrt{\color{blue}{{2}^{0.5}}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      9. sqrt-pow126.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left(\color{blue}{{2}^{\left(\frac{0.5}{2}\right)}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      10. metadata-eval26.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{\color{blue}{0.25}} \cdot {\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}^{0.5}\right)\right) \]
      11. pow1/226.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \color{blue}{\sqrt{{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b}}\right)\right) \]
      12. unpow226.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \sqrt{\color{blue}{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} + b \cdot b}\right)\right) \]
      13. hypot-def32.0%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \color{blue}{\mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)}\right)\right) \]
    9. Applied egg-rr32.0%

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

    if 1.05e-82 < x-scale

    1. Initial program 2.0%

      \[\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. Taylor expanded in y-scale around 0 44.9%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out44.9%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def44.9%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified45.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq -5.5 \cdot 10^{+166}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;x-scale \leq -1.05 \cdot 10^{+73}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(a \cdot \sqrt{2}\right) \cdot \left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot {\pi}^{2}\right)\right)\right)\\ \mathbf{elif}\;x-scale \leq 1.05 \cdot 10^{-82}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left({2}^{0.25} \cdot \left({2}^{0.25} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, 1, \left(b \cdot b\right) \cdot {\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}^{2}\right)}\\ \end{array} \]

Alternative 5: 34.7% accurate, 6.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \cos t_0\\ t_2 := b \cdot \sqrt{2}\\ t_3 := y-scale \cdot \sqrt{8}\\ t_4 := a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\ t_5 := 0.25 \cdot t_3\\ t_6 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\ t_7 := t_6 \cdot \left(t_1 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{if}\;y-scale \leq -2.25 \cdot 10^{+232}:\\ \;\;\;\;\left(0.25 \cdot \sqrt[3]{{t_3}^{3}}\right) \cdot \left(t_1 \cdot t_2\right)\\ \mathbf{elif}\;y-scale \leq -8.5 \cdot 10^{+35}:\\ \;\;\;\;t_5 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -1.1 \cdot 10^{-34}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{t_2}{x-scale}\\ \mathbf{elif}\;y-scale \leq -2.7 \cdot 10^{-166}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;y-scale \leq -3.4 \cdot 10^{-197}:\\ \;\;\;\;t_6 \cdot \left(\sqrt{2} \cdot \left(\sin t_0 \cdot \left(-b\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -5.8 \cdot 10^{-276}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;y-scale \leq 9.5 \cdot 10^{-267}:\\ \;\;\;\;t_6 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_1\right)\right)\\ \mathbf{elif}\;y-scale \leq 9 \cdot 10^{+49}:\\ \;\;\;\;t_5 \cdot {\left(2 \cdot \left({t_4}^{2} + b \cdot b\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;t_5 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(t_4, b\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI)))
        (t_1 (cos t_0))
        (t_2 (* b (sqrt 2.0)))
        (t_3 (* y-scale (sqrt 8.0)))
        (t_4 (* a (sin (* PI (* 0.005555555555555556 angle)))))
        (t_5 (* 0.25 t_3))
        (t_6 (* 0.25 (* x-scale (sqrt 8.0))))
        (t_7 (* t_6 (* t_1 (* a (- (sqrt 2.0)))))))
   (if (<= y-scale -2.25e+232)
     (* (* 0.25 (cbrt (pow t_3 3.0))) (* t_1 t_2))
     (if (<= y-scale -8.5e+35)
       (* t_5 (* (sqrt 2.0) (- b)))
       (if (<= y-scale -1.1e-34)
         (* (* 0.25 (* (* y-scale x-scale) (sqrt 8.0))) (/ t_2 x-scale))
         (if (<= y-scale -2.7e-166)
           t_7
           (if (<= y-scale -3.4e-197)
             (* t_6 (* (sqrt 2.0) (* (sin t_0) (- b))))
             (if (<= y-scale -5.8e-276)
               t_7
               (if (<= y-scale 9.5e-267)
                 (* t_6 (* (sqrt 2.0) (* a t_1)))
                 (if (<= y-scale 9e+49)
                   (* t_5 (pow (* 2.0 (+ (pow t_4 2.0) (* b b))) 0.5))
                   (* t_5 (* (sqrt 2.0) (hypot t_4 b)))))))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = cos(t_0);
	double t_2 = b * sqrt(2.0);
	double t_3 = y_45_scale * sqrt(8.0);
	double t_4 = a * sin((((double) M_PI) * (0.005555555555555556 * angle)));
	double t_5 = 0.25 * t_3;
	double t_6 = 0.25 * (x_45_scale * sqrt(8.0));
	double t_7 = t_6 * (t_1 * (a * -sqrt(2.0)));
	double tmp;
	if (y_45_scale <= -2.25e+232) {
		tmp = (0.25 * cbrt(pow(t_3, 3.0))) * (t_1 * t_2);
	} else if (y_45_scale <= -8.5e+35) {
		tmp = t_5 * (sqrt(2.0) * -b);
	} else if (y_45_scale <= -1.1e-34) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * sqrt(8.0))) * (t_2 / x_45_scale);
	} else if (y_45_scale <= -2.7e-166) {
		tmp = t_7;
	} else if (y_45_scale <= -3.4e-197) {
		tmp = t_6 * (sqrt(2.0) * (sin(t_0) * -b));
	} else if (y_45_scale <= -5.8e-276) {
		tmp = t_7;
	} else if (y_45_scale <= 9.5e-267) {
		tmp = t_6 * (sqrt(2.0) * (a * t_1));
	} else if (y_45_scale <= 9e+49) {
		tmp = t_5 * pow((2.0 * (pow(t_4, 2.0) + (b * b))), 0.5);
	} else {
		tmp = t_5 * (sqrt(2.0) * hypot(t_4, b));
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.cos(t_0);
	double t_2 = b * Math.sqrt(2.0);
	double t_3 = y_45_scale * Math.sqrt(8.0);
	double t_4 = a * Math.sin((Math.PI * (0.005555555555555556 * angle)));
	double t_5 = 0.25 * t_3;
	double t_6 = 0.25 * (x_45_scale * Math.sqrt(8.0));
	double t_7 = t_6 * (t_1 * (a * -Math.sqrt(2.0)));
	double tmp;
	if (y_45_scale <= -2.25e+232) {
		tmp = (0.25 * Math.cbrt(Math.pow(t_3, 3.0))) * (t_1 * t_2);
	} else if (y_45_scale <= -8.5e+35) {
		tmp = t_5 * (Math.sqrt(2.0) * -b);
	} else if (y_45_scale <= -1.1e-34) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * Math.sqrt(8.0))) * (t_2 / x_45_scale);
	} else if (y_45_scale <= -2.7e-166) {
		tmp = t_7;
	} else if (y_45_scale <= -3.4e-197) {
		tmp = t_6 * (Math.sqrt(2.0) * (Math.sin(t_0) * -b));
	} else if (y_45_scale <= -5.8e-276) {
		tmp = t_7;
	} else if (y_45_scale <= 9.5e-267) {
		tmp = t_6 * (Math.sqrt(2.0) * (a * t_1));
	} else if (y_45_scale <= 9e+49) {
		tmp = t_5 * Math.pow((2.0 * (Math.pow(t_4, 2.0) + (b * b))), 0.5);
	} else {
		tmp = t_5 * (Math.sqrt(2.0) * Math.hypot(t_4, b));
	}
	return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_1 = cos(t_0)
	t_2 = Float64(b * sqrt(2.0))
	t_3 = Float64(y_45_scale * sqrt(8.0))
	t_4 = Float64(a * sin(Float64(pi * Float64(0.005555555555555556 * angle))))
	t_5 = Float64(0.25 * t_3)
	t_6 = Float64(0.25 * Float64(x_45_scale * sqrt(8.0)))
	t_7 = Float64(t_6 * Float64(t_1 * Float64(a * Float64(-sqrt(2.0)))))
	tmp = 0.0
	if (y_45_scale <= -2.25e+232)
		tmp = Float64(Float64(0.25 * cbrt((t_3 ^ 3.0))) * Float64(t_1 * t_2));
	elseif (y_45_scale <= -8.5e+35)
		tmp = Float64(t_5 * Float64(sqrt(2.0) * Float64(-b)));
	elseif (y_45_scale <= -1.1e-34)
		tmp = Float64(Float64(0.25 * Float64(Float64(y_45_scale * x_45_scale) * sqrt(8.0))) * Float64(t_2 / x_45_scale));
	elseif (y_45_scale <= -2.7e-166)
		tmp = t_7;
	elseif (y_45_scale <= -3.4e-197)
		tmp = Float64(t_6 * Float64(sqrt(2.0) * Float64(sin(t_0) * Float64(-b))));
	elseif (y_45_scale <= -5.8e-276)
		tmp = t_7;
	elseif (y_45_scale <= 9.5e-267)
		tmp = Float64(t_6 * Float64(sqrt(2.0) * Float64(a * t_1)));
	elseif (y_45_scale <= 9e+49)
		tmp = Float64(t_5 * (Float64(2.0 * Float64((t_4 ^ 2.0) + Float64(b * b))) ^ 0.5));
	else
		tmp = Float64(t_5 * Float64(sqrt(2.0) * hypot(t_4, b)));
	end
	return tmp
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(a * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(0.25 * t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$6 * N[(t$95$1 * N[(a * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -2.25e+232], N[(N[(0.25 * N[Power[N[Power[t$95$3, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -8.5e+35], N[(t$95$5 * N[(N[Sqrt[2.0], $MachinePrecision] * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -1.1e-34], N[(N[(0.25 * N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 / x$45$scale), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -2.7e-166], t$95$7, If[LessEqual[y$45$scale, -3.4e-197], N[(t$95$6 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -5.8e-276], t$95$7, If[LessEqual[y$45$scale, 9.5e-267], N[(t$95$6 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 9e+49], N[(t$95$5 * N[Power[N[(2.0 * N[(N[Power[t$95$4, 2.0], $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(t$95$5 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[t$95$4 ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t_0\\
t_2 := b \cdot \sqrt{2}\\
t_3 := y-scale \cdot \sqrt{8}\\
t_4 := a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
t_5 := 0.25 \cdot t_3\\
t_6 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\
t_7 := t_6 \cdot \left(t_1 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\
\mathbf{if}\;y-scale \leq -2.25 \cdot 10^{+232}:\\
\;\;\;\;\left(0.25 \cdot \sqrt[3]{{t_3}^{3}}\right) \cdot \left(t_1 \cdot t_2\right)\\

\mathbf{elif}\;y-scale \leq -8.5 \cdot 10^{+35}:\\
\;\;\;\;t_5 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\

\mathbf{elif}\;y-scale \leq -1.1 \cdot 10^{-34}:\\
\;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{t_2}{x-scale}\\

\mathbf{elif}\;y-scale \leq -2.7 \cdot 10^{-166}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;y-scale \leq -3.4 \cdot 10^{-197}:\\
\;\;\;\;t_6 \cdot \left(\sqrt{2} \cdot \left(\sin t_0 \cdot \left(-b\right)\right)\right)\\

\mathbf{elif}\;y-scale \leq -5.8 \cdot 10^{-276}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;y-scale \leq 9.5 \cdot 10^{-267}:\\
\;\;\;\;t_6 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_1\right)\right)\\

\mathbf{elif}\;y-scale \leq 9 \cdot 10^{+49}:\\
\;\;\;\;t_5 \cdot {\left(2 \cdot \left({t_4}^{2} + b \cdot b\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;t_5 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(t_4, b\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if y-scale < -2.2499999999999999e232

    1. Initial program 0.0%

      \[\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. Taylor expanded in x-scale around 0 0.0%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*0.0%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out0.0%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative0.0%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified0.1%

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*51.0%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified51.0%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    8. Step-by-step derivation
      1. add-cbrt-cube59.9%

        \[\leadsto \left(0.25 \cdot \color{blue}{\sqrt[3]{\left(\left(y-scale \cdot \sqrt{8}\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(y-scale \cdot \sqrt{8}\right)}}\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
    9. Applied egg-rr59.9%

      \[\leadsto \left(0.25 \cdot \color{blue}{\sqrt[3]{\left(\left(y-scale \cdot \sqrt{8}\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(y-scale \cdot \sqrt{8}\right)}}\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
    10. Step-by-step derivation
      1. associate-*l*59.9%

        \[\leadsto \left(0.25 \cdot \sqrt[3]{\color{blue}{\left(y-scale \cdot \sqrt{8}\right) \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \left(y-scale \cdot \sqrt{8}\right)\right)}}\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      2. cube-unmult59.9%

        \[\leadsto \left(0.25 \cdot \sqrt[3]{\color{blue}{{\left(y-scale \cdot \sqrt{8}\right)}^{3}}}\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
    11. Simplified59.9%

      \[\leadsto \left(0.25 \cdot \color{blue}{\sqrt[3]{{\left(y-scale \cdot \sqrt{8}\right)}^{3}}}\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]

    if -2.2499999999999999e232 < y-scale < -8.4999999999999995e35

    1. Initial program 4.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. Taylor expanded in x-scale around 0 0.6%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*0.6%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified0.6%

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

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot b\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot b\right)} \]
      2. distribute-rgt-neg-in32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-b\right)\right)} \]
    8. Simplified32.7%

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

    if -8.4999999999999995e35 < y-scale < -1.0999999999999999e-34

    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. Taylor expanded in y-scale around inf 13.8%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*13.8%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}} \]
      2. associate-*r*13.8%

        \[\leadsto \left(0.25 \cdot \color{blue}{\left(\left(x-scale \cdot y-scale\right) \cdot \sqrt{8}\right)}\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      3. *-commutative13.8%

        \[\leadsto \left(0.25 \cdot \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      4. distribute-lft-out13.8%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(\frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
      5. +-commutative13.8%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\left(\frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
    4. Simplified13.8%

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

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

    if -1.0999999999999999e-34 < y-scale < -2.70000000000000006e-166 or -3.3999999999999998e-197 < y-scale < -5.79999999999999975e-276

    1. Initial program 0.6%

      \[\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. Taylor expanded in y-scale around 0 18.4%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out18.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def18.4%

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

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg28.8%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*28.8%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in28.8%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified28.8%

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

    if -2.70000000000000006e-166 < y-scale < -3.3999999999999998e-197

    1. Initial program 0.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. Taylor expanded in y-scale around 0 24.3%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out24.3%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def24.3%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified24.3%

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg35.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. distribute-rgt-neg-in35.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      3. *-commutative35.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-\color{blue}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot b}\right)\right) \]
    7. Simplified35.4%

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

    if -5.79999999999999975e-276 < y-scale < 9.49999999999999985e-267

    1. Initial program 6.9%

      \[\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. Taylor expanded in y-scale around 0 20.4%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out20.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def20.4%

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

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

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

    if 9.49999999999999985e-267 < y-scale < 8.99999999999999965e49

    1. Initial program 0.3%

      \[\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. Taylor expanded in x-scale around 0 40.6%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*40.6%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out40.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative40.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified40.5%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow240.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity40.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity40.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr40.6%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}} \]

    if 8.99999999999999965e49 < y-scale

    1. Initial program 3.6%

      \[\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. Taylor expanded in x-scale around 0 58.6%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*58.6%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out58.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative58.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified62.6%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow262.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity62.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity62.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr62.7%

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}} \]
      2. *-commutative62.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right) \cdot 2}} \]
      3. sqrt-prod62.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b} \cdot \sqrt{2}\right)} \]
      4. unpow262.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{\color{blue}{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} + b \cdot b} \cdot \sqrt{2}\right) \]
      5. hypot-def71.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)} \cdot \sqrt{2}\right) \]
    9. Applied egg-rr71.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -2.25 \cdot 10^{+232}:\\ \;\;\;\;\left(0.25 \cdot \sqrt[3]{{\left(y-scale \cdot \sqrt{8}\right)}^{3}}\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b \cdot \sqrt{2}\right)\right)\\ \mathbf{elif}\;y-scale \leq -8.5 \cdot 10^{+35}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -1.1 \cdot 10^{-34}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\ \mathbf{elif}\;y-scale \leq -2.7 \cdot 10^{-166}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -3.4 \cdot 10^{-197}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-b\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -5.8 \cdot 10^{-276}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 9.5 \cdot 10^{-267}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 9 \cdot 10^{+49}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\\ \end{array} \]

Alternative 6: 34.9% accurate, 7.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\ t_1 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\ t_2 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\ t_3 := t_2 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_0\right)\right)\\ t_4 := t_2 \cdot \left(t_0 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ t_5 := a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\ \mathbf{if}\;y-scale \leq -4.2 \cdot 10^{+232}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\ \mathbf{elif}\;y-scale \leq -5.8 \cdot 10^{+37}:\\ \;\;\;\;t_1 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -6.1 \cdot 10^{-37}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\ \mathbf{elif}\;y-scale \leq -7.8 \cdot 10^{-104}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y-scale \leq -8.5 \cdot 10^{-277}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y-scale \leq 4.4 \cdot 10^{-261}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y-scale \leq 9.5 \cdot 10^{-222}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y-scale \leq 6 \cdot 10^{+51}:\\ \;\;\;\;t_1 \cdot {\left(2 \cdot \left({t_5}^{2} + b \cdot b\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(t_5, b\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (cos (* 0.005555555555555556 (* angle PI))))
        (t_1 (* 0.25 (* y-scale (sqrt 8.0))))
        (t_2 (* 0.25 (* x-scale (sqrt 8.0))))
        (t_3 (* t_2 (* (sqrt 2.0) (* a t_0))))
        (t_4 (* t_2 (* t_0 (* a (- (sqrt 2.0))))))
        (t_5 (* a (sin (* PI (* 0.005555555555555556 angle))))))
   (if (<= y-scale -4.2e+232)
     (* 0.25 (* y-scale (pow (cbrt (* b (* (sqrt 8.0) (sqrt 2.0)))) 3.0)))
     (if (<= y-scale -5.8e+37)
       (* t_1 (* (sqrt 2.0) (- b)))
       (if (<= y-scale -6.1e-37)
         (*
          (* 0.25 (* (* y-scale x-scale) (sqrt 8.0)))
          (/ (* b (sqrt 2.0)) x-scale))
         (if (<= y-scale -7.8e-104)
           t_3
           (if (<= y-scale -8.5e-277)
             t_4
             (if (<= y-scale 4.4e-261)
               t_3
               (if (<= y-scale 9.5e-222)
                 t_4
                 (if (<= y-scale 6e+51)
                   (* t_1 (pow (* 2.0 (+ (pow t_5 2.0) (* b b))) 0.5))
                   (* t_1 (* (sqrt 2.0) (hypot t_5 b)))))))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = cos((0.005555555555555556 * (angle * ((double) M_PI))));
	double t_1 = 0.25 * (y_45_scale * sqrt(8.0));
	double t_2 = 0.25 * (x_45_scale * sqrt(8.0));
	double t_3 = t_2 * (sqrt(2.0) * (a * t_0));
	double t_4 = t_2 * (t_0 * (a * -sqrt(2.0)));
	double t_5 = a * sin((((double) M_PI) * (0.005555555555555556 * angle)));
	double tmp;
	if (y_45_scale <= -4.2e+232) {
		tmp = 0.25 * (y_45_scale * pow(cbrt((b * (sqrt(8.0) * sqrt(2.0)))), 3.0));
	} else if (y_45_scale <= -5.8e+37) {
		tmp = t_1 * (sqrt(2.0) * -b);
	} else if (y_45_scale <= -6.1e-37) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * sqrt(8.0))) * ((b * sqrt(2.0)) / x_45_scale);
	} else if (y_45_scale <= -7.8e-104) {
		tmp = t_3;
	} else if (y_45_scale <= -8.5e-277) {
		tmp = t_4;
	} else if (y_45_scale <= 4.4e-261) {
		tmp = t_3;
	} else if (y_45_scale <= 9.5e-222) {
		tmp = t_4;
	} else if (y_45_scale <= 6e+51) {
		tmp = t_1 * pow((2.0 * (pow(t_5, 2.0) + (b * b))), 0.5);
	} else {
		tmp = t_1 * (sqrt(2.0) * hypot(t_5, b));
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = Math.cos((0.005555555555555556 * (angle * Math.PI)));
	double t_1 = 0.25 * (y_45_scale * Math.sqrt(8.0));
	double t_2 = 0.25 * (x_45_scale * Math.sqrt(8.0));
	double t_3 = t_2 * (Math.sqrt(2.0) * (a * t_0));
	double t_4 = t_2 * (t_0 * (a * -Math.sqrt(2.0)));
	double t_5 = a * Math.sin((Math.PI * (0.005555555555555556 * angle)));
	double tmp;
	if (y_45_scale <= -4.2e+232) {
		tmp = 0.25 * (y_45_scale * Math.pow(Math.cbrt((b * (Math.sqrt(8.0) * Math.sqrt(2.0)))), 3.0));
	} else if (y_45_scale <= -5.8e+37) {
		tmp = t_1 * (Math.sqrt(2.0) * -b);
	} else if (y_45_scale <= -6.1e-37) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * Math.sqrt(8.0))) * ((b * Math.sqrt(2.0)) / x_45_scale);
	} else if (y_45_scale <= -7.8e-104) {
		tmp = t_3;
	} else if (y_45_scale <= -8.5e-277) {
		tmp = t_4;
	} else if (y_45_scale <= 4.4e-261) {
		tmp = t_3;
	} else if (y_45_scale <= 9.5e-222) {
		tmp = t_4;
	} else if (y_45_scale <= 6e+51) {
		tmp = t_1 * Math.pow((2.0 * (Math.pow(t_5, 2.0) + (b * b))), 0.5);
	} else {
		tmp = t_1 * (Math.sqrt(2.0) * Math.hypot(t_5, b));
	}
	return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = cos(Float64(0.005555555555555556 * Float64(angle * pi)))
	t_1 = Float64(0.25 * Float64(y_45_scale * sqrt(8.0)))
	t_2 = Float64(0.25 * Float64(x_45_scale * sqrt(8.0)))
	t_3 = Float64(t_2 * Float64(sqrt(2.0) * Float64(a * t_0)))
	t_4 = Float64(t_2 * Float64(t_0 * Float64(a * Float64(-sqrt(2.0)))))
	t_5 = Float64(a * sin(Float64(pi * Float64(0.005555555555555556 * angle))))
	tmp = 0.0
	if (y_45_scale <= -4.2e+232)
		tmp = Float64(0.25 * Float64(y_45_scale * (cbrt(Float64(b * Float64(sqrt(8.0) * sqrt(2.0)))) ^ 3.0)));
	elseif (y_45_scale <= -5.8e+37)
		tmp = Float64(t_1 * Float64(sqrt(2.0) * Float64(-b)));
	elseif (y_45_scale <= -6.1e-37)
		tmp = Float64(Float64(0.25 * Float64(Float64(y_45_scale * x_45_scale) * sqrt(8.0))) * Float64(Float64(b * sqrt(2.0)) / x_45_scale));
	elseif (y_45_scale <= -7.8e-104)
		tmp = t_3;
	elseif (y_45_scale <= -8.5e-277)
		tmp = t_4;
	elseif (y_45_scale <= 4.4e-261)
		tmp = t_3;
	elseif (y_45_scale <= 9.5e-222)
		tmp = t_4;
	elseif (y_45_scale <= 6e+51)
		tmp = Float64(t_1 * (Float64(2.0 * Float64((t_5 ^ 2.0) + Float64(b * b))) ^ 0.5));
	else
		tmp = Float64(t_1 * Float64(sqrt(2.0) * hypot(t_5, b)));
	end
	return tmp
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(0.25 * N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(a * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[(t$95$0 * N[(a * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(a * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -4.2e+232], N[(0.25 * N[(y$45$scale * N[Power[N[Power[N[(b * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -5.8e+37], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -6.1e-37], N[(N[(0.25 * N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -7.8e-104], t$95$3, If[LessEqual[y$45$scale, -8.5e-277], t$95$4, If[LessEqual[y$45$scale, 4.4e-261], t$95$3, If[LessEqual[y$45$scale, 9.5e-222], t$95$4, If[LessEqual[y$45$scale, 6e+51], N[(t$95$1 * N[Power[N[(2.0 * N[(N[Power[t$95$5, 2.0], $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[t$95$5 ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
t_1 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\
t_2 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\
t_3 := t_2 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_0\right)\right)\\
t_4 := t_2 \cdot \left(t_0 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\
t_5 := a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
\mathbf{if}\;y-scale \leq -4.2 \cdot 10^{+232}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\

\mathbf{elif}\;y-scale \leq -5.8 \cdot 10^{+37}:\\
\;\;\;\;t_1 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\

\mathbf{elif}\;y-scale \leq -6.1 \cdot 10^{-37}:\\
\;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\

\mathbf{elif}\;y-scale \leq -7.8 \cdot 10^{-104}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y-scale \leq -8.5 \cdot 10^{-277}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;y-scale \leq 4.4 \cdot 10^{-261}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y-scale \leq 9.5 \cdot 10^{-222}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;y-scale \leq 6 \cdot 10^{+51}:\\
\;\;\;\;t_1 \cdot {\left(2 \cdot \left({t_5}^{2} + b \cdot b\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(t_5, b\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y-scale < -4.19999999999999982e232

    1. Initial program 0.0%

      \[\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. Taylor expanded in angle around 0 52.3%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*52.3%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*52.0%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified52.0%

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

      \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. add-cube-cbrt52.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right) \cdot \sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
      2. pow352.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{{\left(\sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}^{3}}\right) \]
      3. *-commutative52.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{\color{blue}{\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}}}\right)}^{3}\right) \]
      4. associate-*l*52.4%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{\color{blue}{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}}\right)}^{3}\right) \]
    7. Applied egg-rr52.4%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{{\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}}\right) \]

    if -4.19999999999999982e232 < y-scale < -5.79999999999999957e37

    1. Initial program 4.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. Taylor expanded in x-scale around 0 0.6%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*0.6%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified0.6%

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

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot b\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot b\right)} \]
      2. distribute-rgt-neg-in32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-b\right)\right)} \]
    8. Simplified32.7%

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

    if -5.79999999999999957e37 < y-scale < -6.1000000000000003e-37

    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. Taylor expanded in y-scale around inf 12.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*12.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}} \]
      2. associate-*r*12.9%

        \[\leadsto \left(0.25 \cdot \color{blue}{\left(\left(x-scale \cdot y-scale\right) \cdot \sqrt{8}\right)}\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      3. *-commutative12.9%

        \[\leadsto \left(0.25 \cdot \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      4. distribute-lft-out12.9%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(\frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
      5. +-commutative12.9%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\left(\frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
    4. Simplified12.9%

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

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

    if -6.1000000000000003e-37 < y-scale < -7.8000000000000004e-104 or -8.4999999999999998e-277 < y-scale < 4.4000000000000003e-261

    1. Initial program 3.6%

      \[\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. Taylor expanded in y-scale around 0 20.6%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out20.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def20.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified20.6%

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

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

    if -7.8000000000000004e-104 < y-scale < -8.4999999999999998e-277 or 4.4000000000000003e-261 < y-scale < 9.5000000000000002e-222

    1. Initial program 0.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. Taylor expanded in y-scale around 0 17.0%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out17.0%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def17.0%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified17.0%

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg33.3%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*33.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in33.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified33.4%

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

    if 9.5000000000000002e-222 < y-scale < 6e51

    1. Initial program 0.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. Taylor expanded in x-scale around 0 41.1%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*41.1%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified41.0%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow241.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr41.1%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}} \]

    if 6e51 < y-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. Taylor expanded in x-scale around 0 58.7%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*58.7%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out58.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative58.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified62.7%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow262.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity62.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity62.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr62.9%

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}} \]
      2. *-commutative62.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right) \cdot 2}} \]
      3. sqrt-prod62.8%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b} \cdot \sqrt{2}\right)} \]
      4. unpow262.8%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{\color{blue}{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} + b \cdot b} \cdot \sqrt{2}\right) \]
      5. hypot-def72.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)} \cdot \sqrt{2}\right) \]
    9. Applied egg-rr72.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -4.2 \cdot 10^{+232}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\ \mathbf{elif}\;y-scale \leq -5.8 \cdot 10^{+37}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -6.1 \cdot 10^{-37}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\ \mathbf{elif}\;y-scale \leq -7.8 \cdot 10^{-104}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -8.5 \cdot 10^{-277}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 4.4 \cdot 10^{-261}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 9.5 \cdot 10^{-222}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 6 \cdot 10^{+51}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\\ \end{array} \]

Alternative 7: 34.9% accurate, 7.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \cos t_0\\ t_2 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\ t_3 := t_2 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_1\right)\right)\\ t_4 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\ t_5 := t_2 \cdot \left(t_1 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{if}\;y-scale \leq -1.4 \cdot 10^{+233}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\ \mathbf{elif}\;y-scale \leq -1.05 \cdot 10^{+37}:\\ \;\;\;\;t_4 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -4.3 \cdot 10^{-36}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\ \mathbf{elif}\;y-scale \leq -1.45 \cdot 10^{-103}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y-scale \leq -1.75 \cdot 10^{-280}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y-scale \leq 4.2 \cdot 10^{-260}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y-scale \leq 2.6 \cdot 10^{-222}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y-scale \leq 3.8 \cdot 10^{+52}:\\ \;\;\;\;t_4 \cdot \sqrt{2 \cdot \left(b \cdot b + {\left(a \cdot \sin t_0\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_4 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI)))
        (t_1 (cos t_0))
        (t_2 (* 0.25 (* x-scale (sqrt 8.0))))
        (t_3 (* t_2 (* (sqrt 2.0) (* a t_1))))
        (t_4 (* 0.25 (* y-scale (sqrt 8.0))))
        (t_5 (* t_2 (* t_1 (* a (- (sqrt 2.0)))))))
   (if (<= y-scale -1.4e+233)
     (* 0.25 (* y-scale (pow (cbrt (* b (* (sqrt 8.0) (sqrt 2.0)))) 3.0)))
     (if (<= y-scale -1.05e+37)
       (* t_4 (* (sqrt 2.0) (- b)))
       (if (<= y-scale -4.3e-36)
         (*
          (* 0.25 (* (* y-scale x-scale) (sqrt 8.0)))
          (/ (* b (sqrt 2.0)) x-scale))
         (if (<= y-scale -1.45e-103)
           t_3
           (if (<= y-scale -1.75e-280)
             t_5
             (if (<= y-scale 4.2e-260)
               t_3
               (if (<= y-scale 2.6e-222)
                 t_5
                 (if (<= y-scale 3.8e+52)
                   (* t_4 (sqrt (* 2.0 (+ (* b b) (pow (* a (sin t_0)) 2.0)))))
                   (*
                    t_4
                    (*
                     (sqrt 2.0)
                     (hypot
                      (* a (sin (* PI (* 0.005555555555555556 angle))))
                      b)))))))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = cos(t_0);
	double t_2 = 0.25 * (x_45_scale * sqrt(8.0));
	double t_3 = t_2 * (sqrt(2.0) * (a * t_1));
	double t_4 = 0.25 * (y_45_scale * sqrt(8.0));
	double t_5 = t_2 * (t_1 * (a * -sqrt(2.0)));
	double tmp;
	if (y_45_scale <= -1.4e+233) {
		tmp = 0.25 * (y_45_scale * pow(cbrt((b * (sqrt(8.0) * sqrt(2.0)))), 3.0));
	} else if (y_45_scale <= -1.05e+37) {
		tmp = t_4 * (sqrt(2.0) * -b);
	} else if (y_45_scale <= -4.3e-36) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * sqrt(8.0))) * ((b * sqrt(2.0)) / x_45_scale);
	} else if (y_45_scale <= -1.45e-103) {
		tmp = t_3;
	} else if (y_45_scale <= -1.75e-280) {
		tmp = t_5;
	} else if (y_45_scale <= 4.2e-260) {
		tmp = t_3;
	} else if (y_45_scale <= 2.6e-222) {
		tmp = t_5;
	} else if (y_45_scale <= 3.8e+52) {
		tmp = t_4 * sqrt((2.0 * ((b * b) + pow((a * sin(t_0)), 2.0))));
	} else {
		tmp = t_4 * (sqrt(2.0) * hypot((a * sin((((double) M_PI) * (0.005555555555555556 * angle)))), b));
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.cos(t_0);
	double t_2 = 0.25 * (x_45_scale * Math.sqrt(8.0));
	double t_3 = t_2 * (Math.sqrt(2.0) * (a * t_1));
	double t_4 = 0.25 * (y_45_scale * Math.sqrt(8.0));
	double t_5 = t_2 * (t_1 * (a * -Math.sqrt(2.0)));
	double tmp;
	if (y_45_scale <= -1.4e+233) {
		tmp = 0.25 * (y_45_scale * Math.pow(Math.cbrt((b * (Math.sqrt(8.0) * Math.sqrt(2.0)))), 3.0));
	} else if (y_45_scale <= -1.05e+37) {
		tmp = t_4 * (Math.sqrt(2.0) * -b);
	} else if (y_45_scale <= -4.3e-36) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * Math.sqrt(8.0))) * ((b * Math.sqrt(2.0)) / x_45_scale);
	} else if (y_45_scale <= -1.45e-103) {
		tmp = t_3;
	} else if (y_45_scale <= -1.75e-280) {
		tmp = t_5;
	} else if (y_45_scale <= 4.2e-260) {
		tmp = t_3;
	} else if (y_45_scale <= 2.6e-222) {
		tmp = t_5;
	} else if (y_45_scale <= 3.8e+52) {
		tmp = t_4 * Math.sqrt((2.0 * ((b * b) + Math.pow((a * Math.sin(t_0)), 2.0))));
	} else {
		tmp = t_4 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin((Math.PI * (0.005555555555555556 * angle)))), b));
	}
	return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_1 = cos(t_0)
	t_2 = Float64(0.25 * Float64(x_45_scale * sqrt(8.0)))
	t_3 = Float64(t_2 * Float64(sqrt(2.0) * Float64(a * t_1)))
	t_4 = Float64(0.25 * Float64(y_45_scale * sqrt(8.0)))
	t_5 = Float64(t_2 * Float64(t_1 * Float64(a * Float64(-sqrt(2.0)))))
	tmp = 0.0
	if (y_45_scale <= -1.4e+233)
		tmp = Float64(0.25 * Float64(y_45_scale * (cbrt(Float64(b * Float64(sqrt(8.0) * sqrt(2.0)))) ^ 3.0)));
	elseif (y_45_scale <= -1.05e+37)
		tmp = Float64(t_4 * Float64(sqrt(2.0) * Float64(-b)));
	elseif (y_45_scale <= -4.3e-36)
		tmp = Float64(Float64(0.25 * Float64(Float64(y_45_scale * x_45_scale) * sqrt(8.0))) * Float64(Float64(b * sqrt(2.0)) / x_45_scale));
	elseif (y_45_scale <= -1.45e-103)
		tmp = t_3;
	elseif (y_45_scale <= -1.75e-280)
		tmp = t_5;
	elseif (y_45_scale <= 4.2e-260)
		tmp = t_3;
	elseif (y_45_scale <= 2.6e-222)
		tmp = t_5;
	elseif (y_45_scale <= 3.8e+52)
		tmp = Float64(t_4 * sqrt(Float64(2.0 * Float64(Float64(b * b) + (Float64(a * sin(t_0)) ^ 2.0)))));
	else
		tmp = Float64(t_4 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(pi * Float64(0.005555555555555556 * angle)))), b)));
	end
	return tmp
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(0.25 * N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * N[(t$95$1 * N[(a * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -1.4e+233], N[(0.25 * N[(y$45$scale * N[Power[N[Power[N[(b * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -1.05e+37], N[(t$95$4 * N[(N[Sqrt[2.0], $MachinePrecision] * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -4.3e-36], N[(N[(0.25 * N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -1.45e-103], t$95$3, If[LessEqual[y$45$scale, -1.75e-280], t$95$5, If[LessEqual[y$45$scale, 4.2e-260], t$95$3, If[LessEqual[y$45$scale, 2.6e-222], t$95$5, If[LessEqual[y$45$scale, 3.8e+52], N[(t$95$4 * N[Sqrt[N[(2.0 * N[(N[(b * b), $MachinePrecision] + N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t_0\\
t_2 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\
t_3 := t_2 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_1\right)\right)\\
t_4 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\
t_5 := t_2 \cdot \left(t_1 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\
\mathbf{if}\;y-scale \leq -1.4 \cdot 10^{+233}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\

\mathbf{elif}\;y-scale \leq -1.05 \cdot 10^{+37}:\\
\;\;\;\;t_4 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\

\mathbf{elif}\;y-scale \leq -4.3 \cdot 10^{-36}:\\
\;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\

\mathbf{elif}\;y-scale \leq -1.45 \cdot 10^{-103}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y-scale \leq -1.75 \cdot 10^{-280}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;y-scale \leq 4.2 \cdot 10^{-260}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y-scale \leq 2.6 \cdot 10^{-222}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;y-scale \leq 3.8 \cdot 10^{+52}:\\
\;\;\;\;t_4 \cdot \sqrt{2 \cdot \left(b \cdot b + {\left(a \cdot \sin t_0\right)}^{2}\right)}\\

\mathbf{else}:\\
\;\;\;\;t_4 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y-scale < -1.40000000000000005e233

    1. Initial program 0.0%

      \[\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. Taylor expanded in angle around 0 52.3%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*52.3%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*52.0%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified52.0%

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

      \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. add-cube-cbrt52.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right) \cdot \sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
      2. pow352.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{{\left(\sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}^{3}}\right) \]
      3. *-commutative52.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{\color{blue}{\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}}}\right)}^{3}\right) \]
      4. associate-*l*52.4%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{\color{blue}{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}}\right)}^{3}\right) \]
    7. Applied egg-rr52.4%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{{\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}}\right) \]

    if -1.40000000000000005e233 < y-scale < -1.0500000000000001e37

    1. Initial program 4.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. Taylor expanded in x-scale around 0 0.6%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*0.6%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified0.6%

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

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot b\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot b\right)} \]
      2. distribute-rgt-neg-in32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-b\right)\right)} \]
    8. Simplified32.7%

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

    if -1.0500000000000001e37 < y-scale < -4.3000000000000002e-36

    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. Taylor expanded in y-scale around inf 12.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*12.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}} \]
      2. associate-*r*12.9%

        \[\leadsto \left(0.25 \cdot \color{blue}{\left(\left(x-scale \cdot y-scale\right) \cdot \sqrt{8}\right)}\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      3. *-commutative12.9%

        \[\leadsto \left(0.25 \cdot \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      4. distribute-lft-out12.9%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(\frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
      5. +-commutative12.9%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\left(\frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
    4. Simplified12.9%

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

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

    if -4.3000000000000002e-36 < y-scale < -1.4499999999999999e-103 or -1.75e-280 < y-scale < 4.20000000000000009e-260

    1. Initial program 3.6%

      \[\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. Taylor expanded in y-scale around 0 20.6%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out20.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def20.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified20.6%

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

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

    if -1.4499999999999999e-103 < y-scale < -1.75e-280 or 4.20000000000000009e-260 < y-scale < 2.5999999999999998e-222

    1. Initial program 0.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. Taylor expanded in y-scale around 0 17.0%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out17.0%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def17.0%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified17.0%

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg33.3%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*33.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in33.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified33.4%

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

    if 2.5999999999999998e-222 < y-scale < 3.8e52

    1. Initial program 0.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. Taylor expanded in x-scale around 0 41.1%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*41.1%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified41.0%

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2}\right)} \]
    6. Step-by-step derivation
      1. *-un-lft-identity41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(1 \cdot \sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)}\right)} \]
      2. unpow241.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(1 \cdot \sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)}\right) \]
      3. *-rgt-identity41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(1 \cdot \sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)}\right) \]
      4. *-rgt-identity41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(1 \cdot \sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)}\right) \]
    7. Applied egg-rr41.1%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(1 \cdot \sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}\right)} \]
    8. Step-by-step derivation
      1. *-lft-identity41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}} \]
      2. unpow241.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{{b}^{2}}\right)} \]
      3. +-commutative41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\left({b}^{2} + {\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}\right)}} \]
      4. unpow241.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(\color{blue}{b \cdot b} + {\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}\right)} \]
      5. *-commutative41.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(b \cdot b + {\left(a \cdot \sin \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}\right)}^{2}\right)} \]
      6. associate-*r*41.0%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(b \cdot b + {\left(a \cdot \sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2}\right)} \]
    9. Simplified41.0%

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

    if 3.8e52 < y-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. Taylor expanded in x-scale around 0 58.7%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*58.7%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out58.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative58.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified62.7%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow262.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity62.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity62.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr62.9%

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}} \]
      2. *-commutative62.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right) \cdot 2}} \]
      3. sqrt-prod62.8%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b} \cdot \sqrt{2}\right)} \]
      4. unpow262.8%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{\color{blue}{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} + b \cdot b} \cdot \sqrt{2}\right) \]
      5. hypot-def72.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)} \cdot \sqrt{2}\right) \]
    9. Applied egg-rr72.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -1.4 \cdot 10^{+233}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\ \mathbf{elif}\;y-scale \leq -1.05 \cdot 10^{+37}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -4.3 \cdot 10^{-36}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\ \mathbf{elif}\;y-scale \leq -1.45 \cdot 10^{-103}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -1.75 \cdot 10^{-280}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 4.2 \cdot 10^{-260}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 2.6 \cdot 10^{-222}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 3.8 \cdot 10^{+52}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left(b \cdot b + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\\ \end{array} \]

Alternative 8: 34.8% accurate, 7.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \cos t_0\\ t_2 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\ t_3 := t_2 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_1\right)\right)\\ t_4 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\ t_5 := t_2 \cdot \left(t_1 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{if}\;y-scale \leq -2.7 \cdot 10^{+232}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\ \mathbf{elif}\;y-scale \leq -1.3 \cdot 10^{+37}:\\ \;\;\;\;t_4 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -3.9 \cdot 10^{-36}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\ \mathbf{elif}\;y-scale \leq -1.9 \cdot 10^{-103}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y-scale \leq -4.5 \cdot 10^{-280}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y-scale \leq 4.9 \cdot 10^{-259}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y-scale \leq 9.2 \cdot 10^{-220}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y-scale \leq 15600000000000:\\ \;\;\;\;t_4 \cdot {\left(2 \cdot \left(b \cdot b + {\left(a \cdot t_0\right)}^{2}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;t_4 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI)))
        (t_1 (cos t_0))
        (t_2 (* 0.25 (* x-scale (sqrt 8.0))))
        (t_3 (* t_2 (* (sqrt 2.0) (* a t_1))))
        (t_4 (* 0.25 (* y-scale (sqrt 8.0))))
        (t_5 (* t_2 (* t_1 (* a (- (sqrt 2.0)))))))
   (if (<= y-scale -2.7e+232)
     (* 0.25 (* y-scale (pow (cbrt (* b (* (sqrt 8.0) (sqrt 2.0)))) 3.0)))
     (if (<= y-scale -1.3e+37)
       (* t_4 (* (sqrt 2.0) (- b)))
       (if (<= y-scale -3.9e-36)
         (*
          (* 0.25 (* (* y-scale x-scale) (sqrt 8.0)))
          (/ (* b (sqrt 2.0)) x-scale))
         (if (<= y-scale -1.9e-103)
           t_3
           (if (<= y-scale -4.5e-280)
             t_5
             (if (<= y-scale 4.9e-259)
               t_3
               (if (<= y-scale 9.2e-220)
                 t_5
                 (if (<= y-scale 15600000000000.0)
                   (* t_4 (pow (* 2.0 (+ (* b b) (pow (* a t_0) 2.0))) 0.5))
                   (*
                    t_4
                    (*
                     (sqrt 2.0)
                     (hypot
                      (* a (sin (* PI (* 0.005555555555555556 angle))))
                      b)))))))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = cos(t_0);
	double t_2 = 0.25 * (x_45_scale * sqrt(8.0));
	double t_3 = t_2 * (sqrt(2.0) * (a * t_1));
	double t_4 = 0.25 * (y_45_scale * sqrt(8.0));
	double t_5 = t_2 * (t_1 * (a * -sqrt(2.0)));
	double tmp;
	if (y_45_scale <= -2.7e+232) {
		tmp = 0.25 * (y_45_scale * pow(cbrt((b * (sqrt(8.0) * sqrt(2.0)))), 3.0));
	} else if (y_45_scale <= -1.3e+37) {
		tmp = t_4 * (sqrt(2.0) * -b);
	} else if (y_45_scale <= -3.9e-36) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * sqrt(8.0))) * ((b * sqrt(2.0)) / x_45_scale);
	} else if (y_45_scale <= -1.9e-103) {
		tmp = t_3;
	} else if (y_45_scale <= -4.5e-280) {
		tmp = t_5;
	} else if (y_45_scale <= 4.9e-259) {
		tmp = t_3;
	} else if (y_45_scale <= 9.2e-220) {
		tmp = t_5;
	} else if (y_45_scale <= 15600000000000.0) {
		tmp = t_4 * pow((2.0 * ((b * b) + pow((a * t_0), 2.0))), 0.5);
	} else {
		tmp = t_4 * (sqrt(2.0) * hypot((a * sin((((double) M_PI) * (0.005555555555555556 * angle)))), b));
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.cos(t_0);
	double t_2 = 0.25 * (x_45_scale * Math.sqrt(8.0));
	double t_3 = t_2 * (Math.sqrt(2.0) * (a * t_1));
	double t_4 = 0.25 * (y_45_scale * Math.sqrt(8.0));
	double t_5 = t_2 * (t_1 * (a * -Math.sqrt(2.0)));
	double tmp;
	if (y_45_scale <= -2.7e+232) {
		tmp = 0.25 * (y_45_scale * Math.pow(Math.cbrt((b * (Math.sqrt(8.0) * Math.sqrt(2.0)))), 3.0));
	} else if (y_45_scale <= -1.3e+37) {
		tmp = t_4 * (Math.sqrt(2.0) * -b);
	} else if (y_45_scale <= -3.9e-36) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * Math.sqrt(8.0))) * ((b * Math.sqrt(2.0)) / x_45_scale);
	} else if (y_45_scale <= -1.9e-103) {
		tmp = t_3;
	} else if (y_45_scale <= -4.5e-280) {
		tmp = t_5;
	} else if (y_45_scale <= 4.9e-259) {
		tmp = t_3;
	} else if (y_45_scale <= 9.2e-220) {
		tmp = t_5;
	} else if (y_45_scale <= 15600000000000.0) {
		tmp = t_4 * Math.pow((2.0 * ((b * b) + Math.pow((a * t_0), 2.0))), 0.5);
	} else {
		tmp = t_4 * (Math.sqrt(2.0) * Math.hypot((a * Math.sin((Math.PI * (0.005555555555555556 * angle)))), b));
	}
	return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_1 = cos(t_0)
	t_2 = Float64(0.25 * Float64(x_45_scale * sqrt(8.0)))
	t_3 = Float64(t_2 * Float64(sqrt(2.0) * Float64(a * t_1)))
	t_4 = Float64(0.25 * Float64(y_45_scale * sqrt(8.0)))
	t_5 = Float64(t_2 * Float64(t_1 * Float64(a * Float64(-sqrt(2.0)))))
	tmp = 0.0
	if (y_45_scale <= -2.7e+232)
		tmp = Float64(0.25 * Float64(y_45_scale * (cbrt(Float64(b * Float64(sqrt(8.0) * sqrt(2.0)))) ^ 3.0)));
	elseif (y_45_scale <= -1.3e+37)
		tmp = Float64(t_4 * Float64(sqrt(2.0) * Float64(-b)));
	elseif (y_45_scale <= -3.9e-36)
		tmp = Float64(Float64(0.25 * Float64(Float64(y_45_scale * x_45_scale) * sqrt(8.0))) * Float64(Float64(b * sqrt(2.0)) / x_45_scale));
	elseif (y_45_scale <= -1.9e-103)
		tmp = t_3;
	elseif (y_45_scale <= -4.5e-280)
		tmp = t_5;
	elseif (y_45_scale <= 4.9e-259)
		tmp = t_3;
	elseif (y_45_scale <= 9.2e-220)
		tmp = t_5;
	elseif (y_45_scale <= 15600000000000.0)
		tmp = Float64(t_4 * (Float64(2.0 * Float64(Float64(b * b) + (Float64(a * t_0) ^ 2.0))) ^ 0.5));
	else
		tmp = Float64(t_4 * Float64(sqrt(2.0) * hypot(Float64(a * sin(Float64(pi * Float64(0.005555555555555556 * angle)))), b)));
	end
	return tmp
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(0.25 * N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * N[(t$95$1 * N[(a * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -2.7e+232], N[(0.25 * N[(y$45$scale * N[Power[N[Power[N[(b * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -1.3e+37], N[(t$95$4 * N[(N[Sqrt[2.0], $MachinePrecision] * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -3.9e-36], N[(N[(0.25 * N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -1.9e-103], t$95$3, If[LessEqual[y$45$scale, -4.5e-280], t$95$5, If[LessEqual[y$45$scale, 4.9e-259], t$95$3, If[LessEqual[y$45$scale, 9.2e-220], t$95$5, If[LessEqual[y$45$scale, 15600000000000.0], N[(t$95$4 * N[Power[N[(2.0 * N[(N[(b * b), $MachinePrecision] + N[Power[N[(a * t$95$0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(a * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t_0\\
t_2 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\
t_3 := t_2 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_1\right)\right)\\
t_4 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\
t_5 := t_2 \cdot \left(t_1 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\
\mathbf{if}\;y-scale \leq -2.7 \cdot 10^{+232}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\

\mathbf{elif}\;y-scale \leq -1.3 \cdot 10^{+37}:\\
\;\;\;\;t_4 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\

\mathbf{elif}\;y-scale \leq -3.9 \cdot 10^{-36}:\\
\;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\

\mathbf{elif}\;y-scale \leq -1.9 \cdot 10^{-103}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y-scale \leq -4.5 \cdot 10^{-280}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;y-scale \leq 4.9 \cdot 10^{-259}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y-scale \leq 9.2 \cdot 10^{-220}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;y-scale \leq 15600000000000:\\
\;\;\;\;t_4 \cdot {\left(2 \cdot \left(b \cdot b + {\left(a \cdot t_0\right)}^{2}\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;t_4 \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y-scale < -2.7000000000000001e232

    1. Initial program 0.0%

      \[\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. Taylor expanded in angle around 0 52.3%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*52.3%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*52.0%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified52.0%

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

      \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. add-cube-cbrt52.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right) \cdot \sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
      2. pow352.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{{\left(\sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}^{3}}\right) \]
      3. *-commutative52.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{\color{blue}{\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}}}\right)}^{3}\right) \]
      4. associate-*l*52.4%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{\color{blue}{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}}\right)}^{3}\right) \]
    7. Applied egg-rr52.4%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{{\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}}\right) \]

    if -2.7000000000000001e232 < y-scale < -1.3e37

    1. Initial program 4.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. Taylor expanded in x-scale around 0 0.6%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*0.6%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified0.6%

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

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot b\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot b\right)} \]
      2. distribute-rgt-neg-in32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-b\right)\right)} \]
    8. Simplified32.7%

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

    if -1.3e37 < y-scale < -3.9000000000000001e-36

    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. Taylor expanded in y-scale around inf 12.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*12.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}} \]
      2. associate-*r*12.9%

        \[\leadsto \left(0.25 \cdot \color{blue}{\left(\left(x-scale \cdot y-scale\right) \cdot \sqrt{8}\right)}\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      3. *-commutative12.9%

        \[\leadsto \left(0.25 \cdot \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      4. distribute-lft-out12.9%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(\frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
      5. +-commutative12.9%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\left(\frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
    4. Simplified12.9%

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

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

    if -3.9000000000000001e-36 < y-scale < -1.9e-103 or -4.4999999999999996e-280 < y-scale < 4.90000000000000023e-259

    1. Initial program 3.6%

      \[\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. Taylor expanded in y-scale around 0 20.6%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out20.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def20.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified20.6%

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

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

    if -1.9e-103 < y-scale < -4.4999999999999996e-280 or 4.90000000000000023e-259 < y-scale < 9.19999999999999922e-220

    1. Initial program 0.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. Taylor expanded in y-scale around 0 16.8%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out16.8%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def16.8%

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

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg32.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*32.7%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in32.7%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified32.7%

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

    if 9.19999999999999922e-220 < y-scale < 1.56e13

    1. Initial program 0.3%

      \[\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. Taylor expanded in x-scale around 0 42.3%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*42.3%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out42.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative42.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified42.3%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow242.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity42.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity42.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr42.3%

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2} + b \cdot b\right)\right)}^{0.5} \]

    if 1.56e13 < y-scale

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

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*54.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out54.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative54.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified58.3%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow258.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr58.4%

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\sqrt{2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right)}} \]
      2. *-commutative58.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{\left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b\right) \cdot 2}} \]
      3. sqrt-prod58.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot b} \cdot \sqrt{2}\right)} \]
      4. unpow258.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{\color{blue}{\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot \left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} + b \cdot b} \cdot \sqrt{2}\right) \]
      5. hypot-def66.0%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\color{blue}{\mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)} \cdot \sqrt{2}\right) \]
    9. Applied egg-rr66.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -2.7 \cdot 10^{+232}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\ \mathbf{elif}\;y-scale \leq -1.3 \cdot 10^{+37}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -3.9 \cdot 10^{-36}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\ \mathbf{elif}\;y-scale \leq -1.9 \cdot 10^{-103}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -4.5 \cdot 10^{-280}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 4.9 \cdot 10^{-259}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 9.2 \cdot 10^{-220}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 15600000000000:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left(b \cdot b + {\left(a \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \mathsf{hypot}\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), b\right)\right)\\ \end{array} \]

Alternative 9: 33.5% accurate, 8.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \cos t_0\\ t_2 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\ t_3 := t_2 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_1\right)\right)\\ t_4 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\ t_5 := t_2 \cdot \left(t_1 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{if}\;y-scale \leq -6.5 \cdot 10^{+232}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\ \mathbf{elif}\;y-scale \leq -3.7 \cdot 10^{+37}:\\ \;\;\;\;t_4 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -2.25 \cdot 10^{-37}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\ \mathbf{elif}\;y-scale \leq -6.6 \cdot 10^{-105}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y-scale \leq -5.4 \cdot 10^{-279}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y-scale \leq 4.7 \cdot 10^{-256}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y-scale \leq 3.95 \cdot 10^{-221}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_4 \cdot {\left(2 \cdot \left(b \cdot b + {\left(a \cdot t_0\right)}^{2}\right)\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI)))
        (t_1 (cos t_0))
        (t_2 (* 0.25 (* x-scale (sqrt 8.0))))
        (t_3 (* t_2 (* (sqrt 2.0) (* a t_1))))
        (t_4 (* 0.25 (* y-scale (sqrt 8.0))))
        (t_5 (* t_2 (* t_1 (* a (- (sqrt 2.0)))))))
   (if (<= y-scale -6.5e+232)
     (* 0.25 (* y-scale (pow (cbrt (* b (* (sqrt 8.0) (sqrt 2.0)))) 3.0)))
     (if (<= y-scale -3.7e+37)
       (* t_4 (* (sqrt 2.0) (- b)))
       (if (<= y-scale -2.25e-37)
         (*
          (* 0.25 (* (* y-scale x-scale) (sqrt 8.0)))
          (/ (* b (sqrt 2.0)) x-scale))
         (if (<= y-scale -6.6e-105)
           t_3
           (if (<= y-scale -5.4e-279)
             t_5
             (if (<= y-scale 4.7e-256)
               t_3
               (if (<= y-scale 3.95e-221)
                 t_5
                 (*
                  t_4
                  (pow (* 2.0 (+ (* b b) (pow (* a t_0) 2.0))) 0.5)))))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = cos(t_0);
	double t_2 = 0.25 * (x_45_scale * sqrt(8.0));
	double t_3 = t_2 * (sqrt(2.0) * (a * t_1));
	double t_4 = 0.25 * (y_45_scale * sqrt(8.0));
	double t_5 = t_2 * (t_1 * (a * -sqrt(2.0)));
	double tmp;
	if (y_45_scale <= -6.5e+232) {
		tmp = 0.25 * (y_45_scale * pow(cbrt((b * (sqrt(8.0) * sqrt(2.0)))), 3.0));
	} else if (y_45_scale <= -3.7e+37) {
		tmp = t_4 * (sqrt(2.0) * -b);
	} else if (y_45_scale <= -2.25e-37) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * sqrt(8.0))) * ((b * sqrt(2.0)) / x_45_scale);
	} else if (y_45_scale <= -6.6e-105) {
		tmp = t_3;
	} else if (y_45_scale <= -5.4e-279) {
		tmp = t_5;
	} else if (y_45_scale <= 4.7e-256) {
		tmp = t_3;
	} else if (y_45_scale <= 3.95e-221) {
		tmp = t_5;
	} else {
		tmp = t_4 * pow((2.0 * ((b * b) + pow((a * t_0), 2.0))), 0.5);
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.cos(t_0);
	double t_2 = 0.25 * (x_45_scale * Math.sqrt(8.0));
	double t_3 = t_2 * (Math.sqrt(2.0) * (a * t_1));
	double t_4 = 0.25 * (y_45_scale * Math.sqrt(8.0));
	double t_5 = t_2 * (t_1 * (a * -Math.sqrt(2.0)));
	double tmp;
	if (y_45_scale <= -6.5e+232) {
		tmp = 0.25 * (y_45_scale * Math.pow(Math.cbrt((b * (Math.sqrt(8.0) * Math.sqrt(2.0)))), 3.0));
	} else if (y_45_scale <= -3.7e+37) {
		tmp = t_4 * (Math.sqrt(2.0) * -b);
	} else if (y_45_scale <= -2.25e-37) {
		tmp = (0.25 * ((y_45_scale * x_45_scale) * Math.sqrt(8.0))) * ((b * Math.sqrt(2.0)) / x_45_scale);
	} else if (y_45_scale <= -6.6e-105) {
		tmp = t_3;
	} else if (y_45_scale <= -5.4e-279) {
		tmp = t_5;
	} else if (y_45_scale <= 4.7e-256) {
		tmp = t_3;
	} else if (y_45_scale <= 3.95e-221) {
		tmp = t_5;
	} else {
		tmp = t_4 * Math.pow((2.0 * ((b * b) + Math.pow((a * t_0), 2.0))), 0.5);
	}
	return tmp;
}
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_1 = cos(t_0)
	t_2 = Float64(0.25 * Float64(x_45_scale * sqrt(8.0)))
	t_3 = Float64(t_2 * Float64(sqrt(2.0) * Float64(a * t_1)))
	t_4 = Float64(0.25 * Float64(y_45_scale * sqrt(8.0)))
	t_5 = Float64(t_2 * Float64(t_1 * Float64(a * Float64(-sqrt(2.0)))))
	tmp = 0.0
	if (y_45_scale <= -6.5e+232)
		tmp = Float64(0.25 * Float64(y_45_scale * (cbrt(Float64(b * Float64(sqrt(8.0) * sqrt(2.0)))) ^ 3.0)));
	elseif (y_45_scale <= -3.7e+37)
		tmp = Float64(t_4 * Float64(sqrt(2.0) * Float64(-b)));
	elseif (y_45_scale <= -2.25e-37)
		tmp = Float64(Float64(0.25 * Float64(Float64(y_45_scale * x_45_scale) * sqrt(8.0))) * Float64(Float64(b * sqrt(2.0)) / x_45_scale));
	elseif (y_45_scale <= -6.6e-105)
		tmp = t_3;
	elseif (y_45_scale <= -5.4e-279)
		tmp = t_5;
	elseif (y_45_scale <= 4.7e-256)
		tmp = t_3;
	elseif (y_45_scale <= 3.95e-221)
		tmp = t_5;
	else
		tmp = Float64(t_4 * (Float64(2.0 * Float64(Float64(b * b) + (Float64(a * t_0) ^ 2.0))) ^ 0.5));
	end
	return tmp
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(0.25 * N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * N[(t$95$1 * N[(a * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$45$scale, -6.5e+232], N[(0.25 * N[(y$45$scale * N[Power[N[Power[N[(b * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -3.7e+37], N[(t$95$4 * N[(N[Sqrt[2.0], $MachinePrecision] * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -2.25e-37], N[(N[(0.25 * N[(N[(y$45$scale * x$45$scale), $MachinePrecision] * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, -6.6e-105], t$95$3, If[LessEqual[y$45$scale, -5.4e-279], t$95$5, If[LessEqual[y$45$scale, 4.7e-256], t$95$3, If[LessEqual[y$45$scale, 3.95e-221], t$95$5, N[(t$95$4 * N[Power[N[(2.0 * N[(N[(b * b), $MachinePrecision] + N[Power[N[(a * t$95$0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t_0\\
t_2 := 0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\\
t_3 := t_2 \cdot \left(\sqrt{2} \cdot \left(a \cdot t_1\right)\right)\\
t_4 := 0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\\
t_5 := t_2 \cdot \left(t_1 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\
\mathbf{if}\;y-scale \leq -6.5 \cdot 10^{+232}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\

\mathbf{elif}\;y-scale \leq -3.7 \cdot 10^{+37}:\\
\;\;\;\;t_4 \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\

\mathbf{elif}\;y-scale \leq -2.25 \cdot 10^{-37}:\\
\;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\

\mathbf{elif}\;y-scale \leq -6.6 \cdot 10^{-105}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y-scale \leq -5.4 \cdot 10^{-279}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;y-scale \leq 4.7 \cdot 10^{-256}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y-scale \leq 3.95 \cdot 10^{-221}:\\
\;\;\;\;t_5\\

\mathbf{else}:\\
\;\;\;\;t_4 \cdot {\left(2 \cdot \left(b \cdot b + {\left(a \cdot t_0\right)}^{2}\right)\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y-scale < -6.50000000000000016e232

    1. Initial program 0.0%

      \[\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. Taylor expanded in angle around 0 52.3%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*52.3%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*52.0%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified52.0%

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

      \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. add-cube-cbrt52.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right) \cdot \sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
      2. pow352.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{{\left(\sqrt[3]{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}^{3}}\right) \]
      3. *-commutative52.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{\color{blue}{\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}}}\right)}^{3}\right) \]
      4. associate-*l*52.4%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{\color{blue}{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}}\right)}^{3}\right) \]
    7. Applied egg-rr52.4%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{{\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}}\right) \]

    if -6.50000000000000016e232 < y-scale < -3.6999999999999999e37

    1. Initial program 4.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. Taylor expanded in x-scale around 0 0.6%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*0.6%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative0.6%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified0.6%

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

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot b\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot b\right)} \]
      2. distribute-rgt-neg-in32.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-b\right)\right)} \]
    8. Simplified32.7%

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

    if -3.6999999999999999e37 < y-scale < -2.2500000000000002e-37

    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. Taylor expanded in y-scale around inf 12.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*12.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \left(y-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}}} \]
      2. associate-*r*12.9%

        \[\leadsto \left(0.25 \cdot \color{blue}{\left(\left(x-scale \cdot y-scale\right) \cdot \sqrt{8}\right)}\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      3. *-commutative12.9%

        \[\leadsto \left(0.25 \cdot \left(\color{blue}{\left(y-scale \cdot x-scale\right)} \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + 2 \cdot \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}} \]
      4. distribute-lft-out12.9%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left(\frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
      5. +-commutative12.9%

        \[\leadsto \left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\left(\frac{{a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}} \]
    4. Simplified12.9%

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

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

    if -2.2500000000000002e-37 < y-scale < -6.5999999999999997e-105 or -5.4000000000000003e-279 < y-scale < 4.69999999999999982e-256

    1. Initial program 3.6%

      \[\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. Taylor expanded in y-scale around 0 20.6%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out20.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def20.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified20.6%

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

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

    if -6.5999999999999997e-105 < y-scale < -5.4000000000000003e-279 or 4.69999999999999982e-256 < y-scale < 3.9500000000000002e-221

    1. Initial program 0.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. Taylor expanded in y-scale around 0 16.8%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out16.8%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def16.8%

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

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg32.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*32.7%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in32.7%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified32.7%

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

    if 3.9500000000000002e-221 < y-scale

    1. Initial program 1.9%

      \[\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. Taylor expanded in x-scale around 0 49.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*49.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out49.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative49.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified51.8%

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

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

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{{\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + {\left(b \cdot 1\right)}^{2}\right)\right)}^{0.5}} \]
      2. unpow251.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{\left(b \cdot 1\right) \cdot \left(b \cdot 1\right)}\right)\right)}^{0.5} \]
      3. *-rgt-identity51.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + \color{blue}{b} \cdot \left(b \cdot 1\right)\right)\right)}^{0.5} \]
      4. *-rgt-identity51.9%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + b \cdot \color{blue}{b}\right)\right)}^{0.5} \]
    7. Applied egg-rr51.9%

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left({\left(a \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2} + b \cdot b\right)\right)}^{0.5} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification40.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -6.5 \cdot 10^{+232}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot {\left(\sqrt[3]{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)}^{3}\right)\\ \mathbf{elif}\;y-scale \leq -3.7 \cdot 10^{+37}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y-scale \leq -2.25 \cdot 10^{-37}:\\ \;\;\;\;\left(0.25 \cdot \left(\left(y-scale \cdot x-scale\right) \cdot \sqrt{8}\right)\right) \cdot \frac{b \cdot \sqrt{2}}{x-scale}\\ \mathbf{elif}\;y-scale \leq -6.6 \cdot 10^{-105}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -5.4 \cdot 10^{-279}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 4.7 \cdot 10^{-256}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 3.95 \cdot 10^{-221}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot {\left(2 \cdot \left(b \cdot b + {\left(a \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}\right)\right)}^{0.5}\\ \end{array} \]

Alternative 10: 24.5% accurate, 8.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\ \mathbf{if}\;b \leq -2.35 \cdot 10^{+27}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 310000000:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{+66}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \log \left(e^{\sqrt{8} \cdot b}\right)\right)\right)\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+236}:\\ \;\;\;\;\left(-0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \left(x-scale \cdot b\right)\right)\right)\right) \cdot \frac{\sqrt{2}}{x-scale}\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+254}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(b \cdot \sqrt{2}\right) \cdot \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* 0.25 (* y-scale (sqrt (* (* b b) 16.0))))))
   (if (<= b -2.35e+27)
     t_0
     (if (<= b 310000000.0)
       (*
        (* 0.25 (* x-scale (sqrt 8.0)))
        (* (cos (* 0.005555555555555556 (* angle PI))) (* a (- (sqrt 2.0)))))
       (if (<= b 1.05e+66)
         (* 0.25 (* (sqrt 2.0) (* y-scale (log (exp (* (sqrt 8.0) b))))))
         (if (<= b 6e+236)
           (*
            (* -0.25 (* y-scale (* (sqrt 8.0) (* x-scale b))))
            (/ (sqrt 2.0) x-scale))
           (if (<= b 3e+254)
             t_0
             (*
              (* 0.25 (* y-scale (sqrt 8.0)))
              (*
               (* b (sqrt 2.0))
               (cos (* angle (* 0.005555555555555556 PI))))))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.25 * (y_45_scale * sqrt(((b * b) * 16.0)));
	double tmp;
	if (b <= -2.35e+27) {
		tmp = t_0;
	} else if (b <= 310000000.0) {
		tmp = (0.25 * (x_45_scale * sqrt(8.0))) * (cos((0.005555555555555556 * (angle * ((double) M_PI)))) * (a * -sqrt(2.0)));
	} else if (b <= 1.05e+66) {
		tmp = 0.25 * (sqrt(2.0) * (y_45_scale * log(exp((sqrt(8.0) * b)))));
	} else if (b <= 6e+236) {
		tmp = (-0.25 * (y_45_scale * (sqrt(8.0) * (x_45_scale * b)))) * (sqrt(2.0) / x_45_scale);
	} else if (b <= 3e+254) {
		tmp = t_0;
	} else {
		tmp = (0.25 * (y_45_scale * sqrt(8.0))) * ((b * sqrt(2.0)) * cos((angle * (0.005555555555555556 * ((double) M_PI)))));
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = 0.25 * (y_45_scale * Math.sqrt(((b * b) * 16.0)));
	double tmp;
	if (b <= -2.35e+27) {
		tmp = t_0;
	} else if (b <= 310000000.0) {
		tmp = (0.25 * (x_45_scale * Math.sqrt(8.0))) * (Math.cos((0.005555555555555556 * (angle * Math.PI))) * (a * -Math.sqrt(2.0)));
	} else if (b <= 1.05e+66) {
		tmp = 0.25 * (Math.sqrt(2.0) * (y_45_scale * Math.log(Math.exp((Math.sqrt(8.0) * b)))));
	} else if (b <= 6e+236) {
		tmp = (-0.25 * (y_45_scale * (Math.sqrt(8.0) * (x_45_scale * b)))) * (Math.sqrt(2.0) / x_45_scale);
	} else if (b <= 3e+254) {
		tmp = t_0;
	} else {
		tmp = (0.25 * (y_45_scale * Math.sqrt(8.0))) * ((b * Math.sqrt(2.0)) * Math.cos((angle * (0.005555555555555556 * Math.PI))));
	}
	return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = 0.25 * (y_45_scale * math.sqrt(((b * b) * 16.0)))
	tmp = 0
	if b <= -2.35e+27:
		tmp = t_0
	elif b <= 310000000.0:
		tmp = (0.25 * (x_45_scale * math.sqrt(8.0))) * (math.cos((0.005555555555555556 * (angle * math.pi))) * (a * -math.sqrt(2.0)))
	elif b <= 1.05e+66:
		tmp = 0.25 * (math.sqrt(2.0) * (y_45_scale * math.log(math.exp((math.sqrt(8.0) * b)))))
	elif b <= 6e+236:
		tmp = (-0.25 * (y_45_scale * (math.sqrt(8.0) * (x_45_scale * b)))) * (math.sqrt(2.0) / x_45_scale)
	elif b <= 3e+254:
		tmp = t_0
	else:
		tmp = (0.25 * (y_45_scale * math.sqrt(8.0))) * ((b * math.sqrt(2.0)) * math.cos((angle * (0.005555555555555556 * math.pi))))
	return tmp
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(0.25 * Float64(y_45_scale * sqrt(Float64(Float64(b * b) * 16.0))))
	tmp = 0.0
	if (b <= -2.35e+27)
		tmp = t_0;
	elseif (b <= 310000000.0)
		tmp = Float64(Float64(0.25 * Float64(x_45_scale * sqrt(8.0))) * Float64(cos(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(a * Float64(-sqrt(2.0)))));
	elseif (b <= 1.05e+66)
		tmp = Float64(0.25 * Float64(sqrt(2.0) * Float64(y_45_scale * log(exp(Float64(sqrt(8.0) * b))))));
	elseif (b <= 6e+236)
		tmp = Float64(Float64(-0.25 * Float64(y_45_scale * Float64(sqrt(8.0) * Float64(x_45_scale * b)))) * Float64(sqrt(2.0) / x_45_scale));
	elseif (b <= 3e+254)
		tmp = t_0;
	else
		tmp = Float64(Float64(0.25 * Float64(y_45_scale * sqrt(8.0))) * Float64(Float64(b * sqrt(2.0)) * cos(Float64(angle * Float64(0.005555555555555556 * pi)))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = 0.25 * (y_45_scale * sqrt(((b * b) * 16.0)));
	tmp = 0.0;
	if (b <= -2.35e+27)
		tmp = t_0;
	elseif (b <= 310000000.0)
		tmp = (0.25 * (x_45_scale * sqrt(8.0))) * (cos((0.005555555555555556 * (angle * pi))) * (a * -sqrt(2.0)));
	elseif (b <= 1.05e+66)
		tmp = 0.25 * (sqrt(2.0) * (y_45_scale * log(exp((sqrt(8.0) * b)))));
	elseif (b <= 6e+236)
		tmp = (-0.25 * (y_45_scale * (sqrt(8.0) * (x_45_scale * b)))) * (sqrt(2.0) / x_45_scale);
	elseif (b <= 3e+254)
		tmp = t_0;
	else
		tmp = (0.25 * (y_45_scale * sqrt(8.0))) * ((b * sqrt(2.0)) * cos((angle * (0.005555555555555556 * pi))));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(0.25 * N[(y$45$scale * N[Sqrt[N[(N[(b * b), $MachinePrecision] * 16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.35e+27], t$95$0, If[LessEqual[b, 310000000.0], N[(N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.05e+66], N[(0.25 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(y$45$scale * N[Log[N[Exp[N[(N[Sqrt[8.0], $MachinePrecision] * b), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e+236], N[(N[(-0.25 * N[(y$45$scale * N[(N[Sqrt[8.0], $MachinePrecision] * N[(x$45$scale * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e+254], t$95$0, N[(N[(0.25 * N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\
\mathbf{if}\;b \leq -2.35 \cdot 10^{+27}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;b \leq 310000000:\\
\;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\

\mathbf{elif}\;b \leq 1.05 \cdot 10^{+66}:\\
\;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \log \left(e^{\sqrt{8} \cdot b}\right)\right)\right)\\

\mathbf{elif}\;b \leq 6 \cdot 10^{+236}:\\
\;\;\;\;\left(-0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \left(x-scale \cdot b\right)\right)\right)\right) \cdot \frac{\sqrt{2}}{x-scale}\\

\mathbf{elif}\;b \leq 3 \cdot 10^{+254}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(b \cdot \sqrt{2}\right) \cdot \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -2.34999999999999988e27 or 5.9999999999999996e236 < b < 3.00000000000000007e254

    1. Initial program 3.6%

      \[\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. Taylor expanded in angle around 0 21.0%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*21.0%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*20.9%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified20.9%

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

      \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt4.6%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
      2. sqrt-unprod37.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
      3. swap-sqr37.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
      4. add-sqr-sqrt37.3%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{2} \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}\right) \]
      5. swap-sqr37.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \left(\sqrt{8} \cdot \sqrt{8}\right)\right)}}\right) \]
      6. add-sqr-sqrt37.3%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(\left(b \cdot b\right) \cdot \color{blue}{8}\right)}\right) \]
    7. Applied egg-rr37.3%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{2 \cdot \left(\left(b \cdot b\right) \cdot 8\right)}}\right) \]
    8. Step-by-step derivation
      1. *-commutative37.3%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(\left(b \cdot b\right) \cdot 8\right) \cdot 2}}\right) \]
      2. unpow237.3%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\left(\color{blue}{{b}^{2}} \cdot 8\right) \cdot 2}\right) \]
      3. associate-*l*37.3%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{{b}^{2} \cdot \left(8 \cdot 2\right)}}\right) \]
      4. unpow237.3%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(b \cdot b\right)} \cdot \left(8 \cdot 2\right)}\right) \]
      5. metadata-eval37.3%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot \color{blue}{16}}\right) \]
    9. Simplified37.3%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(b \cdot b\right) \cdot 16}}\right) \]

    if -2.34999999999999988e27 < b < 3.1e8

    1. Initial program 1.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. Taylor expanded in y-scale around 0 21.2%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out21.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def21.2%

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

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg27.1%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*27.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in27.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified27.2%

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

    if 3.1e8 < b < 1.05000000000000003e66

    1. Initial program 0.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. Taylor expanded in angle around 0 17.7%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. add-log-exp51.6%

        \[\leadsto 0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \color{blue}{\log \left(e^{b \cdot \sqrt{8}}\right)}\right)\right) \]
    4. Applied egg-rr51.6%

      \[\leadsto 0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \color{blue}{\log \left(e^{b \cdot \sqrt{8}}\right)}\right)\right) \]

    if 1.05000000000000003e66 < b < 5.9999999999999996e236

    1. Initial program 0.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. Taylor expanded in b around -inf 17.5%

      \[\leadsto \color{blue}{-0.25 \cdot \left(\left(y-scale \cdot \left(x-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\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}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*17.5%

        \[\leadsto \color{blue}{\left(-0.25 \cdot \left(y-scale \cdot \left(x-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\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}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}} \]
      2. associate-*r*17.5%

        \[\leadsto \left(-0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\left(x-scale \cdot b\right) \cdot \sqrt{8}\right)}\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\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}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)} \]
    4. Simplified17.5%

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

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

    if 3.00000000000000007e254 < b

    1. Initial program 12.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. Taylor expanded in x-scale around 0 14.5%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*14.5%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out14.5%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative14.5%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified14.5%

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(b \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*30.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified30.1%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(\sqrt{2} \cdot b\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*r*30.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}\right) \]
      2. *-commutative30.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right) \]
      3. expm1-log1p-u15.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)}\right) \]
      4. expm1-udef15.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)} - 1\right)}\right) \]
    9. Applied egg-rr15.4%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)} - 1\right)}\right) \]
    10. Step-by-step derivation
      1. expm1-def15.4%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)}\right) \]
      2. expm1-log1p30.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right) \]
      3. associate-*r*30.3%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)}\right) \]
    11. Simplified30.3%

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(\sqrt{2} \cdot b\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)}\right) \]
  3. Recombined 5 regimes into one program.
  4. Final simplification31.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.35 \cdot 10^{+27}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\ \mathbf{elif}\;b \leq 310000000:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{+66}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \log \left(e^{\sqrt{8} \cdot b}\right)\right)\right)\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+236}:\\ \;\;\;\;\left(-0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \left(x-scale \cdot b\right)\right)\right)\right) \cdot \frac{\sqrt{2}}{x-scale}\\ \mathbf{elif}\;b \leq 3 \cdot 10^{+254}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\left(b \cdot \sqrt{2}\right) \cdot \cos \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\\ \end{array} \]

Alternative 11: 24.7% accurate, 8.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\ \mathbf{if}\;b \leq -9.5 \cdot 10^{+29}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\ \mathbf{elif}\;b \leq 260000000:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(t_0 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{+64}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \log \left(e^{\sqrt{8} \cdot b}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \left(x-scale \cdot b\right)\right)\right)\right) \cdot \frac{t_0 \cdot \sqrt{2}}{x-scale}\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (cos (* 0.005555555555555556 (* angle PI)))))
   (if (<= b -9.5e+29)
     (* 0.25 (* y-scale (sqrt (* (* b b) 16.0))))
     (if (<= b 260000000.0)
       (* (* 0.25 (* x-scale (sqrt 8.0))) (* t_0 (* a (- (sqrt 2.0)))))
       (if (<= b 8.6e+64)
         (* 0.25 (* (sqrt 2.0) (* y-scale (log (exp (* (sqrt 8.0) b))))))
         (*
          (* -0.25 (* y-scale (* (sqrt 8.0) (* x-scale b))))
          (/ (* t_0 (sqrt 2.0)) x-scale)))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = cos((0.005555555555555556 * (angle * ((double) M_PI))));
	double tmp;
	if (b <= -9.5e+29) {
		tmp = 0.25 * (y_45_scale * sqrt(((b * b) * 16.0)));
	} else if (b <= 260000000.0) {
		tmp = (0.25 * (x_45_scale * sqrt(8.0))) * (t_0 * (a * -sqrt(2.0)));
	} else if (b <= 8.6e+64) {
		tmp = 0.25 * (sqrt(2.0) * (y_45_scale * log(exp((sqrt(8.0) * b)))));
	} else {
		tmp = (-0.25 * (y_45_scale * (sqrt(8.0) * (x_45_scale * b)))) * ((t_0 * sqrt(2.0)) / x_45_scale);
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = Math.cos((0.005555555555555556 * (angle * Math.PI)));
	double tmp;
	if (b <= -9.5e+29) {
		tmp = 0.25 * (y_45_scale * Math.sqrt(((b * b) * 16.0)));
	} else if (b <= 260000000.0) {
		tmp = (0.25 * (x_45_scale * Math.sqrt(8.0))) * (t_0 * (a * -Math.sqrt(2.0)));
	} else if (b <= 8.6e+64) {
		tmp = 0.25 * (Math.sqrt(2.0) * (y_45_scale * Math.log(Math.exp((Math.sqrt(8.0) * b)))));
	} else {
		tmp = (-0.25 * (y_45_scale * (Math.sqrt(8.0) * (x_45_scale * b)))) * ((t_0 * Math.sqrt(2.0)) / x_45_scale);
	}
	return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = math.cos((0.005555555555555556 * (angle * math.pi)))
	tmp = 0
	if b <= -9.5e+29:
		tmp = 0.25 * (y_45_scale * math.sqrt(((b * b) * 16.0)))
	elif b <= 260000000.0:
		tmp = (0.25 * (x_45_scale * math.sqrt(8.0))) * (t_0 * (a * -math.sqrt(2.0)))
	elif b <= 8.6e+64:
		tmp = 0.25 * (math.sqrt(2.0) * (y_45_scale * math.log(math.exp((math.sqrt(8.0) * b)))))
	else:
		tmp = (-0.25 * (y_45_scale * (math.sqrt(8.0) * (x_45_scale * b)))) * ((t_0 * math.sqrt(2.0)) / x_45_scale)
	return tmp
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = cos(Float64(0.005555555555555556 * Float64(angle * pi)))
	tmp = 0.0
	if (b <= -9.5e+29)
		tmp = Float64(0.25 * Float64(y_45_scale * sqrt(Float64(Float64(b * b) * 16.0))));
	elseif (b <= 260000000.0)
		tmp = Float64(Float64(0.25 * Float64(x_45_scale * sqrt(8.0))) * Float64(t_0 * Float64(a * Float64(-sqrt(2.0)))));
	elseif (b <= 8.6e+64)
		tmp = Float64(0.25 * Float64(sqrt(2.0) * Float64(y_45_scale * log(exp(Float64(sqrt(8.0) * b))))));
	else
		tmp = Float64(Float64(-0.25 * Float64(y_45_scale * Float64(sqrt(8.0) * Float64(x_45_scale * b)))) * Float64(Float64(t_0 * sqrt(2.0)) / x_45_scale));
	end
	return tmp
end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = cos((0.005555555555555556 * (angle * pi)));
	tmp = 0.0;
	if (b <= -9.5e+29)
		tmp = 0.25 * (y_45_scale * sqrt(((b * b) * 16.0)));
	elseif (b <= 260000000.0)
		tmp = (0.25 * (x_45_scale * sqrt(8.0))) * (t_0 * (a * -sqrt(2.0)));
	elseif (b <= 8.6e+64)
		tmp = 0.25 * (sqrt(2.0) * (y_45_scale * log(exp((sqrt(8.0) * b)))));
	else
		tmp = (-0.25 * (y_45_scale * (sqrt(8.0) * (x_45_scale * b)))) * ((t_0 * sqrt(2.0)) / x_45_scale);
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b, -9.5e+29], N[(0.25 * N[(y$45$scale * N[Sqrt[N[(N[(b * b), $MachinePrecision] * 16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 260000000.0], N[(N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(a * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.6e+64], N[(0.25 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(y$45$scale * N[Log[N[Exp[N[(N[Sqrt[8.0], $MachinePrecision] * b), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.25 * N[(y$45$scale * N[(N[Sqrt[8.0], $MachinePrecision] * N[(x$45$scale * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$0 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;b \leq -9.5 \cdot 10^{+29}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\

\mathbf{elif}\;b \leq 260000000:\\
\;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(t_0 \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\

\mathbf{elif}\;b \leq 8.6 \cdot 10^{+64}:\\
\;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \log \left(e^{\sqrt{8} \cdot b}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(-0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \left(x-scale \cdot b\right)\right)\right)\right) \cdot \frac{t_0 \cdot \sqrt{2}}{x-scale}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -9.5000000000000003e29

    1. Initial program 2.3%

      \[\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. Taylor expanded in angle around 0 18.0%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*18.0%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*18.0%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified18.0%

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

      \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
      2. sqrt-unprod34.0%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
      3. swap-sqr34.0%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
      4. add-sqr-sqrt34.0%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{2} \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}\right) \]
      5. swap-sqr34.0%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \left(\sqrt{8} \cdot \sqrt{8}\right)\right)}}\right) \]
      6. add-sqr-sqrt34.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(\left(b \cdot b\right) \cdot \color{blue}{8}\right)}\right) \]
    7. Applied egg-rr34.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{2 \cdot \left(\left(b \cdot b\right) \cdot 8\right)}}\right) \]
    8. Step-by-step derivation
      1. *-commutative34.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(\left(b \cdot b\right) \cdot 8\right) \cdot 2}}\right) \]
      2. unpow234.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\left(\color{blue}{{b}^{2}} \cdot 8\right) \cdot 2}\right) \]
      3. associate-*l*34.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{{b}^{2} \cdot \left(8 \cdot 2\right)}}\right) \]
      4. unpow234.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(b \cdot b\right)} \cdot \left(8 \cdot 2\right)}\right) \]
      5. metadata-eval34.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot \color{blue}{16}}\right) \]
    9. Simplified34.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(b \cdot b\right) \cdot 16}}\right) \]

    if -9.5000000000000003e29 < b < 2.6e8

    1. Initial program 1.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. Taylor expanded in y-scale around 0 21.2%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out21.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def21.2%

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

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

      \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg27.1%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. associate-*r*27.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(-\color{blue}{\left(\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      3. distribute-lft-neg-in27.2%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\left(-\sqrt{2} \cdot a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
    7. Simplified27.2%

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

    if 2.6e8 < b < 8.5999999999999995e64

    1. Initial program 0.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. Taylor expanded in angle around 0 17.7%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. add-log-exp51.6%

        \[\leadsto 0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \color{blue}{\log \left(e^{b \cdot \sqrt{8}}\right)}\right)\right) \]
    4. Applied egg-rr51.6%

      \[\leadsto 0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \color{blue}{\log \left(e^{b \cdot \sqrt{8}}\right)}\right)\right) \]

    if 8.5999999999999995e64 < b

    1. Initial program 4.0%

      \[\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. Taylor expanded in b around -inf 22.3%

      \[\leadsto \color{blue}{-0.25 \cdot \left(\left(y-scale \cdot \left(x-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\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}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*22.3%

        \[\leadsto \color{blue}{\left(-0.25 \cdot \left(y-scale \cdot \left(x-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\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}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}} \]
      2. associate-*r*22.3%

        \[\leadsto \left(-0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\left(x-scale \cdot b\right) \cdot \sqrt{8}\right)}\right)\right) \cdot \sqrt{\sqrt{4 \cdot \frac{{\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}}{{x-scale}^{2} \cdot {y-scale}^{2}} + {\left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2}} + \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)} \]
    4. Simplified22.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.5 \cdot 10^{+29}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\ \mathbf{elif}\;b \leq 260000000:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a \cdot \left(-\sqrt{2}\right)\right)\right)\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{+64}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \log \left(e^{\sqrt{8} \cdot b}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.25 \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot \left(x-scale \cdot b\right)\right)\right)\right) \cdot \frac{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sqrt{2}}{x-scale}\\ \end{array} \]

Alternative 12: 22.4% accurate, 9.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{8} \cdot b\\ \mathbf{if}\;x-scale \leq -2.1 \cdot 10^{+93}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \log \left(e^{t_0}\right)\right)\right)\\ \mathbf{elif}\;x-scale \leq -1.1 \cdot 10^{-259}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot t_0\right)\right)\\ \mathbf{elif}\;x-scale \leq 1600000000:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a \cdot \sqrt{2}\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* (sqrt 8.0) b)))
   (if (<= x-scale -2.1e+93)
     (* 0.25 (* (sqrt 2.0) (* y-scale (log (exp t_0)))))
     (if (<= x-scale -1.1e-259)
       (* 0.25 (* y-scale (* (sqrt 2.0) t_0)))
       (if (<= x-scale 1600000000.0)
         (* (* 0.25 (* y-scale (sqrt 8.0))) (* (sqrt 2.0) (- b)))
         (* (* 0.25 (* x-scale (sqrt 8.0))) (* a (sqrt 2.0))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = sqrt(8.0) * b;
	double tmp;
	if (x_45_scale <= -2.1e+93) {
		tmp = 0.25 * (sqrt(2.0) * (y_45_scale * log(exp(t_0))));
	} else if (x_45_scale <= -1.1e-259) {
		tmp = 0.25 * (y_45_scale * (sqrt(2.0) * t_0));
	} else if (x_45_scale <= 1600000000.0) {
		tmp = (0.25 * (y_45_scale * sqrt(8.0))) * (sqrt(2.0) * -b);
	} else {
		tmp = (0.25 * (x_45_scale * sqrt(8.0))) * (a * sqrt(2.0));
	}
	return tmp;
}
real(8) function code(a, b, angle, x_45scale, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale
    real(8), intent (in) :: y_45scale
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sqrt(8.0d0) * b
    if (x_45scale <= (-2.1d+93)) then
        tmp = 0.25d0 * (sqrt(2.0d0) * (y_45scale * log(exp(t_0))))
    else if (x_45scale <= (-1.1d-259)) then
        tmp = 0.25d0 * (y_45scale * (sqrt(2.0d0) * t_0))
    else if (x_45scale <= 1600000000.0d0) then
        tmp = (0.25d0 * (y_45scale * sqrt(8.0d0))) * (sqrt(2.0d0) * -b)
    else
        tmp = (0.25d0 * (x_45scale * sqrt(8.0d0))) * (a * sqrt(2.0d0))
    end if
    code = tmp
end function
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = Math.sqrt(8.0) * b;
	double tmp;
	if (x_45_scale <= -2.1e+93) {
		tmp = 0.25 * (Math.sqrt(2.0) * (y_45_scale * Math.log(Math.exp(t_0))));
	} else if (x_45_scale <= -1.1e-259) {
		tmp = 0.25 * (y_45_scale * (Math.sqrt(2.0) * t_0));
	} else if (x_45_scale <= 1600000000.0) {
		tmp = (0.25 * (y_45_scale * Math.sqrt(8.0))) * (Math.sqrt(2.0) * -b);
	} else {
		tmp = (0.25 * (x_45_scale * Math.sqrt(8.0))) * (a * Math.sqrt(2.0));
	}
	return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = math.sqrt(8.0) * b
	tmp = 0
	if x_45_scale <= -2.1e+93:
		tmp = 0.25 * (math.sqrt(2.0) * (y_45_scale * math.log(math.exp(t_0))))
	elif x_45_scale <= -1.1e-259:
		tmp = 0.25 * (y_45_scale * (math.sqrt(2.0) * t_0))
	elif x_45_scale <= 1600000000.0:
		tmp = (0.25 * (y_45_scale * math.sqrt(8.0))) * (math.sqrt(2.0) * -b)
	else:
		tmp = (0.25 * (x_45_scale * math.sqrt(8.0))) * (a * math.sqrt(2.0))
	return tmp
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(sqrt(8.0) * b)
	tmp = 0.0
	if (x_45_scale <= -2.1e+93)
		tmp = Float64(0.25 * Float64(sqrt(2.0) * Float64(y_45_scale * log(exp(t_0)))));
	elseif (x_45_scale <= -1.1e-259)
		tmp = Float64(0.25 * Float64(y_45_scale * Float64(sqrt(2.0) * t_0)));
	elseif (x_45_scale <= 1600000000.0)
		tmp = Float64(Float64(0.25 * Float64(y_45_scale * sqrt(8.0))) * Float64(sqrt(2.0) * Float64(-b)));
	else
		tmp = Float64(Float64(0.25 * Float64(x_45_scale * sqrt(8.0))) * Float64(a * sqrt(2.0)));
	end
	return tmp
end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = sqrt(8.0) * b;
	tmp = 0.0;
	if (x_45_scale <= -2.1e+93)
		tmp = 0.25 * (sqrt(2.0) * (y_45_scale * log(exp(t_0))));
	elseif (x_45_scale <= -1.1e-259)
		tmp = 0.25 * (y_45_scale * (sqrt(2.0) * t_0));
	elseif (x_45_scale <= 1600000000.0)
		tmp = (0.25 * (y_45_scale * sqrt(8.0))) * (sqrt(2.0) * -b);
	else
		tmp = (0.25 * (x_45_scale * sqrt(8.0))) * (a * sqrt(2.0));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[Sqrt[8.0], $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[x$45$scale, -2.1e+93], N[(0.25 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(y$45$scale * N[Log[N[Exp[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, -1.1e-259], N[(0.25 * N[(y$45$scale * N[(N[Sqrt[2.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, 1600000000.0], N[(N[(0.25 * N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * (-b)), $MachinePrecision]), $MachinePrecision], N[(N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{8} \cdot b\\
\mathbf{if}\;x-scale \leq -2.1 \cdot 10^{+93}:\\
\;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \log \left(e^{t_0}\right)\right)\right)\\

\mathbf{elif}\;x-scale \leq -1.1 \cdot 10^{-259}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot t_0\right)\right)\\

\mathbf{elif}\;x-scale \leq 1600000000:\\
\;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a \cdot \sqrt{2}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x-scale < -2.0999999999999998e93

    1. Initial program 1.3%

      \[\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. Taylor expanded in angle around 0 5.6%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. add-log-exp28.3%

        \[\leadsto 0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \color{blue}{\log \left(e^{b \cdot \sqrt{8}}\right)}\right)\right) \]
    4. Applied egg-rr28.3%

      \[\leadsto 0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \color{blue}{\log \left(e^{b \cdot \sqrt{8}}\right)}\right)\right) \]

    if -2.0999999999999998e93 < x-scale < -1.10000000000000005e-259

    1. Initial program 1.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. Taylor expanded in angle around 0 24.3%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*24.3%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*24.2%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified24.2%

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

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

    if -1.10000000000000005e-259 < x-scale < 1.6e9

    1. Initial program 2.6%

      \[\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. Taylor expanded in x-scale around 0 20.1%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*20.1%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out20.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative20.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified22.5%

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

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot b\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg22.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot b\right)} \]
      2. distribute-rgt-neg-in22.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-b\right)\right)} \]
    8. Simplified22.7%

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

    if 1.6e9 < 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. Taylor expanded in y-scale around 0 53.6%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out53.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def53.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified53.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq -2.1 \cdot 10^{+93}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \log \left(e^{\sqrt{8} \cdot b}\right)\right)\right)\\ \mathbf{elif}\;x-scale \leq -1.1 \cdot 10^{-259}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(\sqrt{8} \cdot b\right)\right)\right)\\ \mathbf{elif}\;x-scale \leq 1600000000:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a \cdot \sqrt{2}\right)\\ \end{array} \]

Alternative 13: 23.7% accurate, 17.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a \cdot \sqrt{2}\right)\\ \mathbf{if}\;x-scale \leq -5.3 \cdot 10^{+54}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x-scale \leq -1.5 \cdot 10^{-260}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(\sqrt{8} \cdot b\right)\right)\right)\\ \mathbf{elif}\;x-scale \leq 1500000000:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (* (* 0.25 (* x-scale (sqrt 8.0))) (* a (sqrt 2.0)))))
   (if (<= x-scale -5.3e+54)
     t_0
     (if (<= x-scale -1.5e-260)
       (* 0.25 (* y-scale (* (sqrt 2.0) (* (sqrt 8.0) b))))
       (if (<= x-scale 1500000000.0)
         (* (* 0.25 (* y-scale (sqrt 8.0))) (* (sqrt 2.0) (- b)))
         t_0)))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = (0.25 * (x_45_scale * sqrt(8.0))) * (a * sqrt(2.0));
	double tmp;
	if (x_45_scale <= -5.3e+54) {
		tmp = t_0;
	} else if (x_45_scale <= -1.5e-260) {
		tmp = 0.25 * (y_45_scale * (sqrt(2.0) * (sqrt(8.0) * b)));
	} else if (x_45_scale <= 1500000000.0) {
		tmp = (0.25 * (y_45_scale * sqrt(8.0))) * (sqrt(2.0) * -b);
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(a, b, angle, x_45scale, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale
    real(8), intent (in) :: y_45scale
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (0.25d0 * (x_45scale * sqrt(8.0d0))) * (a * sqrt(2.0d0))
    if (x_45scale <= (-5.3d+54)) then
        tmp = t_0
    else if (x_45scale <= (-1.5d-260)) then
        tmp = 0.25d0 * (y_45scale * (sqrt(2.0d0) * (sqrt(8.0d0) * b)))
    else if (x_45scale <= 1500000000.0d0) then
        tmp = (0.25d0 * (y_45scale * sqrt(8.0d0))) * (sqrt(2.0d0) * -b)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = (0.25 * (x_45_scale * Math.sqrt(8.0))) * (a * Math.sqrt(2.0));
	double tmp;
	if (x_45_scale <= -5.3e+54) {
		tmp = t_0;
	} else if (x_45_scale <= -1.5e-260) {
		tmp = 0.25 * (y_45_scale * (Math.sqrt(2.0) * (Math.sqrt(8.0) * b)));
	} else if (x_45_scale <= 1500000000.0) {
		tmp = (0.25 * (y_45_scale * Math.sqrt(8.0))) * (Math.sqrt(2.0) * -b);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = (0.25 * (x_45_scale * math.sqrt(8.0))) * (a * math.sqrt(2.0))
	tmp = 0
	if x_45_scale <= -5.3e+54:
		tmp = t_0
	elif x_45_scale <= -1.5e-260:
		tmp = 0.25 * (y_45_scale * (math.sqrt(2.0) * (math.sqrt(8.0) * b)))
	elif x_45_scale <= 1500000000.0:
		tmp = (0.25 * (y_45_scale * math.sqrt(8.0))) * (math.sqrt(2.0) * -b)
	else:
		tmp = t_0
	return tmp
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(Float64(0.25 * Float64(x_45_scale * sqrt(8.0))) * Float64(a * sqrt(2.0)))
	tmp = 0.0
	if (x_45_scale <= -5.3e+54)
		tmp = t_0;
	elseif (x_45_scale <= -1.5e-260)
		tmp = Float64(0.25 * Float64(y_45_scale * Float64(sqrt(2.0) * Float64(sqrt(8.0) * b))));
	elseif (x_45_scale <= 1500000000.0)
		tmp = Float64(Float64(0.25 * Float64(y_45_scale * sqrt(8.0))) * Float64(sqrt(2.0) * Float64(-b)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = (0.25 * (x_45_scale * sqrt(8.0))) * (a * sqrt(2.0));
	tmp = 0.0;
	if (x_45_scale <= -5.3e+54)
		tmp = t_0;
	elseif (x_45_scale <= -1.5e-260)
		tmp = 0.25 * (y_45_scale * (sqrt(2.0) * (sqrt(8.0) * b)));
	elseif (x_45_scale <= 1500000000.0)
		tmp = (0.25 * (y_45_scale * sqrt(8.0))) * (sqrt(2.0) * -b);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$45$scale, -5.3e+54], t$95$0, If[LessEqual[x$45$scale, -1.5e-260], N[(0.25 * N[(y$45$scale * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[8.0], $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, 1500000000.0], N[(N[(0.25 * N[(y$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * (-b)), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a \cdot \sqrt{2}\right)\\
\mathbf{if}\;x-scale \leq -5.3 \cdot 10^{+54}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x-scale \leq -1.5 \cdot 10^{-260}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(\sqrt{8} \cdot b\right)\right)\right)\\

\mathbf{elif}\;x-scale \leq 1500000000:\\
\;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x-scale < -5.30000000000000018e54 or 1.5e9 < x-scale

    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. Taylor expanded in y-scale around 0 22.4%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out22.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def22.4%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified22.5%

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

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

    if -5.30000000000000018e54 < x-scale < -1.5e-260

    1. Initial program 1.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. Taylor expanded in angle around 0 26.6%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*26.6%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*26.5%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified26.5%

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

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

    if -1.5e-260 < x-scale < 1.5e9

    1. Initial program 2.6%

      \[\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. Taylor expanded in x-scale around 0 20.1%

      \[\leadsto \color{blue}{0.25 \cdot \left(\left(y-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*20.1%

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      2. distribute-lft-out20.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot {b}^{2}\right)}} \]
      3. *-commutative20.1%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \color{blue}{{b}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)} \]
    4. Simplified22.5%

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

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

      \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-1 \cdot \left(\sqrt{2} \cdot b\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg22.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(-\sqrt{2} \cdot b\right)} \]
      2. distribute-rgt-neg-in22.7%

        \[\leadsto \left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \color{blue}{\left(\sqrt{2} \cdot \left(-b\right)\right)} \]
    8. Simplified22.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x-scale \leq -5.3 \cdot 10^{+54}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a \cdot \sqrt{2}\right)\\ \mathbf{elif}\;x-scale \leq -1.5 \cdot 10^{-260}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(\sqrt{8} \cdot b\right)\right)\right)\\ \mathbf{elif}\;x-scale \leq 1500000000:\\ \;\;\;\;\left(0.25 \cdot \left(y-scale \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a \cdot \sqrt{2}\right)\\ \end{array} \]

Alternative 14: 28.9% accurate, 17.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y-scale \leq -1.92 \cdot 10^{-36}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot b\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 1.65 \cdot 10^{-224}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a \cdot \sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (if (<= y-scale -1.92e-36)
   (* 0.25 (* (sqrt 2.0) (* y-scale (* (sqrt 8.0) b))))
   (if (<= y-scale 1.65e-224)
     (* (* 0.25 (* x-scale (sqrt 8.0))) (* a (sqrt 2.0)))
     (* 0.25 (* y-scale (sqrt (* 2.0 (* b (* 8.0 b)))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double tmp;
	if (y_45_scale <= -1.92e-36) {
		tmp = 0.25 * (sqrt(2.0) * (y_45_scale * (sqrt(8.0) * b)));
	} else if (y_45_scale <= 1.65e-224) {
		tmp = (0.25 * (x_45_scale * sqrt(8.0))) * (a * sqrt(2.0));
	} else {
		tmp = 0.25 * (y_45_scale * sqrt((2.0 * (b * (8.0 * b)))));
	}
	return tmp;
}
real(8) function code(a, b, angle, x_45scale, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale
    real(8), intent (in) :: y_45scale
    real(8) :: tmp
    if (y_45scale <= (-1.92d-36)) then
        tmp = 0.25d0 * (sqrt(2.0d0) * (y_45scale * (sqrt(8.0d0) * b)))
    else if (y_45scale <= 1.65d-224) then
        tmp = (0.25d0 * (x_45scale * sqrt(8.0d0))) * (a * sqrt(2.0d0))
    else
        tmp = 0.25d0 * (y_45scale * sqrt((2.0d0 * (b * (8.0d0 * b)))))
    end if
    code = tmp
end function
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double tmp;
	if (y_45_scale <= -1.92e-36) {
		tmp = 0.25 * (Math.sqrt(2.0) * (y_45_scale * (Math.sqrt(8.0) * b)));
	} else if (y_45_scale <= 1.65e-224) {
		tmp = (0.25 * (x_45_scale * Math.sqrt(8.0))) * (a * Math.sqrt(2.0));
	} else {
		tmp = 0.25 * (y_45_scale * Math.sqrt((2.0 * (b * (8.0 * b)))));
	}
	return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale):
	tmp = 0
	if y_45_scale <= -1.92e-36:
		tmp = 0.25 * (math.sqrt(2.0) * (y_45_scale * (math.sqrt(8.0) * b)))
	elif y_45_scale <= 1.65e-224:
		tmp = (0.25 * (x_45_scale * math.sqrt(8.0))) * (a * math.sqrt(2.0))
	else:
		tmp = 0.25 * (y_45_scale * math.sqrt((2.0 * (b * (8.0 * b)))))
	return tmp
function code(a, b, angle, x_45_scale, y_45_scale)
	tmp = 0.0
	if (y_45_scale <= -1.92e-36)
		tmp = Float64(0.25 * Float64(sqrt(2.0) * Float64(y_45_scale * Float64(sqrt(8.0) * b))));
	elseif (y_45_scale <= 1.65e-224)
		tmp = Float64(Float64(0.25 * Float64(x_45_scale * sqrt(8.0))) * Float64(a * sqrt(2.0)));
	else
		tmp = Float64(0.25 * Float64(y_45_scale * sqrt(Float64(2.0 * Float64(b * Float64(8.0 * b))))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale)
	tmp = 0.0;
	if (y_45_scale <= -1.92e-36)
		tmp = 0.25 * (sqrt(2.0) * (y_45_scale * (sqrt(8.0) * b)));
	elseif (y_45_scale <= 1.65e-224)
		tmp = (0.25 * (x_45_scale * sqrt(8.0))) * (a * sqrt(2.0));
	else
		tmp = 0.25 * (y_45_scale * sqrt((2.0 * (b * (8.0 * b)))));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[y$45$scale, -1.92e-36], N[(0.25 * N[(N[Sqrt[2.0], $MachinePrecision] * N[(y$45$scale * N[(N[Sqrt[8.0], $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$45$scale, 1.65e-224], N[(N[(0.25 * N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(y$45$scale * N[Sqrt[N[(2.0 * N[(b * N[(8.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y-scale \leq -1.92 \cdot 10^{-36}:\\
\;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot b\right)\right)\right)\\

\mathbf{elif}\;y-scale \leq 1.65 \cdot 10^{-224}:\\
\;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a \cdot \sqrt{2}\right)\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y-scale < -1.91999999999999993e-36

    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. Taylor expanded in angle around 0 20.0%

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

    if -1.91999999999999993e-36 < y-scale < 1.6500000000000001e-224

    1. Initial program 2.0%

      \[\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. Taylor expanded in y-scale around 0 18.6%

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

        \[\leadsto \color{blue}{\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right) + 2 \cdot \left({b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      2. distribute-lft-out18.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{\color{blue}{2 \cdot \left({a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
      3. fma-def18.6%

        \[\leadsto \left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}, {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}} \]
    4. Simplified18.6%

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

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

    if 1.6500000000000001e-224 < y-scale

    1. Initial program 1.9%

      \[\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. Taylor expanded in angle around 0 16.4%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*16.4%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*16.4%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified16.4%

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

      \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt15.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
      2. sqrt-unprod34.4%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
      3. swap-sqr34.4%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
      4. add-sqr-sqrt34.5%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{2} \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}\right) \]
      5. swap-sqr34.3%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \left(\sqrt{8} \cdot \sqrt{8}\right)\right)}}\right) \]
      6. add-sqr-sqrt34.5%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(\left(b \cdot b\right) \cdot \color{blue}{8}\right)}\right) \]
    7. Applied egg-rr34.5%

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

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(b \cdot \left(b \cdot 8\right)\right)}}\right) \]
    9. Simplified34.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -1.92 \cdot 10^{-36}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(\sqrt{8} \cdot b\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 1.65 \cdot 10^{-224}:\\ \;\;\;\;\left(0.25 \cdot \left(x-scale \cdot \sqrt{8}\right)\right) \cdot \left(a \cdot \sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right)\\ \end{array} \]

Alternative 15: 25.4% accurate, 17.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y-scale \leq -8.2 \cdot 10^{-299}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \left(b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (if (<= y-scale -8.2e-299)
   (* 0.25 (* y-scale (* b (* (sqrt 8.0) (sqrt 2.0)))))
   (* 0.25 (* y-scale (sqrt (* 2.0 (* b (* 8.0 b))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double tmp;
	if (y_45_scale <= -8.2e-299) {
		tmp = 0.25 * (y_45_scale * (b * (sqrt(8.0) * sqrt(2.0))));
	} else {
		tmp = 0.25 * (y_45_scale * sqrt((2.0 * (b * (8.0 * b)))));
	}
	return tmp;
}
real(8) function code(a, b, angle, x_45scale, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale
    real(8), intent (in) :: y_45scale
    real(8) :: tmp
    if (y_45scale <= (-8.2d-299)) then
        tmp = 0.25d0 * (y_45scale * (b * (sqrt(8.0d0) * sqrt(2.0d0))))
    else
        tmp = 0.25d0 * (y_45scale * sqrt((2.0d0 * (b * (8.0d0 * b)))))
    end if
    code = tmp
end function
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double tmp;
	if (y_45_scale <= -8.2e-299) {
		tmp = 0.25 * (y_45_scale * (b * (Math.sqrt(8.0) * Math.sqrt(2.0))));
	} else {
		tmp = 0.25 * (y_45_scale * Math.sqrt((2.0 * (b * (8.0 * b)))));
	}
	return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale):
	tmp = 0
	if y_45_scale <= -8.2e-299:
		tmp = 0.25 * (y_45_scale * (b * (math.sqrt(8.0) * math.sqrt(2.0))))
	else:
		tmp = 0.25 * (y_45_scale * math.sqrt((2.0 * (b * (8.0 * b)))))
	return tmp
function code(a, b, angle, x_45_scale, y_45_scale)
	tmp = 0.0
	if (y_45_scale <= -8.2e-299)
		tmp = Float64(0.25 * Float64(y_45_scale * Float64(b * Float64(sqrt(8.0) * sqrt(2.0)))));
	else
		tmp = Float64(0.25 * Float64(y_45_scale * sqrt(Float64(2.0 * Float64(b * Float64(8.0 * b))))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale)
	tmp = 0.0;
	if (y_45_scale <= -8.2e-299)
		tmp = 0.25 * (y_45_scale * (b * (sqrt(8.0) * sqrt(2.0))));
	else
		tmp = 0.25 * (y_45_scale * sqrt((2.0 * (b * (8.0 * b)))));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[y$45$scale, -8.2e-299], N[(0.25 * N[(y$45$scale * N[(b * N[(N[Sqrt[8.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(y$45$scale * N[Sqrt[N[(2.0 * N[(b * N[(8.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y-scale \leq -8.2 \cdot 10^{-299}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \left(b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y-scale < -8.2000000000000002e-299

    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. Taylor expanded in angle around 0 13.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*13.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*13.9%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified13.9%

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

      \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. expm1-log1p-u3.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)}\right) \]
      2. expm1-udef2.0%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)} - 1\right)}\right) \]
      3. *-commutative2.0%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{\left(b \cdot \sqrt{8}\right) \cdot \sqrt{2}}\right)} - 1\right)\right) \]
      4. associate-*l*2.0%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)}\right)} - 1\right)\right) \]
    7. Applied egg-rr2.0%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)} - 1\right)}\right) \]
    8. Step-by-step derivation
      1. expm1-def3.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\right)}\right) \]
      2. expm1-log1p13.9%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)}\right) \]
      3. *-commutative13.9%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \left(b \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{8}\right)}\right)\right) \]
    9. Simplified13.9%

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

    if -8.2000000000000002e-299 < y-scale

    1. Initial program 1.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. Taylor expanded in angle around 0 14.4%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*14.4%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*14.4%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified14.4%

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

      \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt13.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
      2. sqrt-unprod31.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
      3. swap-sqr31.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
      4. add-sqr-sqrt31.3%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{2} \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}\right) \]
      5. swap-sqr31.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \left(\sqrt{8} \cdot \sqrt{8}\right)\right)}}\right) \]
      6. add-sqr-sqrt31.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(\left(b \cdot b\right) \cdot \color{blue}{8}\right)}\right) \]
    7. Applied egg-rr31.2%

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

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(b \cdot \left(b \cdot 8\right)\right)}}\right) \]
    9. Simplified31.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -8.2 \cdot 10^{-299}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \left(b \cdot \left(\sqrt{8} \cdot \sqrt{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right)\\ \end{array} \]

Alternative 16: 25.4% accurate, 17.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y-scale \leq -8.2 \cdot 10^{-299}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(\sqrt{8} \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right)\\ \end{array} \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (if (<= y-scale -8.2e-299)
   (* 0.25 (* y-scale (* (sqrt 2.0) (* (sqrt 8.0) b))))
   (* 0.25 (* y-scale (sqrt (* 2.0 (* b (* 8.0 b))))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double tmp;
	if (y_45_scale <= -8.2e-299) {
		tmp = 0.25 * (y_45_scale * (sqrt(2.0) * (sqrt(8.0) * b)));
	} else {
		tmp = 0.25 * (y_45_scale * sqrt((2.0 * (b * (8.0 * b)))));
	}
	return tmp;
}
real(8) function code(a, b, angle, x_45scale, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale
    real(8), intent (in) :: y_45scale
    real(8) :: tmp
    if (y_45scale <= (-8.2d-299)) then
        tmp = 0.25d0 * (y_45scale * (sqrt(2.0d0) * (sqrt(8.0d0) * b)))
    else
        tmp = 0.25d0 * (y_45scale * sqrt((2.0d0 * (b * (8.0d0 * b)))))
    end if
    code = tmp
end function
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double tmp;
	if (y_45_scale <= -8.2e-299) {
		tmp = 0.25 * (y_45_scale * (Math.sqrt(2.0) * (Math.sqrt(8.0) * b)));
	} else {
		tmp = 0.25 * (y_45_scale * Math.sqrt((2.0 * (b * (8.0 * b)))));
	}
	return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale):
	tmp = 0
	if y_45_scale <= -8.2e-299:
		tmp = 0.25 * (y_45_scale * (math.sqrt(2.0) * (math.sqrt(8.0) * b)))
	else:
		tmp = 0.25 * (y_45_scale * math.sqrt((2.0 * (b * (8.0 * b)))))
	return tmp
function code(a, b, angle, x_45_scale, y_45_scale)
	tmp = 0.0
	if (y_45_scale <= -8.2e-299)
		tmp = Float64(0.25 * Float64(y_45_scale * Float64(sqrt(2.0) * Float64(sqrt(8.0) * b))));
	else
		tmp = Float64(0.25 * Float64(y_45_scale * sqrt(Float64(2.0 * Float64(b * Float64(8.0 * b))))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale)
	tmp = 0.0;
	if (y_45_scale <= -8.2e-299)
		tmp = 0.25 * (y_45_scale * (sqrt(2.0) * (sqrt(8.0) * b)));
	else
		tmp = 0.25 * (y_45_scale * sqrt((2.0 * (b * (8.0 * b)))));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := If[LessEqual[y$45$scale, -8.2e-299], N[(0.25 * N[(y$45$scale * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[8.0], $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(y$45$scale * N[Sqrt[N[(2.0 * N[(b * N[(8.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y-scale \leq -8.2 \cdot 10^{-299}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(\sqrt{8} \cdot b\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y-scale < -8.2000000000000002e-299

    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. Taylor expanded in angle around 0 13.9%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*13.9%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*13.9%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified13.9%

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

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

    if -8.2000000000000002e-299 < y-scale

    1. Initial program 1.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. Taylor expanded in angle around 0 14.4%

      \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*14.4%

        \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
      2. associate-*r*14.4%

        \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
    4. Simplified14.4%

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

      \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt13.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
      2. sqrt-unprod31.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
      3. swap-sqr31.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
      4. add-sqr-sqrt31.3%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{2} \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}\right) \]
      5. swap-sqr31.1%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \left(\sqrt{8} \cdot \sqrt{8}\right)\right)}}\right) \]
      6. add-sqr-sqrt31.2%

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(\left(b \cdot b\right) \cdot \color{blue}{8}\right)}\right) \]
    7. Applied egg-rr31.2%

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

        \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(b \cdot \left(b \cdot 8\right)\right)}}\right) \]
    9. Simplified31.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -8.2 \cdot 10^{-299}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(\sqrt{8} \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right)\\ \end{array} \]

Alternative 17: 17.7% accurate, 33.8× speedup?

\[\begin{array}{l} \\ 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right) \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (* 0.25 (* y-scale (sqrt (* 2.0 (* b (* 8.0 b)))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	return 0.25 * (y_45_scale * sqrt((2.0 * (b * (8.0 * b)))));
}
real(8) function code(a, b, angle, x_45scale, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale
    real(8), intent (in) :: y_45scale
    code = 0.25d0 * (y_45scale * sqrt((2.0d0 * (b * (8.0d0 * b)))))
end function
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	return 0.25 * (y_45_scale * Math.sqrt((2.0 * (b * (8.0 * b)))));
}
def code(a, b, angle, x_45_scale, y_45_scale):
	return 0.25 * (y_45_scale * math.sqrt((2.0 * (b * (8.0 * b)))))
function code(a, b, angle, x_45_scale, y_45_scale)
	return Float64(0.25 * Float64(y_45_scale * sqrt(Float64(2.0 * Float64(b * Float64(8.0 * b))))))
end
function tmp = code(a, b, angle, x_45_scale, y_45_scale)
	tmp = 0.25 * (y_45_scale * sqrt((2.0 * (b * (8.0 * b)))));
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(0.25 * N[(y$45$scale * N[Sqrt[N[(2.0 * N[(b * N[(8.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right)
\end{array}
Derivation
  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. Taylor expanded in angle around 0 14.1%

    \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
  3. Step-by-step derivation
    1. associate-*r*14.1%

      \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
    2. associate-*r*14.1%

      \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
  4. Simplified14.1%

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

    \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
  6. Step-by-step derivation
    1. add-sqr-sqrt7.3%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
    2. sqrt-unprod17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
    3. swap-sqr17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
    4. add-sqr-sqrt17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{2} \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}\right) \]
    5. swap-sqr17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \left(\sqrt{8} \cdot \sqrt{8}\right)\right)}}\right) \]
    6. add-sqr-sqrt17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(\left(b \cdot b\right) \cdot \color{blue}{8}\right)}\right) \]
  7. Applied egg-rr17.1%

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

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(b \cdot \left(b \cdot 8\right)\right)}}\right) \]
  9. Simplified17.1%

    \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{2 \cdot \left(b \cdot \left(b \cdot 8\right)\right)}}\right) \]
  10. Final simplification17.1%

    \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(b \cdot \left(8 \cdot b\right)\right)}\right) \]

Alternative 18: 17.7% accurate, 34.4× speedup?

\[\begin{array}{l} \\ 0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right) \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (* 0.25 (* y-scale (sqrt (* (* b b) 16.0)))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	return 0.25 * (y_45_scale * sqrt(((b * b) * 16.0)));
}
real(8) function code(a, b, angle, x_45scale, y_45scale)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle
    real(8), intent (in) :: x_45scale
    real(8), intent (in) :: y_45scale
    code = 0.25d0 * (y_45scale * sqrt(((b * b) * 16.0d0)))
end function
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	return 0.25 * (y_45_scale * Math.sqrt(((b * b) * 16.0)));
}
def code(a, b, angle, x_45_scale, y_45_scale):
	return 0.25 * (y_45_scale * math.sqrt(((b * b) * 16.0)))
function code(a, b, angle, x_45_scale, y_45_scale)
	return Float64(0.25 * Float64(y_45_scale * sqrt(Float64(Float64(b * b) * 16.0))))
end
function tmp = code(a, b, angle, x_45_scale, y_45_scale)
	tmp = 0.25 * (y_45_scale * sqrt(((b * b) * 16.0)));
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(0.25 * N[(y$45$scale * N[Sqrt[N[(N[(b * b), $MachinePrecision] * 16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)
\end{array}
Derivation
  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. Taylor expanded in angle around 0 14.1%

    \[\leadsto \color{blue}{0.25 \cdot \left(\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
  3. Step-by-step derivation
    1. associate-*r*14.1%

      \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{2}\right) \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)} \]
    2. associate-*r*14.1%

      \[\leadsto \left(0.25 \cdot \sqrt{2}\right) \cdot \color{blue}{\left(\left(y-scale \cdot b\right) \cdot \sqrt{8}\right)} \]
  4. Simplified14.1%

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

    \[\leadsto \color{blue}{0.25 \cdot \left(y-scale \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)\right)} \]
  6. Step-by-step derivation
    1. add-sqr-sqrt7.3%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\left(\sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)} \cdot \sqrt{\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)}\right)}\right) \]
    2. sqrt-unprod17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right) \cdot \left(\sqrt{2} \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
    3. swap-sqr17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(\sqrt{2} \cdot \sqrt{2}\right) \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}}\right) \]
    4. add-sqr-sqrt17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{2} \cdot \left(\left(b \cdot \sqrt{8}\right) \cdot \left(b \cdot \sqrt{8}\right)\right)}\right) \]
    5. swap-sqr17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \color{blue}{\left(\left(b \cdot b\right) \cdot \left(\sqrt{8} \cdot \sqrt{8}\right)\right)}}\right) \]
    6. add-sqr-sqrt17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{2 \cdot \left(\left(b \cdot b\right) \cdot \color{blue}{8}\right)}\right) \]
  7. Applied egg-rr17.1%

    \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{2 \cdot \left(\left(b \cdot b\right) \cdot 8\right)}}\right) \]
  8. Step-by-step derivation
    1. *-commutative17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(\left(b \cdot b\right) \cdot 8\right) \cdot 2}}\right) \]
    2. unpow217.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\left(\color{blue}{{b}^{2}} \cdot 8\right) \cdot 2}\right) \]
    3. associate-*l*17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{{b}^{2} \cdot \left(8 \cdot 2\right)}}\right) \]
    4. unpow217.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\color{blue}{\left(b \cdot b\right)} \cdot \left(8 \cdot 2\right)}\right) \]
    5. metadata-eval17.1%

      \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot \color{blue}{16}}\right) \]
  9. Simplified17.1%

    \[\leadsto 0.25 \cdot \left(y-scale \cdot \color{blue}{\sqrt{\left(b \cdot b\right) \cdot 16}}\right) \]
  10. Final simplification17.1%

    \[\leadsto 0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right) \]

Reproduce

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