Average Error: 63.6 → 52.5
Time: 2.1min
Precision: binary64
Cost: 53064
\[\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 := {\cos \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right)}^{2}\\ t_1 := {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\\ \mathbf{if}\;b \leq -3.45 \cdot 10^{-127}:\\ \;\;\;\;\left(\left(\frac{\sqrt{8 \cdot \left(t_0 + \left|t_0\right|\right)}}{x-scale} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{elif}\;b \leq 5.1 \cdot 10^{+26}:\\ \;\;\;\;\left(\left(\left(-1 \cdot \frac{\sqrt{8 \cdot \left(t_1 + \left|t_1\right|\right)}}{x-scale}\right) \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{\frac{16}{{y-scale}^{2}}} \cdot \left({y-scale}^{2} \cdot b\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 (pow (cos (* (* 0.005555555555555556 PI) angle)) 2.0))
        (t_1 (pow (cos (* 0.005555555555555556 (* angle PI))) 2.0)))
   (if (<= b -3.45e-127)
     (*
      (* (* (/ (sqrt (* 8.0 (+ t_0 (fabs t_0)))) x-scale) x-scale) x-scale)
      (* -0.25 a))
     (if (<= b 5.1e+26)
       (*
        (*
         (* (* -1.0 (/ (sqrt (* 8.0 (+ t_1 (fabs t_1)))) x-scale)) x-scale)
         x-scale)
        (* -0.25 a))
       (*
        0.25
        (* (sqrt (/ 16.0 (pow y-scale 2.0))) (* (pow y-scale 2.0) b)))))))
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 = pow(cos(((0.005555555555555556 * ((double) M_PI)) * angle)), 2.0);
	double t_1 = pow(cos((0.005555555555555556 * (angle * ((double) M_PI)))), 2.0);
	double tmp;
	if (b <= -3.45e-127) {
		tmp = (((sqrt((8.0 * (t_0 + fabs(t_0)))) / x_45_scale) * x_45_scale) * x_45_scale) * (-0.25 * a);
	} else if (b <= 5.1e+26) {
		tmp = (((-1.0 * (sqrt((8.0 * (t_1 + fabs(t_1)))) / x_45_scale)) * x_45_scale) * x_45_scale) * (-0.25 * a);
	} else {
		tmp = 0.25 * (sqrt((16.0 / pow(y_45_scale, 2.0))) * (pow(y_45_scale, 2.0) * b));
	}
	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 = Math.pow(Math.cos(((0.005555555555555556 * Math.PI) * angle)), 2.0);
	double t_1 = Math.pow(Math.cos((0.005555555555555556 * (angle * Math.PI))), 2.0);
	double tmp;
	if (b <= -3.45e-127) {
		tmp = (((Math.sqrt((8.0 * (t_0 + Math.abs(t_0)))) / x_45_scale) * x_45_scale) * x_45_scale) * (-0.25 * a);
	} else if (b <= 5.1e+26) {
		tmp = (((-1.0 * (Math.sqrt((8.0 * (t_1 + Math.abs(t_1)))) / x_45_scale)) * x_45_scale) * x_45_scale) * (-0.25 * a);
	} else {
		tmp = 0.25 * (Math.sqrt((16.0 / Math.pow(y_45_scale, 2.0))) * (Math.pow(y_45_scale, 2.0) * b));
	}
	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 = math.pow(math.cos(((0.005555555555555556 * math.pi) * angle)), 2.0)
	t_1 = math.pow(math.cos((0.005555555555555556 * (angle * math.pi))), 2.0)
	tmp = 0
	if b <= -3.45e-127:
		tmp = (((math.sqrt((8.0 * (t_0 + math.fabs(t_0)))) / x_45_scale) * x_45_scale) * x_45_scale) * (-0.25 * a)
	elif b <= 5.1e+26:
		tmp = (((-1.0 * (math.sqrt((8.0 * (t_1 + math.fabs(t_1)))) / x_45_scale)) * x_45_scale) * x_45_scale) * (-0.25 * a)
	else:
		tmp = 0.25 * (math.sqrt((16.0 / math.pow(y_45_scale, 2.0))) * (math.pow(y_45_scale, 2.0) * b))
	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 = cos(Float64(Float64(0.005555555555555556 * pi) * angle)) ^ 2.0
	t_1 = cos(Float64(0.005555555555555556 * Float64(angle * pi))) ^ 2.0
	tmp = 0.0
	if (b <= -3.45e-127)
		tmp = Float64(Float64(Float64(Float64(sqrt(Float64(8.0 * Float64(t_0 + abs(t_0)))) / x_45_scale) * x_45_scale) * x_45_scale) * Float64(-0.25 * a));
	elseif (b <= 5.1e+26)
		tmp = Float64(Float64(Float64(Float64(-1.0 * Float64(sqrt(Float64(8.0 * Float64(t_1 + abs(t_1)))) / x_45_scale)) * x_45_scale) * x_45_scale) * Float64(-0.25 * a));
	else
		tmp = Float64(0.25 * Float64(sqrt(Float64(16.0 / (y_45_scale ^ 2.0))) * Float64((y_45_scale ^ 2.0) * b)));
	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 = cos(((0.005555555555555556 * pi) * angle)) ^ 2.0;
	t_1 = cos((0.005555555555555556 * (angle * pi))) ^ 2.0;
	tmp = 0.0;
	if (b <= -3.45e-127)
		tmp = (((sqrt((8.0 * (t_0 + abs(t_0)))) / x_45_scale) * x_45_scale) * x_45_scale) * (-0.25 * a);
	elseif (b <= 5.1e+26)
		tmp = (((-1.0 * (sqrt((8.0 * (t_1 + abs(t_1)))) / x_45_scale)) * x_45_scale) * x_45_scale) * (-0.25 * a);
	else
		tmp = 0.25 * (sqrt((16.0 / (y_45_scale ^ 2.0))) * ((y_45_scale ^ 2.0) * b));
	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[Power[N[Cos[N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[b, -3.45e-127], N[(N[(N[(N[(N[Sqrt[N[(8.0 * N[(t$95$0 + N[Abs[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / x$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision] * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.1e+26], N[(N[(N[(N[(-1.0 * N[(N[Sqrt[N[(8.0 * N[(t$95$1 + N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] * x$45$scale), $MachinePrecision] * x$45$scale), $MachinePrecision] * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(N[Sqrt[N[(16.0 / N[Power[y$45$scale, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[y$45$scale, 2.0], $MachinePrecision] * b), $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 := {\cos \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right)}^{2}\\
t_1 := {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\\
\mathbf{if}\;b \leq -3.45 \cdot 10^{-127}:\\
\;\;\;\;\left(\left(\frac{\sqrt{8 \cdot \left(t_0 + \left|t_0\right|\right)}}{x-scale} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\

\mathbf{elif}\;b \leq 5.1 \cdot 10^{+26}:\\
\;\;\;\;\left(\left(\left(-1 \cdot \frac{\sqrt{8 \cdot \left(t_1 + \left|t_1\right|\right)}}{x-scale}\right) \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(\sqrt{\frac{16}{{y-scale}^{2}}} \cdot \left({y-scale}^{2} \cdot b\right)\right)\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if b < -3.45000000000000008e-127

    1. Initial program 63.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. Simplified63.0

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{\left(-b \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(8 \cdot \left(-b \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}} \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \mathsf{hypot}\left(\frac{\frac{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right) \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)}{x-scale}}{y-scale}, \frac{\frac{{\left(a \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)\right)}}{\frac{\left(-4\right) \cdot \left(-b \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}}} \]
      Proof
    3. Taylor expanded in a around -inf 63.4

      \[\leadsto \color{blue}{-0.25 \cdot \frac{a \cdot \left(\sqrt{8 \cdot \frac{{\left({b}^{2}\right)}^{2} \cdot \left(\sqrt{{\left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2} + 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}}{{y-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)\right)}{{x-scale}^{2} \cdot {y-scale}^{2}}} \cdot \left({x-scale}^{2} \cdot {y-scale}^{2}\right)\right)}{{b}^{2}}} \]
    4. Simplified63.4

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

      \[\leadsto \color{blue}{-0.25 \cdot \left(a \cdot \left(\sqrt{8 \cdot \frac{\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{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\cos \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}}{{y-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}{{x-scale}^{2} \cdot {y-scale}^{2}}} \cdot \left({x-scale}^{2} \cdot {y-scale}^{2}\right)\right)\right)} \]
    6. Simplified62.7

      \[\leadsto \color{blue}{\left(\sqrt{\frac{8 \cdot \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} + \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{\mathsf{fma}\left(\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}}{{\left(x-scale \cdot y-scale\right)}^{2}}, 4, {\left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}\right)}\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}} \cdot {\left(x-scale \cdot y-scale\right)}^{2}\right) \cdot \left(-0.25 \cdot a\right)} \]
      Proof
    7. Taylor expanded in y-scale around 0 59.0

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

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

      \[\leadsto \left(\left(\color{blue}{\frac{\sqrt{8 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left|{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right|\right)}}{x-scale}} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right) \]
    10. Simplified56.1

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

    if -3.45000000000000008e-127 < b < 5.0999999999999997e26

    1. Initial program 63.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. Simplified63.5

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{\left(-b \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(8 \cdot \left(-b \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}} \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \mathsf{hypot}\left(\frac{\frac{\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right) \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)}{x-scale}}{y-scale}, \frac{\frac{{\left(a \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)\right)}}{\frac{\left(-4\right) \cdot \left(-b \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}}} \]
      Proof
    3. Taylor expanded in a around -inf 63.8

      \[\leadsto \color{blue}{-0.25 \cdot \frac{a \cdot \left(\sqrt{8 \cdot \frac{{\left({b}^{2}\right)}^{2} \cdot \left(\sqrt{{\left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}^{2} + 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}}{{y-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)\right)}{{x-scale}^{2} \cdot {y-scale}^{2}}} \cdot \left({x-scale}^{2} \cdot {y-scale}^{2}\right)\right)}{{b}^{2}}} \]
    4. Simplified63.8

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

      \[\leadsto \color{blue}{-0.25 \cdot \left(a \cdot \left(\sqrt{8 \cdot \frac{\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{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}} - \frac{{\cos \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}}{{y-scale}^{2}} + \frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{x-scale}^{2}}\right)}{{x-scale}^{2} \cdot {y-scale}^{2}}} \cdot \left({x-scale}^{2} \cdot {y-scale}^{2}\right)\right)\right)} \]
    6. Simplified62.2

      \[\leadsto \color{blue}{\left(\sqrt{\frac{8 \cdot \left(\frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale} + \left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} + \sqrt{\mathsf{fma}\left(\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}}{{\left(x-scale \cdot y-scale\right)}^{2}}, 4, {\left(\frac{{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{x-scale \cdot x-scale} - \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}^{2}\right)}\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}} \cdot {\left(x-scale \cdot y-scale\right)}^{2}\right) \cdot \left(-0.25 \cdot a\right)} \]
      Proof
    7. Taylor expanded in y-scale around 0 57.1

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

      \[\leadsto \color{blue}{\left(\left(\sqrt{\frac{8 \cdot \left({\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} + \left|{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right|\right)}{x-scale \cdot x-scale}} \cdot x-scale\right) \cdot x-scale\right)} \cdot \left(-0.25 \cdot a\right) \]
      Proof
    9. Taylor expanded in x-scale around -inf 50.8

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

    if 5.0999999999999997e26 < b

    1. Initial program 63.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. Simplified63.1

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

      \[\leadsto \color{blue}{0.25 \cdot \frac{\sqrt{8 \cdot \frac{{\left({b}^{2}\right)}^{2} \cdot \left(\left(\frac{{b}^{2}}{{x-scale}^{2}} + \left(\frac{{a}^{2}}{{y-scale}^{2}} + \sqrt{{\left(\frac{{b}^{2}}{{x-scale}^{2}} - \frac{{a}^{2}}{{y-scale}^{2}}\right)}^{2}}\right)\right) \cdot {\left({a}^{2}\right)}^{2}\right)}{{x-scale}^{2} \cdot {y-scale}^{2}}} \cdot \left({x-scale}^{2} \cdot {y-scale}^{2}\right)}{{b}^{2} \cdot {a}^{2}}} \]
    4. Simplified63.8

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

      \[\leadsto \color{blue}{0.25 \cdot \frac{{y-scale}^{2} \cdot \sqrt{8 \cdot \frac{{\left({b}^{2}\right)}^{2} \cdot \left({\left({a}^{2}\right)}^{2} \cdot \left({b}^{2} + \sqrt{{\left({b}^{2}\right)}^{2}}\right)\right)}{{y-scale}^{2}}}}{{b}^{2} \cdot {a}^{2}}} \]
    6. Simplified63.3

      \[\leadsto \color{blue}{0.25 \cdot \frac{\left(y-scale \cdot y-scale\right) \cdot \sqrt{8 \cdot \frac{{b}^{4} \cdot \left({a}^{4} \cdot \left(b \cdot b + \sqrt{{b}^{4}}\right)\right)}{y-scale \cdot y-scale}}}{\left(b \cdot b\right) \cdot \left(a \cdot a\right)}} \]
      Proof
    7. Taylor expanded in b around 0 60.8

      \[\leadsto 0.25 \cdot \color{blue}{\frac{\sqrt{16 \cdot \frac{{\left({a}^{2}\right)}^{2}}{{y-scale}^{2}}} \cdot \left({y-scale}^{2} \cdot b\right)}{{a}^{2}}} \]
    8. Simplified60.8

      \[\leadsto 0.25 \cdot \color{blue}{\frac{\sqrt{\frac{16 \cdot {a}^{4}}{y-scale \cdot y-scale}} \cdot \left(\left(y-scale \cdot y-scale\right) \cdot b\right)}{a \cdot a}} \]
      Proof
    9. Taylor expanded in a around 0 50.7

      \[\leadsto 0.25 \cdot \color{blue}{\left(\sqrt{\frac{16}{{y-scale}^{2}}} \cdot \left({y-scale}^{2} \cdot b\right)\right)} \]
  3. Recombined 3 regimes into one program.

Alternatives

Alternative 1
Error53.1
Cost53068
\[\begin{array}{l} t_0 := {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\\ t_1 := \left(\left(\frac{\sqrt{8 \cdot \left(t_0 + \left|t_0\right|\right)}}{x-scale} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{if}\;a \leq -8.5 \cdot 10^{-146}:\\ \;\;\;\;\left(\left(\sqrt{\frac{{\cos \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right)}^{2} \cdot \left(2 \cdot \sqrt{8}\right)}{x-scale} \cdot \frac{\sqrt{8}}{x-scale}} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{elif}\;a \leq 10^{-79}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1400:\\ \;\;\;\;0.25 \cdot \frac{y-scale \cdot \left(\sqrt{16 \cdot {\left({a}^{2}\right)}^{2}} \cdot b\right)}{a \cdot a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error53.1
Cost53068
\[\begin{array}{l} t_0 := {\cos \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right)}^{2}\\ t_1 := {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\\ \mathbf{if}\;a \leq -1.6 \cdot 10^{-142}:\\ \;\;\;\;\left(\left(\sqrt{\frac{t_0 \cdot \left(2 \cdot \sqrt{8}\right)}{x-scale} \cdot \frac{\sqrt{8}}{x-scale}} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-79}:\\ \;\;\;\;\left(\left(\frac{\sqrt{8 \cdot \left(t_1 + \left|t_1\right|\right)}}{x-scale} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{elif}\;a \leq 1800:\\ \;\;\;\;0.25 \cdot \frac{y-scale \cdot \left(\sqrt{16 \cdot {\left({a}^{2}\right)}^{2}} \cdot b\right)}{a \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\frac{\sqrt{8 \cdot \left(t_0 + \left|t_0\right|\right)}}{x-scale} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \end{array} \]
Alternative 3
Error52.5
Cost53000
\[\begin{array}{l} t_0 := {\cos \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right)}^{2}\\ t_1 := \sqrt{8 \cdot \left(t_0 + \left|t_0\right|\right)}\\ \mathbf{if}\;b \leq -8.4 \cdot 10^{-128}:\\ \;\;\;\;\left(\left(\frac{t_1}{x-scale} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{+26}:\\ \;\;\;\;\left(\left(\frac{t_1}{-x-scale} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{\frac{16}{{y-scale}^{2}}} \cdot \left({y-scale}^{2} \cdot b\right)\right)\\ \end{array} \]
Alternative 4
Error56.5
Cost33476
\[\begin{array}{l} \mathbf{if}\;a \leq 4.2 \cdot 10^{-244}:\\ \;\;\;\;\left(\left(\sqrt{\frac{8 \cdot \left(1 + \left|{\cos \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right)}^{2}\right|\right)}{x-scale \cdot x-scale}} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{\frac{16}{{y-scale}^{2}}} \cdot \left({y-scale}^{2} \cdot b\right)\right)\\ \end{array} \]
Alternative 5
Error56.4
Cost27076
\[\begin{array}{l} \mathbf{if}\;a \leq 7.5 \cdot 10^{-243}:\\ \;\;\;\;\left(\left(\sqrt{\frac{\frac{{\cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}^{2} \cdot 2}{x-scale}}{x-scale \cdot 0.125}} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{\frac{16}{{y-scale}^{2}}} \cdot \left({y-scale}^{2} \cdot b\right)\right)\\ \end{array} \]
Alternative 6
Error56.5
Cost26948
\[\begin{array}{l} \mathbf{if}\;a \leq 2 \cdot 10^{-244}:\\ \;\;\;\;\left(\left(\sqrt{\frac{{\cos \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right)}^{2} \cdot 16}{x-scale \cdot x-scale}} \cdot x-scale\right) \cdot x-scale\right) \cdot \left(-0.25 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{\frac{16}{{y-scale}^{2}}} \cdot \left({y-scale}^{2} \cdot b\right)\right)\\ \end{array} \]
Alternative 7
Error58.3
Cost20292
\[\begin{array}{l} \mathbf{if}\;b \leq -9.5 \cdot 10^{-264}:\\ \;\;\;\;0.25 \cdot \frac{y-scale \cdot \left(\sqrt{16 \cdot {\left({a}^{2}\right)}^{2}} \cdot b\right)}{a \cdot a}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{\frac{16}{{y-scale}^{2}}} \cdot \left({y-scale}^{2} \cdot b\right)\right)\\ \end{array} \]
Alternative 8
Error58.3
Cost20036
\[\begin{array}{l} \mathbf{if}\;b \leq -5.8 \cdot 10^{-264}:\\ \;\;\;\;0.25 \cdot \frac{y-scale \cdot \left(b \cdot \sqrt{16 \cdot {a}^{4}}\right)}{a \cdot a}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{\frac{16}{{y-scale}^{2}}} \cdot \left({y-scale}^{2} \cdot b\right)\right)\\ \end{array} \]
Alternative 9
Error58.1
Cost13828
\[\begin{array}{l} \mathbf{if}\;b \leq -8.5 \cdot 10^{-264}:\\ \;\;\;\;0.25 \cdot \frac{y-scale \cdot \left(b \cdot \sqrt{16 \cdot {a}^{4}}\right)}{a \cdot a}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(\sqrt{\frac{16}{y-scale \cdot y-scale}} \cdot b\right) \cdot \left(y-scale \cdot y-scale\right)\right)\\ \end{array} \]
Alternative 10
Error59.0
Cost7232
\[0.25 \cdot \left(\left(\sqrt{\frac{16}{y-scale \cdot y-scale}} \cdot b\right) \cdot \left(y-scale \cdot y-scale\right)\right) \]

Error

Reproduce

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