?

Average Accuracy: 0.8% → 34.2%
Time: 2.3min
Precision: binary64
Cost: 46212

?

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

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if x-scale < 3.7999999999999998e-11

    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. Simplified0.7%

      \[\leadsto \color{blue}{\frac{-\sqrt{\left(2 \cdot \left(\frac{4}{\frac{{\left(x-scale \cdot y-scale\right)}^{2}}{\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)}} \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right)\right) \cdot \left(\left(\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right) + \sqrt{{\left(\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2} + {\left(\frac{\cos \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right)\right)}{x-scale \cdot y-scale}\right)}^{2}}\right)}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)} \cdot {\left(x-scale \cdot y-scale\right)}^{2}} \]
      Proof

      [Start]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}}} \]
    3. Taylor expanded in angle around 0 16.8%

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

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

      [Start]16.8

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

      associate-*r* [=>]16.8

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

      *-commutative [=>]16.8

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

      *-commutative [=>]16.8

      \[ \left(0.25 \cdot y-scale\right) \cdot \left(\color{blue}{\left(\sqrt{8} \cdot b\right)} \cdot \sqrt{2}\right) \]
    5. Applied egg-rr30.3%

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

      [Start]16.8

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

      add-sqr-sqrt [=>]16.0

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

      sqrt-unprod [=>]18.8

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

      rem-sqrt-square [=>]30.2

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

      *-commutative [=>]30.2

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

      associate-*l* [=>]30.2

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

      associate-*l* [=>]30.3

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

    if 3.7999999999999998e-11 < x-scale

    1. Initial program 1.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. Simplified1.1%

      \[\leadsto \color{blue}{\frac{-\sqrt{\left(2 \cdot \left(\frac{4}{\frac{{\left(x-scale \cdot y-scale\right)}^{2}}{\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)}} \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right)\right) \cdot \left(\left(\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right) + \sqrt{{\left(\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2} + {\left(\frac{\cos \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right)\right)}{x-scale \cdot y-scale}\right)}^{2}}\right)}}{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)} \cdot {\left(x-scale \cdot y-scale\right)}^{2}} \]
      Proof

      [Start]1.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}}} \]
    3. Taylor expanded in y-scale around 0 30.7%

      \[\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)} \]
    4. Simplified30.8%

      \[\leadsto \color{blue}{0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \mathsf{fma}\left(b \cdot b, {\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 \left(a \cdot a\right)\right)}\right)\right)} \]
      Proof

      [Start]30.7

      \[ 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) \]

      associate-*l* [=>]30.8

      \[ 0.25 \cdot \color{blue}{\left(x-scale \cdot \left(\sqrt{8} \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)\right)} \]

      distribute-lft-out [=>]30.8

      \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \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)}}\right)\right) \]

      +-commutative [=>]30.8

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

      fma-def [=>]30.8

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

      unpow2 [=>]30.8

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

      \[\leadsto 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{{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)}\right)\right) \]
    6. Simplified48.8%

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

      [Start]30.7

      \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \sqrt{{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)\right)\right) \]

      unpow2 [=>]30.7

      \[ 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \sqrt{\color{blue}{\left(a \cdot a\right)} \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)\right)\right) \]

      unpow2 [=>]30.7

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

      swap-sqr [<=]30.7

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

      unpow2 [=>]30.7

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

      unpow2 [=>]30.7

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

      swap-sqr [<=]35.7

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

      hypot-def [=>]48.8

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

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

Alternatives

