?

Average Error: 63.4 → 42.0
Time: 2.0min
Precision: binary64
Cost: 72068

?

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

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

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


\end{array}

Error?

Derivation?

  1. Split input into 3 regimes
  2. if x-scale < -1.9e48

    1. Initial program 63.3

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

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

      [Start]63.3

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

      \[\leadsto {\left(x-scale \cdot y-scale\right)}^{2} \cdot \left(-0.25 \cdot \color{blue}{\left(\frac{\sqrt{8}}{y-scale \cdot x-scale} \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) \]
    4. Simplified61.0

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

      [Start]61.1

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

      *-commutative [=>]61.1

      \[ {\left(x-scale \cdot y-scale\right)}^{2} \cdot \left(-0.25 \cdot \color{blue}{\left(\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}}} \cdot \frac{\sqrt{8}}{y-scale \cdot x-scale}\right)}\right) \]
    5. Taylor expanded in y-scale around 0 43.1

      \[\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)} \]
    6. Simplified43.1

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

      [Start]43.1

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

      associate-*r* [=>]43.1

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

      +-commutative [=>]43.1

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

      fma-def [=>]43.1

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

      unpow2 [=>]43.1

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

      associate-*r* [=>]43.1

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

      *-commutative [=>]43.1

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

      unpow2 [=>]43.1

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

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

    if -1.9e48 < x-scale < 1.45e-5

    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. Taylor expanded in angle around 0 51.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-rr41.7

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

    if 1.45e-5 < x-scale

    1. Initial program 63.2

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

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

      [Start]63.2

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

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

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

      [Start]44.7

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

      associate-*r* [=>]44.7

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

      *-commutative [=>]44.7

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

      distribute-lft-out [=>]44.7

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

      +-commutative [=>]44.7

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

      fma-def [=>]44.7

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

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

Alternatives

