?

Average Accuracy: 0.6% → 30.3%
Time: 1.3min
Precision: binary64
Cost: 46344

?

\[\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 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\ t_1 := \sin t_0 \cdot b\\ t_2 := x-scale \cdot \sqrt{8}\\ \mathbf{if}\;x-scale \leq -2.3 \cdot 10^{-129}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(t_2 \cdot \mathsf{hypot}\left(t_1, a\right)\right) \cdot -0.25\right)\\ \mathbf{elif}\;x-scale \leq 3.1 \cdot 10^{-120}:\\ \;\;\;\;0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(0.25 \cdot \left(t_2 \cdot \mathsf{hypot}\left(t_1, a \cdot \cos t_0\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 (* PI (* 0.005555555555555556 angle)))
        (t_1 (* (sin t_0) b))
        (t_2 (* x-scale (sqrt 8.0))))
   (if (<= x-scale -2.3e-129)
     (* (sqrt 2.0) (* (* t_2 (hypot t_1 a)) -0.25))
     (if (<= x-scale 3.1e-120)
       (* 0.25 (fabs (* 4.0 (* b y-scale))))
       (* (sqrt 2.0) (* 0.25 (* t_2 (hypot t_1 (* a (cos 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 = ((double) M_PI) * (0.005555555555555556 * angle);
	double t_1 = sin(t_0) * b;
	double t_2 = x_45_scale * sqrt(8.0);
	double tmp;
	if (x_45_scale <= -2.3e-129) {
		tmp = sqrt(2.0) * ((t_2 * hypot(t_1, a)) * -0.25);
	} else if (x_45_scale <= 3.1e-120) {
		tmp = 0.25 * fabs((4.0 * (b * y_45_scale)));
	} else {
		tmp = sqrt(2.0) * (0.25 * (t_2 * hypot(t_1, (a * cos(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 = Math.PI * (0.005555555555555556 * angle);
	double t_1 = Math.sin(t_0) * b;
	double t_2 = x_45_scale * Math.sqrt(8.0);
	double tmp;
	if (x_45_scale <= -2.3e-129) {
		tmp = Math.sqrt(2.0) * ((t_2 * Math.hypot(t_1, a)) * -0.25);
	} else if (x_45_scale <= 3.1e-120) {
		tmp = 0.25 * Math.abs((4.0 * (b * y_45_scale)));
	} else {
		tmp = Math.sqrt(2.0) * (0.25 * (t_2 * Math.hypot(t_1, (a * Math.cos(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 = math.pi * (0.005555555555555556 * angle)
	t_1 = math.sin(t_0) * b
	t_2 = x_45_scale * math.sqrt(8.0)
	tmp = 0
	if x_45_scale <= -2.3e-129:
		tmp = math.sqrt(2.0) * ((t_2 * math.hypot(t_1, a)) * -0.25)
	elif x_45_scale <= 3.1e-120:
		tmp = 0.25 * math.fabs((4.0 * (b * y_45_scale)))
	else:
		tmp = math.sqrt(2.0) * (0.25 * (t_2 * math.hypot(t_1, (a * math.cos(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(pi * Float64(0.005555555555555556 * angle))
	t_1 = Float64(sin(t_0) * b)
	t_2 = Float64(x_45_scale * sqrt(8.0))
	tmp = 0.0
	if (x_45_scale <= -2.3e-129)
		tmp = Float64(sqrt(2.0) * Float64(Float64(t_2 * hypot(t_1, a)) * -0.25));
	elseif (x_45_scale <= 3.1e-120)
		tmp = Float64(0.25 * abs(Float64(4.0 * Float64(b * y_45_scale))));
	else
		tmp = Float64(sqrt(2.0) * Float64(0.25 * Float64(t_2 * hypot(t_1, Float64(a * cos(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 = pi * (0.005555555555555556 * angle);
	t_1 = sin(t_0) * b;
	t_2 = x_45_scale * sqrt(8.0);
	tmp = 0.0;
	if (x_45_scale <= -2.3e-129)
		tmp = sqrt(2.0) * ((t_2 * hypot(t_1, a)) * -0.25);
	elseif (x_45_scale <= 3.1e-120)
		tmp = 0.25 * abs((4.0 * (b * y_45_scale)));
	else
		tmp = sqrt(2.0) * (0.25 * (t_2 * hypot(t_1, (a * cos(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[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$45$scale, -2.3e-129], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(t$95$2 * N[Sqrt[t$95$1 ^ 2 + a ^ 2], $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$45$scale, 3.1e-120], N[(0.25 * N[Abs[N[(4.0 * N[(b * y$45$scale), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(0.25 * N[(t$95$2 * N[Sqrt[t$95$1 ^ 2 + N[(a * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2], $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 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_1 := \sin t_0 \cdot b\\
t_2 := x-scale \cdot \sqrt{8}\\
\mathbf{if}\;x-scale \leq -2.3 \cdot 10^{-129}:\\
\;\;\;\;\sqrt{2} \cdot \left(\left(t_2 \cdot \mathsf{hypot}\left(t_1, a\right)\right) \cdot -0.25\right)\\

\mathbf{elif}\;x-scale \leq 3.1 \cdot 10^{-120}:\\
\;\;\;\;0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(0.25 \cdot \left(t_2 \cdot \mathsf{hypot}\left(t_1, a \cdot \cos t_0\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 3 regimes
  2. if x-scale < -2.3e-129

    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 x-scale around inf 3.7%

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

      \[\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 \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}}{y-scale \cdot y-scale} + \frac{{\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}} \]
      Proof

      [Start]3.7

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

      associate-*r* [=>]3.7

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

      associate-*r* [=>]3.7

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

      distribute-lft-out [=>]3.7

      \[ \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{{a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}} + \frac{{b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}{{y-scale}^{2}}\right)}} \]
    4. Taylor expanded in y-scale around -inf 16.8%

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

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

      [Start]16.8

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

      *-commutative [=>]16.8

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

      associate-*l* [=>]16.8

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

      associate-*l* [=>]16.8

      \[ \color{blue}{\sqrt{2} \cdot \left(\left(\left(x-scale \cdot \sqrt{8}\right) \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) \cdot -0.25\right)} \]
    6. Taylor expanded in angle around 0 28.1%

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

    if -2.3e-129 < x-scale < 3.10000000000000019e-120

    1. Initial program 0.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 angle around 0 18.9%

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

      \[\leadsto 0.25 \cdot \color{blue}{\left(0 + \left(b \cdot y-scale\right) \cdot {16}^{0.5}\right)} \]
      Proof

      [Start]18.9

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

      add-log-exp [=>]5.6

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

      *-un-lft-identity [=>]5.6

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

      log-prod [=>]5.6

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

      metadata-eval [=>]5.6

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

      add-log-exp [<=]18.9

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

      *-commutative [=>]18.9

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

      associate-*r* [=>]18.9

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

      associate-*l* [=>]18.8

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

      *-commutative [=>]18.8

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

      pow1/2 [=>]18.8

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

      pow1/2 [=>]18.8

      \[ 0.25 \cdot \left(0 + \left(b \cdot y-scale\right) \cdot \left({8}^{0.5} \cdot \color{blue}{{2}^{0.5}}\right)\right) \]

      pow-prod-down [=>]19.1

      \[ 0.25 \cdot \left(0 + \left(b \cdot y-scale\right) \cdot \color{blue}{{\left(8 \cdot 2\right)}^{0.5}}\right) \]

      metadata-eval [=>]19.1

      \[ 0.25 \cdot \left(0 + \left(b \cdot y-scale\right) \cdot {\color{blue}{16}}^{0.5}\right) \]
    4. Simplified19.1%

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

      [Start]19.1

      \[ 0.25 \cdot \left(0 + \left(b \cdot y-scale\right) \cdot {16}^{0.5}\right) \]

      +-lft-identity [=>]19.1

      \[ 0.25 \cdot \color{blue}{\left(\left(b \cdot y-scale\right) \cdot {16}^{0.5}\right)} \]

      unpow1/2 [=>]19.1

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

      metadata-eval [=>]19.1

      \[ 0.25 \cdot \left(\left(b \cdot y-scale\right) \cdot \color{blue}{4}\right) \]
    5. Applied egg-rr15.1%

      \[\leadsto 0.25 \cdot \color{blue}{\left(\left(1 + b \cdot \left(y-scale \cdot 4\right)\right) - 1\right)} \]
      Proof

      [Start]19.1

      \[ 0.25 \cdot \left(\left(b \cdot y-scale\right) \cdot 4\right) \]

      expm1-log1p-u [=>]18.2

      \[ 0.25 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b \cdot y-scale\right) \cdot 4\right)\right)} \]

      expm1-udef [=>]14.2

      \[ 0.25 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(b \cdot y-scale\right) \cdot 4\right)} - 1\right)} \]

      log1p-udef [=>]14.2

      \[ 0.25 \cdot \left(e^{\color{blue}{\log \left(1 + \left(b \cdot y-scale\right) \cdot 4\right)}} - 1\right) \]

      add-exp-log [<=]15.1

      \[ 0.25 \cdot \left(\color{blue}{\left(1 + \left(b \cdot y-scale\right) \cdot 4\right)} - 1\right) \]

      associate-*l* [=>]15.1

      \[ 0.25 \cdot \left(\left(1 + \color{blue}{b \cdot \left(y-scale \cdot 4\right)}\right) - 1\right) \]
    6. Applied egg-rr22.1%

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

      [Start]15.1

      \[ 0.25 \cdot \left(\left(1 + b \cdot \left(y-scale \cdot 4\right)\right) - 1\right) \]

      *-rgt-identity [<=]15.1

      \[ 0.25 \cdot \left(\color{blue}{\left(1 + b \cdot \left(y-scale \cdot 4\right)\right) \cdot 1} - 1\right) \]

      add-exp-log [=>]14.2

      \[ 0.25 \cdot \left(\color{blue}{e^{\log \left(\left(1 + b \cdot \left(y-scale \cdot 4\right)\right) \cdot 1\right)}} - 1\right) \]

      *-rgt-identity [=>]14.2

      \[ 0.25 \cdot \left(e^{\log \color{blue}{\left(1 + b \cdot \left(y-scale \cdot 4\right)\right)}} - 1\right) \]

      log1p-udef [<=]14.2

      \[ 0.25 \cdot \left(e^{\color{blue}{\mathsf{log1p}\left(b \cdot \left(y-scale \cdot 4\right)\right)}} - 1\right) \]

      expm1-udef [<=]18.2

      \[ 0.25 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b \cdot \left(y-scale \cdot 4\right)\right)\right)} \]

      expm1-log1p-u [<=]19.1

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

      add-sqr-sqrt [=>]18.3

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

      sqrt-unprod [=>]22.1

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

      pow1/2 [=>]22.1

      \[ 0.25 \cdot \color{blue}{{\left(\left(b \cdot \left(y-scale \cdot 4\right)\right) \cdot \left(b \cdot \left(y-scale \cdot 4\right)\right)\right)}^{0.5}} \]

      associate-*r* [=>]22.1

      \[ 0.25 \cdot {\left(\color{blue}{\left(\left(b \cdot y-scale\right) \cdot 4\right)} \cdot \left(b \cdot \left(y-scale \cdot 4\right)\right)\right)}^{0.5} \]

      associate-*r* [=>]22.1

      \[ 0.25 \cdot {\left(\left(\left(b \cdot y-scale\right) \cdot 4\right) \cdot \color{blue}{\left(\left(b \cdot y-scale\right) \cdot 4\right)}\right)}^{0.5} \]

      swap-sqr [=>]22.1

      \[ 0.25 \cdot {\color{blue}{\left(\left(\left(b \cdot y-scale\right) \cdot \left(b \cdot y-scale\right)\right) \cdot \left(4 \cdot 4\right)\right)}}^{0.5} \]

      pow2 [=>]22.1

      \[ 0.25 \cdot {\left(\color{blue}{{\left(b \cdot y-scale\right)}^{2}} \cdot \left(4 \cdot 4\right)\right)}^{0.5} \]

      metadata-eval [=>]22.1

      \[ 0.25 \cdot {\left({\left(b \cdot y-scale\right)}^{2} \cdot \color{blue}{16}\right)}^{0.5} \]
    7. Simplified34.0%

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

      [Start]22.1

      \[ 0.25 \cdot {\left({\left(b \cdot y-scale\right)}^{2} \cdot 16\right)}^{0.5} \]

      unpow1/2 [=>]22.1

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

      unpow2 [=>]22.1

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

      metadata-eval [<=]22.1

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

      swap-sqr [<=]22.1

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

      associate-*r* [<=]22.1

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

      associate-*r* [<=]22.1

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

      rem-sqrt-square [=>]34.0

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

      *-commutative [<=]34.0

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

      *-commutative [=>]34.0

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

      associate-*r* [<=]34.0

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

    if 3.10000000000000019e-120 < 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. Taylor expanded in x-scale around inf 3.7%

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

      \[\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 \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}}{y-scale \cdot y-scale} + \frac{{\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}}{y-scale \cdot y-scale}\right)}} \]
      Proof

      [Start]3.7

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

      associate-*r* [=>]3.7

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

      associate-*r* [=>]3.7

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

      distribute-lft-out [=>]3.7

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

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

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

      [Start]16.9

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

      *-commutative [=>]16.9

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

      associate-*l* [=>]16.9

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

      associate-*l* [=>]16.9

      \[ \color{blue}{\sqrt{2} \cdot \left(\left(\left(x-scale \cdot \sqrt{8}\right) \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) \cdot 0.25\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification30.3%

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

Alternatives

Alternative 1
Accuracy25.7%
Cost39560
\[\begin{array}{l} t_0 := x-scale \cdot \sqrt{8}\\ \mathbf{if}\;x-scale \leq -5.8 \cdot 10^{-129}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(t_0 \cdot \mathsf{hypot}\left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot b, a\right)\right) \cdot -0.25\right)\\ \mathbf{elif}\;x-scale \leq 1.65 \cdot 10^{+130}:\\ \;\;\;\;0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{0.125 \cdot {\left(t_0 \cdot \mathsf{hypot}\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), a\right)\right)}^{2}}\\ \end{array} \]
Alternative 2
Accuracy24.4%
Cost33416
\[\begin{array}{l} t_0 := \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\ \mathbf{if}\;x-scale \leq -7.8 \cdot 10^{-131}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(\left(x-scale \cdot \sqrt{8}\right) \cdot \mathsf{hypot}\left(t_0 \cdot b, a\right)\right) \cdot -0.25\right)\\ \mathbf{elif}\;x-scale \leq 3.4 \cdot 10^{+41}:\\ \;\;\;\;0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|t_0 \cdot \left(\frac{\sqrt{8} \cdot \left(0.25 \cdot \left(x-scale \cdot y-scale\right)\right)}{y-scale} \cdot \left(\sqrt{2} \cdot b\right)\right)\right|\\ \end{array} \]
Alternative 3
Accuracy24.9%
Cost33092
\[\begin{array}{l} \mathbf{if}\;x-scale \leq -2.15 \cdot 10^{-128}:\\ \;\;\;\;\sqrt{2} \cdot \left(\left(\left(x-scale \cdot \sqrt{8}\right) \cdot \mathsf{hypot}\left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot b, a\right)\right) \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right|\\ \end{array} \]
Alternative 4
Accuracy23.8%
Cost26692
\[\begin{array}{l} \mathbf{if}\;x-scale \leq -1.25 \cdot 10^{-126}:\\ \;\;\;\;\sqrt{2} \cdot \left(-0.25 \cdot \left(\left(x-scale \cdot \sqrt{8}\right) \cdot \mathsf{hypot}\left(b \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right|\\ \end{array} \]
Alternative 5
Accuracy21.4%
Cost13641
\[\begin{array}{l} \mathbf{if}\;y-scale \leq -2.8 \cdot 10^{-271} \lor \neg \left(y-scale \leq 4.3 \cdot 10^{-178}\right):\\ \;\;\;\;0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right|\\ \mathbf{else}:\\ \;\;\;\;-0.25 \cdot \left(a \cdot \left(x-scale \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\\ \end{array} \]
Alternative 6
Accuracy21.3%
Cost13641
\[\begin{array}{l} \mathbf{if}\;y-scale \leq -4 \cdot 10^{-267} \lor \neg \left(y-scale \leq 2.05 \cdot 10^{-179}\right):\\ \;\;\;\;0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(a \cdot \left(\sqrt{2} \cdot \sqrt{8}\right)\right)\right)\\ \end{array} \]
Alternative 7
Accuracy21.4%
Cost13641
\[\begin{array}{l} \mathbf{if}\;y-scale \leq -2.4 \cdot 10^{-263} \lor \neg \left(y-scale \leq 10^{-180}\right):\\ \;\;\;\;0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{2} \cdot \left(\sqrt{8} \cdot a\right)\right)\right)\\ \end{array} \]
Alternative 8
Accuracy21.4%
Cost13641
\[\begin{array}{l} \mathbf{if}\;y-scale \leq -2.25 \cdot 10^{-263} \lor \neg \left(y-scale \leq 8.6 \cdot 10^{-180}\right):\\ \;\;\;\;0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\sqrt{2} \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot a\right)\right)\right)\\ \end{array} \]
Alternative 9
Accuracy20.2%
Cost6848
\[0.25 \cdot \left|4 \cdot \left(b \cdot y-scale\right)\right| \]
Alternative 10
Accuracy11.1%
Cost448
\[0.25 \cdot \left(4 \cdot \left(b \cdot y-scale\right)\right) \]

Error

Reproduce?

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