Alternative 1
Accuracy27.6%
Cost27024
\[\begin{array}{l} t_0 := x-scale \cdot \left(\sqrt{8} \cdot \left(\left(\sqrt{2} \cdot a\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\ t_1 := t_0 \cdot -0.25\\ \mathbf{if}\;y-scale \leq -1.2 \cdot 10^{-201}:\\ \;\;\;\;\left|\sqrt{8} \cdot \left(\left(b \cdot \sqrt{2}\right) \cdot \left(0.25 \cdot y-scale\right)\right)\right|\\ \mathbf{elif}\;y-scale \leq 1.32 \cdot 10^{-251}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y-scale \leq 10^{-184}:\\ \;\;\;\;0.25 \cdot t_0\\ \mathbf{elif}\;y-scale \leq 8.4 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left|\sqrt{2} \cdot \left(b \cdot \left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right)\right|\\ \end{array} \]
Alternative 2
Accuracy27.7%
Cost27024
\[\begin{array}{l} t_0 := \sqrt{2} \cdot a\\ t_1 := -0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\cos \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right) \cdot t_0\right)\right)\right)\\ \mathbf{if}\;y-scale \leq -7.5 \cdot 10^{-199}:\\ \;\;\;\;\left|\sqrt{8} \cdot \left(\left(b \cdot \sqrt{2}\right) \cdot \left(0.25 \cdot y-scale\right)\right)\right|\\ \mathbf{elif}\;y-scale \leq 7.8 \cdot 10^{-254}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y-scale \leq 8 \cdot 10^{-185}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(t_0 \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 9.8 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left|\sqrt{2} \cdot \left(b \cdot \left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right)\right|\\ \end{array} \]
Alternative 3
Accuracy27.6%
Cost27024
\[\begin{array}{l} t_0 := \sqrt{2} \cdot a\\ \mathbf{if}\;y-scale \leq -5.6 \cdot 10^{-199}:\\ \;\;\;\;\left|\sqrt{8} \cdot \left(\left(b \cdot \sqrt{2}\right) \cdot \left(0.25 \cdot y-scale\right)\right)\right|\\ \mathbf{elif}\;y-scale \leq 4.3 \cdot 10^{-252}:\\ \;\;\;\;\left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\right)\right) \cdot -0.25\\ \mathbf{elif}\;y-scale \leq 10^{-183}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(t_0 \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq 8.5 \cdot 10^{+21}:\\ \;\;\;\;-0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\cos \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right) \cdot t_0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\sqrt{2} \cdot \left(b \cdot \left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right)\right|\\ \end{array} \]
Alternative 4
Accuracy29.4%
Cost19908
\[\begin{array}{l} \mathbf{if}\;x-scale \leq 14000000000:\\ \;\;\;\;0.25 \cdot \left|\left(\sqrt{8} \cdot b\right) \cdot \left(\sqrt{2} \cdot y-scale\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \left(a \cdot a\right)}\right)\right)\\ \end{array} \]
Alternative 5
Accuracy29.4%
Cost19908
\[\begin{array}{l} \mathbf{if}\;x-scale \leq 12500000000:\\ \;\;\;\;\left|\sqrt{2} \cdot \left(b \cdot \left(0.25 \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \left(a \cdot a\right)}\right)\right)\\ \end{array} \]
Alternative 6
Accuracy29.4%
Cost19908
\[\begin{array}{l} \mathbf{if}\;x-scale \leq 8400000000:\\ \;\;\;\;\left|\sqrt{8} \cdot \left(\left(b \cdot \sqrt{2}\right) \cdot \left(0.25 \cdot y-scale\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \left(a \cdot a\right)}\right)\right)\\ \end{array} \]
Alternative 7
Accuracy17.5%
Cost13768
\[\begin{array}{l} \mathbf{if}\;y-scale \leq -8 \cdot 10^{-214}:\\ \;\;\;\;b \cdot y-scale\\ \mathbf{elif}\;y-scale \leq 1.85 \cdot 10^{+49}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \left(a \cdot a\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\ \end{array} \]
Alternative 8
Accuracy20.2%
Cost13640
\[\begin{array}{l} \mathbf{if}\;y-scale \leq -1.56 \cdot 10^{-171}:\\ \;\;\;\;b \cdot y-scale\\ \mathbf{elif}\;y-scale \leq 3.8 \cdot 10^{+48}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\ \end{array} \]
Alternative 9
Accuracy16.6%
Cost13444
\[\begin{array}{l} \mathbf{if}\;b \leq -1.35 \cdot 10^{-129}:\\ \;\;\;\;b \cdot y-scale\\ \mathbf{else}:\\ \;\;\;\;\sqrt{{\left(\left(0.25 \cdot y-scale\right) \cdot \left(b \cdot 4\right)\right)}^{2}}\\ \end{array} \]
Alternative 10
Accuracy16.7%
Cost7108
\[\begin{array}{l} \mathbf{if}\;y-scale \leq 4.6 \cdot 10^{+30}:\\ \;\;\;\;b \cdot y-scale\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(y-scale \cdot \sqrt{\left(b \cdot b\right) \cdot 16}\right)\\ \end{array} \]
Alternative 11
Accuracy15.2%
Cost388
\[\begin{array}{l} \mathbf{if}\;y-scale \leq 1.4 \cdot 10^{+119}:\\ \;\;\;\;b \cdot y-scale\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(-y-scale\right)\\ \end{array} \]
Alternative 12
Accuracy15.3%
Cost192
\[b \cdot y-scale \]

Error

Reproduce?

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