Alternative 1
Error42.2
Cost72004
\[\begin{array}{l} t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\ t_1 := \sin t_0\\ t_2 := \cos t_0\\ t_3 := x-scale \cdot \sqrt{8}\\ \mathbf{if}\;x-scale \leq -9 \cdot 10^{+48}:\\ \;\;\;\;\left(-0.25 \cdot \left(\sqrt{2} \cdot t_3\right)\right) \cdot \sqrt{e^{\log \left({\left(t_2 \cdot a\right)}^{2} + {\left(b \cdot t_1\right)}^{2}\right)}}\\ \mathbf{elif}\;x-scale \leq 2.7 \cdot 10^{-5}:\\ \;\;\;\;0.25 \cdot \left(4 \cdot \left|b \cdot y-scale\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot t_3\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(b \cdot b, {t_1}^{2}, {t_2}^{2} \cdot \left(a \cdot a\right)\right)}\\ \end{array} \]
Alternative 2
Error42.1
Cost72004
\[\begin{array}{l} t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\ t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_2 := x-scale \cdot \sqrt{8}\\ \mathbf{if}\;x-scale \leq -3.2 \cdot 10^{+50}:\\ \;\;\;\;\left(-0.25 \cdot \left(\sqrt{2} \cdot t_2\right)\right) \cdot \sqrt{{\left(b \cdot \sin t_1\right)}^{2} + \mathsf{expm1}\left(\mathsf{log1p}\left({\left(a \cdot \cos t_1\right)}^{2}\right)\right)}\\ \mathbf{elif}\;x-scale \leq 1.26 \cdot 10^{-5}:\\ \;\;\;\;0.25 \cdot \left(4 \cdot \left|b \cdot y-scale\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot t_2\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(b \cdot b, {\sin t_0}^{2}, {\cos t_0}^{2} \cdot \left(a \cdot a\right)\right)}\\ \end{array} \]
Alternative 3
Error42.2
Cost65732
\[\begin{array}{l} t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\ t_1 := \sin t_0\\ t_2 := \cos t_0\\ t_3 := x-scale \cdot \sqrt{8}\\ \mathbf{if}\;x-scale \leq -3.2 \cdot 10^{+50}:\\ \;\;\;\;\left(-0.25 \cdot \left(\sqrt{2} \cdot t_3\right)\right) \cdot e^{\log \left({\left(t_2 \cdot a\right)}^{2} + {\left(b \cdot t_1\right)}^{2}\right) \cdot 0.5}\\ \mathbf{elif}\;x-scale \leq 2.75 \cdot 10^{-5}:\\ \;\;\;\;0.25 \cdot \left(4 \cdot \left|b \cdot y-scale\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot t_3\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(b \cdot b, {t_1}^{2}, {t_2}^{2} \cdot \left(a \cdot a\right)\right)}\\ \end{array} \]
Alternative 4
Error43.0
Cost65540
\[\begin{array}{l} t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\ t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_2 := x-scale \cdot \sqrt{8}\\ \mathbf{if}\;x-scale \leq -3.2 \cdot 10^{+58}:\\ \;\;\;\;\left(-0.25 \cdot \left(\sqrt{2} \cdot t_2\right)\right) \cdot \sqrt[3]{{\left({\left(\mathsf{hypot}\left(a \cdot \cos t_1, b \cdot \sin t_1\right)\right)}^{2}\right)}^{1.5}}\\ \mathbf{elif}\;x-scale \leq 1.45 \cdot 10^{-5}:\\ \;\;\;\;0.25 \cdot \left(4 \cdot \left|b \cdot y-scale\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot t_2\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(b \cdot b, {\sin t_0}^{2}, {\cos t_0}^{2} \cdot \left(a \cdot a\right)\right)}\\ \end{array} \]
Alternative 5
Error43.2
Cost59464
\[\begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;x-scale \leq -1.7 \cdot 10^{+87}:\\ \;\;\;\;\left(-0.25 \cdot \left(\sqrt{2} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{a \cdot a}\\ \mathbf{elif}\;x-scale \leq 2.4 \cdot 10^{-5}:\\ \;\;\;\;0.25 \cdot \left(4 \cdot \left|b \cdot y-scale\right|\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(x-scale \cdot \left(\sqrt{8} \cdot \sqrt{2 \cdot \mathsf{fma}\left(b \cdot b, {\sin t_0}^{2}, \left(a \cdot a\right) \cdot {\cos t_0}^{2}\right)}\right)\right)\\ \end{array} \]
Alternative 6
Error43.2
Cost59464
\[\begin{array}{l} t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\ t_1 := x-scale \cdot \sqrt{8}\\ \mathbf{if}\;x-scale \leq -1.1 \cdot 10^{+86}:\\ \;\;\;\;\left(-0.25 \cdot \left(\sqrt{2} \cdot t_1\right)\right) \cdot \sqrt{a \cdot a}\\ \mathbf{elif}\;x-scale \leq 1.9 \cdot 10^{-5}:\\ \;\;\;\;0.25 \cdot \left(4 \cdot \left|b \cdot y-scale\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot t_1\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(b \cdot b, {\sin t_0}^{2}, {\cos t_0}^{2} \cdot \left(a \cdot a\right)\right)}\\ \end{array} \]
Alternative 7
Error45.1
Cost20036
\[\begin{array}{l} \mathbf{if}\;x-scale \leq -3.5 \cdot 10^{+89}:\\ \;\;\;\;\left(-0.25 \cdot \left(\sqrt{2} \cdot \left(x-scale \cdot \sqrt{8}\right)\right)\right) \cdot \sqrt{a \cdot a}\\ \mathbf{elif}\;x-scale \leq 8.4 \cdot 10^{-35}:\\ \;\;\;\;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
Error44.9
Cost13641
\[\begin{array}{l} \mathbf{if}\;y-scale \leq -6.2 \cdot 10^{-250} \lor \neg \left(y-scale \leq 1.2 \cdot 10^{-137}\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 9
Error45.7
Cost6848
\[0.25 \cdot \left(4 \cdot \left|b \cdot y-scale\right|\right) \]
Alternative 10
Error53.8
Cost448
\[0.25 \cdot \left(b \cdot \left(4 \cdot y-scale\right)\right) \]

Error

Reproduce?

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