?

Average Accuracy: 0.9% → 33.6%
Time: 2.1min
Precision: binary64
Cost: 65732

?

\[\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 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\ t_2 := x-scale \cdot \sqrt{8}\\ \mathbf{if}\;x-scale \leq -3.2 \cdot 10^{-76}:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(a \cdot a, {\cos t_0}^{2}, b \cdot \left(b \cdot {\sin t_0}^{2}\right)\right)} \cdot \left(\sqrt{2} \cdot t_2\right)\right) \cdot -0.25\\ \mathbf{elif}\;x-scale \leq 1.2 \cdot 10^{+128}:\\ \;\;\;\;0.25 \cdot \left|\sqrt{2} \cdot \left(b \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(t_2 \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, {\cos t_1}^{2}, {\sin t_1}^{2} \cdot \left(b \cdot b\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 (* 0.005555555555555556 (* PI angle)))
        (t_2 (* x-scale (sqrt 8.0))))
   (if (<= x-scale -3.2e-76)
     (*
      (*
       (sqrt (fma (* a a) (pow (cos t_0) 2.0) (* b (* b (pow (sin t_0) 2.0)))))
       (* (sqrt 2.0) t_2))
      -0.25)
     (if (<= x-scale 1.2e+128)
       (* 0.25 (fabs (* (sqrt 2.0) (* b (* (sqrt 8.0) y-scale)))))
       (*
        0.25
        (*
         t_2
         (sqrt
          (*
           2.0
           (fma
            (* a a)
            (pow (cos t_1) 2.0)
            (* (pow (sin t_1) 2.0) (* b 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 = ((double) M_PI) * (0.005555555555555556 * angle);
	double t_1 = 0.005555555555555556 * (((double) M_PI) * angle);
	double t_2 = x_45_scale * sqrt(8.0);
	double tmp;
	if (x_45_scale <= -3.2e-76) {
		tmp = (sqrt(fma((a * a), pow(cos(t_0), 2.0), (b * (b * pow(sin(t_0), 2.0))))) * (sqrt(2.0) * t_2)) * -0.25;
	} else if (x_45_scale <= 1.2e+128) {
		tmp = 0.25 * fabs((sqrt(2.0) * (b * (sqrt(8.0) * y_45_scale))));
	} else {
		tmp = 0.25 * (t_2 * sqrt((2.0 * fma((a * a), pow(cos(t_1), 2.0), (pow(sin(t_1), 2.0) * (b * 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 = Float64(pi * Float64(0.005555555555555556 * angle))
	t_1 = Float64(0.005555555555555556 * Float64(pi * angle))
	t_2 = Float64(x_45_scale * sqrt(8.0))
	tmp = 0.0
	if (x_45_scale <= -3.2e-76)
		tmp = Float64(Float64(sqrt(fma(Float64(a * a), (cos(t_0) ^ 2.0), Float64(b * Float64(b * (sin(t_0) ^ 2.0))))) * Float64(sqrt(2.0) * t_2)) * -0.25);
	elseif (x_45_scale <= 1.2e+128)
		tmp = Float64(0.25 * abs(Float64(sqrt(2.0) * Float64(b * Float64(sqrt(8.0) * y_45_scale)))));
	else
		tmp = Float64(0.25 * Float64(t_2 * sqrt(Float64(2.0 * fma(Float64(a * a), (cos(t_1) ^ 2.0), Float64((sin(t_1) ^ 2.0) * Float64(b * b)))))));
	end
	return 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[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$45$scale * N[Sqrt[8.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$45$scale, -3.2e-76], N[(N[(N[Sqrt[N[(N[(a * a), $MachinePrecision] * N[Power[N[Cos[t$95$0], $MachinePrecision], 2.0], $MachinePrecision] + N[(b * N[(b * N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision], If[LessEqual[x$45$scale, 1.2e+128], N[(0.25 * N[Abs[N[(N[Sqrt[2.0], $MachinePrecision] * N[(b * N[(N[Sqrt[8.0], $MachinePrecision] * y$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(t$95$2 * N[Sqrt[N[(2.0 * N[(N[(a * a), $MachinePrecision] * N[Power[N[Cos[t$95$1], $MachinePrecision], 2.0], $MachinePrecision] + N[(N[Power[N[Sin[t$95$1], $MachinePrecision], 2.0], $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\frac{-\sqrt{\left(\left(2 \cdot \frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}\right) \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right) \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}\right)}^{2}}\right)}}{\frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}}
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_1 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\
t_2 := x-scale \cdot \sqrt{8}\\
\mathbf{if}\;x-scale \leq -3.2 \cdot 10^{-76}:\\
\;\;\;\;\left(\sqrt{\mathsf{fma}\left(a \cdot a, {\cos t_0}^{2}, b \cdot \left(b \cdot {\sin t_0}^{2}\right)\right)} \cdot \left(\sqrt{2} \cdot t_2\right)\right) \cdot -0.25\\

\mathbf{elif}\;x-scale \leq 1.2 \cdot 10^{+128}:\\
\;\;\;\;0.25 \cdot \left|\sqrt{2} \cdot \left(b \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right|\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(t_2 \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, {\cos t_1}^{2}, {\sin t_1}^{2} \cdot \left(b \cdot b\right)\right)}\right)\\


\end{array}

Error?

Derivation?

  1. Split input into 3 regimes
  2. if x-scale < -3.1999999999999998e-76

    1. Initial program 1.4%

      \[\frac{-\sqrt{\left(\left(2 \cdot \frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}\right) \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right) \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}\right)}^{2}}\right)}}{\frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}} \]
    2. Simplified1.9%

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

      [Start]1.4

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

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

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

      [Start]7.1

      \[ 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-*l* [=>]7.5

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

      distribute-lft-out [=>]7.5

      \[ 0.25 \cdot \left(y-scale \cdot \left(\left(x-scale \cdot \sqrt{8}\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)}}\right)\right) \]
    5. Taylor expanded in y-scale around -inf 28.7%

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

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

      [Start]28.7

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

      associate-*r* [=>]28.7

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

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

      *-commutative [=>]28.7

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

    if -3.1999999999999998e-76 < x-scale < 1.2000000000000001e128

    1. Initial program 0.7%

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

      \[\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-rr34.1%

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

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

      \[\leadsto 0.25 \cdot \left|\sqrt{2} \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{8} \cdot \left(b \cdot y-scale\right)\right)} + -1\right)}\right| \]
    6. Simplified34.0%

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

      [Start]14.9

      \[ 0.25 \cdot \left|\sqrt{2} \cdot \left(e^{\mathsf{log1p}\left(\sqrt{8} \cdot \left(b \cdot y-scale\right)\right)} + -1\right)\right| \]

      metadata-eval [<=]14.9

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

      sub-neg [<=]14.9

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

      expm1-def [=>]23.8

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

      expm1-log1p [=>]34.0

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

      *-commutative [=>]34.0

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

      associate-*l* [=>]34.0

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

    if 1.2000000000000001e128 < x-scale

    1. Initial program 0.5%

      \[\frac{-\sqrt{\left(\left(2 \cdot \frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}\right) \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)\right) \cdot \left(\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} + \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right) + \sqrt{{\left(\frac{\frac{{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{x-scale}}{x-scale} - \frac{\frac{{\left(a \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}}{y-scale}}{y-scale}\right)}^{2} + {\left(\frac{\frac{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{x-scale}}{y-scale}\right)}^{2}}\right)}}{\frac{4 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot \left(-a\right)\right)\right)}{{\left(x-scale \cdot y-scale\right)}^{2}}} \]
    2. Simplified0.6%

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

      [Start]0.5

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

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

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

      [Start]38.4

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

      distribute-lft-out [=>]38.4

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

      fma-def [=>]38.4

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

      unpow2 [=>]38.4

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

      *-commutative [=>]38.4

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

      unpow2 [=>]38.4

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

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

Alternatives

Alternative 1
Accuracy30.5%
Cost59332
\[\begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\ \mathbf{if}\;x-scale \leq 5.5 \cdot 10^{+128}:\\ \;\;\;\;0.25 \cdot \left|\sqrt{2} \cdot \left(b \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, {\cos t_0}^{2}, {\sin t_0}^{2} \cdot \left(b \cdot b\right)\right)}\right)\right)\\ \end{array} \]
Alternative 2
Accuracy30.5%
Cost59332
\[\begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\ \mathbf{if}\;x-scale \leq 5.5 \cdot 10^{+128}:\\ \;\;\;\;0.25 \cdot \left|\sqrt{2} \cdot \left(b \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(x-scale \cdot \sqrt{8}\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(a \cdot a, {\cos t_0}^{2}, {\sin t_0}^{2} \cdot \left(b \cdot b\right)\right)}\right)\\ \end{array} \]
Alternative 3
Accuracy28.6%
Cost26760
\[\begin{array}{l} \mathbf{if}\;y-scale \leq -5.6 \cdot 10^{+15}:\\ \;\;\;\;0.25 \cdot \left|\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right|\\ \mathbf{elif}\;y-scale \leq -1 \cdot 10^{-13}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{2} \cdot \left(a \cdot \left(\sqrt{8} \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;y-scale \leq -1.85 \cdot 10^{-211} \lor \neg \left(y-scale \leq 4 \cdot 10^{-195}\right):\\ \;\;\;\;0.25 \cdot \left|\sqrt{2} \cdot \left(b \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(x-scale \cdot \sqrt{8}\right) \cdot \left(a \cdot \sqrt{2}\right)\right)\\ \end{array} \]
Alternative 4
Accuracy28.6%
Cost20305
\[\begin{array}{l} t_0 := a \cdot \sqrt{2}\\ \mathbf{if}\;y-scale \leq -1.6 \cdot 10^{+16}:\\ \;\;\;\;\left|\sqrt{0.125} \cdot \left(\sqrt{8} \cdot \left(b \cdot y-scale\right)\right)\right|\\ \mathbf{elif}\;y-scale \leq -1.05 \cdot 10^{-13}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot t_0\right)\right)\\ \mathbf{elif}\;y-scale \leq -1.8 \cdot 10^{-212} \lor \neg \left(y-scale \leq 2.3 \cdot 10^{-192}\right):\\ \;\;\;\;0.25 \cdot \left|b \cdot \left(\sqrt{8} \cdot \left(\sqrt{2} \cdot y-scale\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(x-scale \cdot \sqrt{8}\right) \cdot t_0\right)\\ \end{array} \]
Alternative 5
Accuracy28.6%
Cost20305
\[\begin{array}{l} t_0 := a \cdot \sqrt{2}\\ \mathbf{if}\;y-scale \leq -5.5 \cdot 10^{+15}:\\ \;\;\;\;\left|\sqrt{0.125} \cdot \left(\sqrt{8} \cdot \left(b \cdot y-scale\right)\right)\right|\\ \mathbf{elif}\;y-scale \leq -1 \cdot 10^{-13}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot t_0\right)\right)\\ \mathbf{elif}\;y-scale \leq -3.8 \cdot 10^{-211} \lor \neg \left(y-scale \leq 1.1 \cdot 10^{-192}\right):\\ \;\;\;\;0.25 \cdot \left|\sqrt{2} \cdot \left(b \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(x-scale \cdot \sqrt{8}\right) \cdot t_0\right)\\ \end{array} \]
Alternative 6
Accuracy28.6%
Cost20305
\[\begin{array}{l} t_0 := a \cdot \sqrt{2}\\ \mathbf{if}\;y-scale \leq -7.2 \cdot 10^{+15}:\\ \;\;\;\;0.25 \cdot \left|\sqrt{2} \cdot \left(y-scale \cdot \left(b \cdot \sqrt{8}\right)\right)\right|\\ \mathbf{elif}\;y-scale \leq -1.05 \cdot 10^{-13}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot t_0\right)\right)\\ \mathbf{elif}\;y-scale \leq -4.5 \cdot 10^{-213} \lor \neg \left(y-scale \leq 1.85 \cdot 10^{-193}\right):\\ \;\;\;\;0.25 \cdot \left|\sqrt{2} \cdot \left(b \cdot \left(\sqrt{8} \cdot y-scale\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(x-scale \cdot \sqrt{8}\right) \cdot t_0\right)\\ \end{array} \]
Alternative 7
Accuracy28.6%
Cost20177
\[\begin{array}{l} t_0 := \left|\sqrt{0.125} \cdot \left(\sqrt{8} \cdot \left(b \cdot y-scale\right)\right)\right|\\ t_1 := a \cdot \sqrt{2}\\ \mathbf{if}\;y-scale \leq -5.5 \cdot 10^{+15}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y-scale \leq -1.05 \cdot 10^{-13}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot t_1\right)\right)\\ \mathbf{elif}\;y-scale \leq -8 \cdot 10^{-216} \lor \neg \left(y-scale \leq 1.45 \cdot 10^{-192}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(x-scale \cdot \sqrt{8}\right) \cdot t_1\right)\\ \end{array} \]
Alternative 8
Accuracy19.3%
Cost13904
\[\begin{array}{l} t_0 := 0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \left(a \cdot \sqrt{2}\right)\right)\right)\\ t_1 := \left(0.25 \cdot y-scale\right) \cdot \left(b \cdot -4\right)\\ t_2 := \left(0.25 \cdot y-scale\right) \cdot \left(b \cdot 4\right)\\ \mathbf{if}\;y-scale \leq -5.5 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y-scale \leq -1.05 \cdot 10^{-13}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y-scale \leq -5.6 \cdot 10^{-116}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y-scale \leq 8 \cdot 10^{-31}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y-scale \leq 1.26 \cdot 10^{+159}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 9
Accuracy19.3%
Cost13904
\[\begin{array}{l} t_0 := a \cdot \sqrt{2}\\ t_1 := \left(0.25 \cdot y-scale\right) \cdot \left(b \cdot -4\right)\\ t_2 := \left(0.25 \cdot y-scale\right) \cdot \left(b \cdot 4\right)\\ \mathbf{if}\;y-scale \leq -1.16 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y-scale \leq -7 \cdot 10^{-14}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot t_0\right)\right)\\ \mathbf{elif}\;y-scale \leq -1.25 \cdot 10^{-118}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y-scale \leq 5.4 \cdot 10^{-31}:\\ \;\;\;\;0.25 \cdot \left(\left(x-scale \cdot \sqrt{8}\right) \cdot t_0\right)\\ \mathbf{elif}\;y-scale \leq 1.8 \cdot 10^{+160}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Accuracy17.5%
Cost13840
\[\begin{array}{l} t_0 := \left(0.25 \cdot y-scale\right) \cdot \left(b \cdot 4\right)\\ t_1 := \left(0.25 \cdot y-scale\right) \cdot \left(b \cdot -4\right)\\ \mathbf{if}\;y-scale \leq -9.5 \cdot 10^{+19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y-scale \leq -3.5 \cdot 10^{-79}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y-scale \leq -5.2 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y-scale \leq 4.6 \cdot 10^{-50}:\\ \;\;\;\;\sqrt{8 \cdot \left(0.125 \cdot {\left(b \cdot y-scale\right)}^{2}\right)}\\ \mathbf{elif}\;y-scale \leq 1.9 \cdot 10^{+158}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Accuracy17.5%
Cost13584
\[\begin{array}{l} t_0 := \left(0.25 \cdot y-scale\right) \cdot \left(b \cdot 4\right)\\ t_1 := \left(0.25 \cdot y-scale\right) \cdot \left(b \cdot -4\right)\\ \mathbf{if}\;y-scale \leq -1.05 \cdot 10^{+20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y-scale \leq -3.2 \cdot 10^{-79}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y-scale \leq -2.4 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y-scale \leq 8.5 \cdot 10^{-50}:\\ \;\;\;\;\sqrt{{\left(b \cdot y-scale\right)}^{2}}\\ \mathbf{elif}\;y-scale \leq 3.8 \cdot 10^{+159}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 12
Accuracy16.0%
Cost845
\[\begin{array}{l} \mathbf{if}\;y-scale \leq -4.2 \cdot 10^{+21} \lor \neg \left(y-scale \leq 5.6 \cdot 10^{-50}\right) \land y-scale \leq 2.05 \cdot 10^{+161}:\\ \;\;\;\;\left(0.25 \cdot y-scale\right) \cdot \left(b \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot y-scale\right) \cdot \left(b \cdot 4\right)\\ \end{array} \]
Alternative 13
Accuracy15.9%
Cost448
\[\left(0.25 \cdot y-scale\right) \cdot \left(b \cdot -4\right) \]

Error

Reproduce?

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