Average Error: 41.4 → 5.3
Time: 1.2min
Precision: binary64
Cost: 7568
\[\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} \cdot \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} - \left(4 \cdot \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}\right) \cdot \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} \]
\[\begin{array}{l} t_0 := \frac{a}{\frac{y-scale \cdot x-scale}{b}}\\ t_1 := -4 \cdot {\left(\frac{\frac{b}{\frac{y-scale}{a}}}{x-scale}\right)}^{2}\\ \mathbf{if}\;a \leq -3.5 \cdot 10^{-138}:\\ \;\;\;\;\frac{a \cdot \frac{\frac{b}{y-scale}}{x-scale}}{\left(x-scale \cdot \frac{y-scale}{b}\right) \cdot \frac{-0.25}{a}}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-129}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+53}:\\ \;\;\;\;-4 \cdot \left(t_0 \cdot t_0\right)\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+236}:\\ \;\;\;\;-4 \cdot \left(\frac{a}{\frac{y-scale}{\frac{b}{x-scale}}} \cdot \frac{a}{y-scale \cdot \frac{x-scale}{b}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (-
  (*
   (/
    (/
     (*
      (* (* 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 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) PI)))
      (cos (* (/ angle 180.0) PI)))
     x-scale)
    y-scale))
  (*
   (*
    4.0
    (/
     (/
      (+
       (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))))
(FPCore (a b angle x-scale y-scale)
 :precision binary64
 (let* ((t_0 (/ a (/ (* y-scale x-scale) b)))
        (t_1 (* -4.0 (pow (/ (/ b (/ y-scale a)) x-scale) 2.0))))
   (if (<= a -3.5e-138)
     (/
      (* a (/ (/ b y-scale) x-scale))
      (* (* x-scale (/ y-scale b)) (/ -0.25 a)))
     (if (<= a 5e-129)
       t_1
       (if (<= a 3.1e+53)
         (* -4.0 (* t_0 t_0))
         (if (<= a 7.2e+236)
           (*
            -4.0
            (*
             (/ a (/ y-scale (/ b x-scale)))
             (/ a (* y-scale (/ x-scale b)))))
           t_1))))))
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	return ((((((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 * (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)) - ((4.0 * (((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));
}
double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = a / ((y_45_scale * x_45_scale) / b);
	double t_1 = -4.0 * pow(((b / (y_45_scale / a)) / x_45_scale), 2.0);
	double tmp;
	if (a <= -3.5e-138) {
		tmp = (a * ((b / y_45_scale) / x_45_scale)) / ((x_45_scale * (y_45_scale / b)) * (-0.25 / a));
	} else if (a <= 5e-129) {
		tmp = t_1;
	} else if (a <= 3.1e+53) {
		tmp = -4.0 * (t_0 * t_0);
	} else if (a <= 7.2e+236) {
		tmp = -4.0 * ((a / (y_45_scale / (b / x_45_scale))) * (a / (y_45_scale * (x_45_scale / b))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	return ((((((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 * (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)) - ((4.0 * (((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));
}
public static double code(double a, double b, double angle, double x_45_scale, double y_45_scale) {
	double t_0 = a / ((y_45_scale * x_45_scale) / b);
	double t_1 = -4.0 * Math.pow(((b / (y_45_scale / a)) / x_45_scale), 2.0);
	double tmp;
	if (a <= -3.5e-138) {
		tmp = (a * ((b / y_45_scale) / x_45_scale)) / ((x_45_scale * (y_45_scale / b)) * (-0.25 / a));
	} else if (a <= 5e-129) {
		tmp = t_1;
	} else if (a <= 3.1e+53) {
		tmp = -4.0 * (t_0 * t_0);
	} else if (a <= 7.2e+236) {
		tmp = -4.0 * ((a / (y_45_scale / (b / x_45_scale))) * (a / (y_45_scale * (x_45_scale / b))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(a, b, angle, x_45_scale, y_45_scale):
	return ((((((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 * (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)) - ((4.0 * (((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))
def code(a, b, angle, x_45_scale, y_45_scale):
	t_0 = a / ((y_45_scale * x_45_scale) / b)
	t_1 = -4.0 * math.pow(((b / (y_45_scale / a)) / x_45_scale), 2.0)
	tmp = 0
	if a <= -3.5e-138:
		tmp = (a * ((b / y_45_scale) / x_45_scale)) / ((x_45_scale * (y_45_scale / b)) * (-0.25 / a))
	elif a <= 5e-129:
		tmp = t_1
	elif a <= 3.1e+53:
		tmp = -4.0 * (t_0 * t_0)
	elif a <= 7.2e+236:
		tmp = -4.0 * ((a / (y_45_scale / (b / x_45_scale))) * (a / (y_45_scale * (x_45_scale / b))))
	else:
		tmp = t_1
	return tmp
function code(a, b, angle, x_45_scale, y_45_scale)
	return Float64(Float64(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) * 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)) - Float64(Float64(4.0 * 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)))
end
function code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = Float64(a / Float64(Float64(y_45_scale * x_45_scale) / b))
	t_1 = Float64(-4.0 * (Float64(Float64(b / Float64(y_45_scale / a)) / x_45_scale) ^ 2.0))
	tmp = 0.0
	if (a <= -3.5e-138)
		tmp = Float64(Float64(a * Float64(Float64(b / y_45_scale) / x_45_scale)) / Float64(Float64(x_45_scale * Float64(y_45_scale / b)) * Float64(-0.25 / a)));
	elseif (a <= 5e-129)
		tmp = t_1;
	elseif (a <= 3.1e+53)
		tmp = Float64(-4.0 * Float64(t_0 * t_0));
	elseif (a <= 7.2e+236)
		tmp = Float64(-4.0 * Float64(Float64(a / Float64(y_45_scale / Float64(b / x_45_scale))) * Float64(a / Float64(y_45_scale * Float64(x_45_scale / b)))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp = code(a, b, angle, x_45_scale, y_45_scale)
	tmp = ((((((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 * ((b ^ 2.0) - (a ^ 2.0))) * sin(((angle / 180.0) * pi))) * cos(((angle / 180.0) * pi))) / x_45_scale) / y_45_scale)) - ((4.0 * (((((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));
end
function tmp_2 = code(a, b, angle, x_45_scale, y_45_scale)
	t_0 = a / ((y_45_scale * x_45_scale) / b);
	t_1 = -4.0 * (((b / (y_45_scale / a)) / x_45_scale) ^ 2.0);
	tmp = 0.0;
	if (a <= -3.5e-138)
		tmp = (a * ((b / y_45_scale) / x_45_scale)) / ((x_45_scale * (y_45_scale / b)) * (-0.25 / a));
	elseif (a <= 5e-129)
		tmp = t_1;
	elseif (a <= 3.1e+53)
		tmp = -4.0 * (t_0 * t_0);
	elseif (a <= 7.2e+236)
		tmp = -4.0 * ((a / (y_45_scale / (b / x_45_scale))) * (a / (y_45_scale * (x_45_scale / b))));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := N[(N[(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] * 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]), $MachinePrecision] - N[(N[(4.0 * 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]), $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]), $MachinePrecision]
code[a_, b_, angle_, x$45$scale_, y$45$scale_] := Block[{t$95$0 = N[(a / N[(N[(y$45$scale * x$45$scale), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-4.0 * N[Power[N[(N[(b / N[(y$45$scale / a), $MachinePrecision]), $MachinePrecision] / x$45$scale), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e-138], N[(N[(a * N[(N[(b / y$45$scale), $MachinePrecision] / x$45$scale), $MachinePrecision]), $MachinePrecision] / N[(N[(x$45$scale * N[(y$45$scale / b), $MachinePrecision]), $MachinePrecision] * N[(-0.25 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e-129], t$95$1, If[LessEqual[a, 3.1e+53], N[(-4.0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.2e+236], N[(-4.0 * N[(N[(a / N[(y$45$scale / N[(b / x$45$scale), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a / N[(y$45$scale * N[(x$45$scale / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\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} \cdot \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} - \left(4 \cdot \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}\right) \cdot \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}
\begin{array}{l}
t_0 := \frac{a}{\frac{y-scale \cdot x-scale}{b}}\\
t_1 := -4 \cdot {\left(\frac{\frac{b}{\frac{y-scale}{a}}}{x-scale}\right)}^{2}\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{-138}:\\
\;\;\;\;\frac{a \cdot \frac{\frac{b}{y-scale}}{x-scale}}{\left(x-scale \cdot \frac{y-scale}{b}\right) \cdot \frac{-0.25}{a}}\\

\mathbf{elif}\;a \leq 5 \cdot 10^{-129}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+53}:\\
\;\;\;\;-4 \cdot \left(t_0 \cdot t_0\right)\\

\mathbf{elif}\;a \leq 7.2 \cdot 10^{+236}:\\
\;\;\;\;-4 \cdot \left(\frac{a}{\frac{y-scale}{\frac{b}{x-scale}}} \cdot \frac{a}{y-scale \cdot \frac{x-scale}{b}}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if a < -3.4999999999999999e-138

    1. Initial program 47.1

      \[\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} \cdot \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} - \left(4 \cdot \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}\right) \cdot \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} \]
    2. Simplified48.9

      \[\leadsto \color{blue}{\frac{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{y-scale \cdot x-scale} \cdot \frac{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{y-scale \cdot x-scale} - \left(4 \cdot \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}\right) \cdot \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}} \]
      Proof
      (-.f64 (*.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2)) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2)))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 6 points increase in error, 4 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2)) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2)))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 8 points increase in error, 2 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale)) (*.f64 (*.f64 4 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) x-scale) x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 3 points increase in error, 19 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale)) (*.f64 (*.f64 4 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) x-scale) x-scale)) (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) y-scale) y-scale)))): 3 points increase in error, 20 points decrease in error
    3. Taylor expanded in angle around 0 43.0

      \[\leadsto \color{blue}{-4 \cdot \frac{{b}^{2} \cdot {a}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Simplified34.7

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot a}{\frac{\left(y-scale \cdot x-scale\right) \cdot \left(y-scale \cdot x-scale\right)}{b \cdot b}}} \]
      Proof
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (*.f64 y-scale x-scale) (*.f64 y-scale x-scale)) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (Rewrite<= unswap-sqr_binary64 (*.f64 (*.f64 y-scale y-scale) (*.f64 x-scale x-scale))) (*.f64 b b)))): 48 points increase in error, 2 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 y-scale 2)) (*.f64 x-scale x-scale)) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 x-scale x-scale) (pow.f64 y-scale 2))) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 x-scale 2)) (pow.f64 y-scale 2)) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2)) (Rewrite<= unpow2_binary64 (pow.f64 b 2))))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 a a) (pow.f64 b 2)) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2))))): 8 points increase in error, 2 points decrease in error
      (*.f64 -4 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 b 2) (*.f64 a a))) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2))) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2)))): 0 points increase in error, 0 points decrease in error
    5. Applied egg-rr6.2

      \[\leadsto -4 \cdot \color{blue}{\left(\frac{a}{\frac{y-scale}{\frac{b}{x-scale}}} \cdot \frac{a}{\frac{y-scale}{\frac{b}{x-scale}}}\right)} \]
    6. Applied egg-rr12.1

      \[\leadsto \color{blue}{\frac{\left(\left(a \cdot \frac{b}{y-scale \cdot x-scale}\right) \cdot -4\right) \cdot \left(-a\right)}{y-scale \cdot \left(-\frac{x-scale}{b}\right)}} \]
    7. Simplified6.0

      \[\leadsto \color{blue}{\frac{a \cdot \frac{\frac{b}{y-scale}}{x-scale}}{\frac{x-scale \cdot \left(-\frac{y-scale}{b}\right)}{4 \cdot a}}} \]
      Proof
      (/.f64 (*.f64 a (/.f64 (/.f64 b y-scale) x-scale)) (/.f64 (*.f64 x-scale (neg.f64 (/.f64 y-scale b))) (*.f64 4 a))): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 a (Rewrite<= associate-/r*_binary64 (/.f64 b (*.f64 y-scale x-scale)))) (/.f64 (*.f64 x-scale (neg.f64 (/.f64 y-scale b))) (*.f64 4 a))): 31 points increase in error, 16 points decrease in error
      (/.f64 (*.f64 a (/.f64 b (*.f64 y-scale x-scale))) (/.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 x-scale (/.f64 y-scale b)))) (*.f64 4 a))): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 a (/.f64 b (*.f64 y-scale x-scale))) (/.f64 (neg.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 x-scale y-scale) b))) (*.f64 4 a))): 19 points increase in error, 17 points decrease in error
      (/.f64 (*.f64 a (/.f64 b (*.f64 y-scale x-scale))) (/.f64 (neg.f64 (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 x-scale b) y-scale))) (*.f64 4 a))): 23 points increase in error, 22 points decrease in error
      (/.f64 (*.f64 a (/.f64 b (*.f64 y-scale x-scale))) (/.f64 (neg.f64 (Rewrite=> *-commutative_binary64 (*.f64 y-scale (/.f64 x-scale b)))) (*.f64 4 a))): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 a (/.f64 b (*.f64 y-scale x-scale))) (/.f64 (Rewrite<= distribute-rgt-neg-out_binary64 (*.f64 y-scale (neg.f64 (/.f64 x-scale b)))) (*.f64 4 a))): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 a (/.f64 b (*.f64 y-scale x-scale))) (/.f64 (*.f64 y-scale (neg.f64 (/.f64 x-scale b))) (*.f64 (Rewrite<= metadata-eval (*.f64 -4 -1)) a))): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 a (/.f64 b (*.f64 y-scale x-scale))) (/.f64 (*.f64 y-scale (neg.f64 (/.f64 x-scale b))) (Rewrite<= associate-*r*_binary64 (*.f64 -4 (*.f64 -1 a))))): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 a (/.f64 b (*.f64 y-scale x-scale))) (/.f64 (*.f64 y-scale (neg.f64 (/.f64 x-scale b))) (*.f64 -4 (Rewrite<= neg-mul-1_binary64 (neg.f64 a))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 a (/.f64 b (*.f64 y-scale x-scale))) (*.f64 -4 (neg.f64 a))) (*.f64 y-scale (neg.f64 (/.f64 x-scale b))))): 23 points increase in error, 14 points decrease in error
      (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (*.f64 a (/.f64 b (*.f64 y-scale x-scale))) -4) (neg.f64 a))) (*.f64 y-scale (neg.f64 (/.f64 x-scale b)))): 0 points increase in error, 0 points decrease in error
    8. Taylor expanded in x-scale around 0 11.0

      \[\leadsto \frac{a \cdot \frac{\frac{b}{y-scale}}{x-scale}}{\color{blue}{-0.25 \cdot \frac{y-scale \cdot x-scale}{a \cdot b}}} \]
    9. Simplified6.0

      \[\leadsto \frac{a \cdot \frac{\frac{b}{y-scale}}{x-scale}}{\color{blue}{\left(x-scale \cdot \frac{y-scale}{b}\right) \cdot \frac{-0.25}{a}}} \]
      Proof
      (*.f64 (*.f64 x-scale (/.f64 y-scale b)) (/.f64 -1/4 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 x-scale y-scale) b)) (/.f64 -1/4 a)): 37 points increase in error, 39 points decrease in error
      (*.f64 (Rewrite=> associate-/l*_binary64 (/.f64 x-scale (/.f64 b y-scale))) (/.f64 -1/4 a)): 36 points increase in error, 41 points decrease in error
      (*.f64 (/.f64 x-scale (/.f64 b y-scale)) (/.f64 (Rewrite<= metadata-eval (/.f64 1 -4)) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 x-scale (/.f64 b y-scale)) (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 -4 a)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 x-scale (/.f64 b y-scale)) (/.f64 1 (Rewrite<= *-commutative_binary64 (*.f64 a -4)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite=> associate-/r/_binary64 (*.f64 (/.f64 x-scale b) y-scale)) (/.f64 1 (*.f64 a -4))): 43 points increase in error, 31 points decrease in error
      (Rewrite=> *-commutative_binary64 (*.f64 (/.f64 1 (*.f64 a -4)) (*.f64 (/.f64 x-scale b) y-scale))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 1 (Rewrite=> *-commutative_binary64 (*.f64 -4 a))) (*.f64 (/.f64 x-scale b) y-scale)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite=> associate-/r*_binary64 (/.f64 (/.f64 1 -4) a)) (*.f64 (/.f64 x-scale b) y-scale)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (Rewrite=> metadata-eval -1/4) a) (*.f64 (/.f64 x-scale b) y-scale)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 -1/4 a) (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 x-scale y-scale) b))): 39 points increase in error, 48 points decrease in error
      (*.f64 (/.f64 -1/4 a) (/.f64 (Rewrite=> *-commutative_binary64 (*.f64 y-scale x-scale)) b)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= times-frac_binary64 (/.f64 (*.f64 -1/4 (*.f64 y-scale x-scale)) (*.f64 a b))): 44 points increase in error, 37 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 -1/4 (/.f64 (*.f64 y-scale x-scale) (*.f64 a b)))): 1 points increase in error, 0 points decrease in error

    if -3.4999999999999999e-138 < a < 5.00000000000000027e-129 or 7.1999999999999999e236 < a

    1. Initial program 35.3

      \[\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} \cdot \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} - \left(4 \cdot \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}\right) \cdot \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} \]
    2. Taylor expanded in angle around 0 38.2

      \[\leadsto \color{blue}{-4 \cdot \frac{{b}^{2} \cdot {a}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    3. Simplified16.5

      \[\leadsto \color{blue}{-4 \cdot \left(\left(\frac{b}{x-scale} \cdot \frac{b}{x-scale}\right) \cdot \left(\frac{a}{y-scale} \cdot \frac{a}{y-scale}\right)\right)} \]
      Proof
      (*.f64 -4 (*.f64 (*.f64 (/.f64 b x-scale) (/.f64 b x-scale)) (*.f64 (/.f64 a y-scale) (/.f64 a y-scale)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (*.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 b b) (*.f64 x-scale x-scale))) (*.f64 (/.f64 a y-scale) (/.f64 a y-scale)))): 59 points increase in error, 6 points decrease in error
      (*.f64 -4 (*.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2)) (*.f64 x-scale x-scale)) (*.f64 (/.f64 a y-scale) (/.f64 a y-scale)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (*.f64 (/.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 x-scale 2))) (*.f64 (/.f64 a y-scale) (/.f64 a y-scale)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (*.f64 (/.f64 (pow.f64 b 2) (pow.f64 x-scale 2)) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 a a) (*.f64 y-scale y-scale))))): 37 points increase in error, 1 points decrease in error
      (*.f64 -4 (*.f64 (/.f64 (pow.f64 b 2) (pow.f64 x-scale 2)) (/.f64 (*.f64 a a) (Rewrite<= unpow2_binary64 (pow.f64 y-scale 2))))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (pow.f64 b 2) (*.f64 a a)) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2))))): 18 points increase in error, 11 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2))) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2)))): 0 points increase in error, 0 points decrease in error
    4. Taylor expanded in b around 0 38.2

      \[\leadsto -4 \cdot \color{blue}{\frac{{b}^{2} \cdot {a}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    5. Simplified6.4

      \[\leadsto -4 \cdot \color{blue}{{\left(\frac{b}{x-scale} \cdot \frac{a}{y-scale}\right)}^{2}} \]
      Proof
      (pow.f64 (*.f64 (/.f64 b x-scale) (/.f64 a y-scale)) 2): 0 points increase in error, 0 points decrease in error
      (Rewrite=> unpow2_binary64 (*.f64 (*.f64 (/.f64 b x-scale) (/.f64 a y-scale)) (*.f64 (/.f64 b x-scale) (/.f64 a y-scale)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= unswap-sqr_binary64 (*.f64 (*.f64 (/.f64 b x-scale) (/.f64 b x-scale)) (*.f64 (/.f64 a y-scale) (/.f64 a y-scale)))): 61 points increase in error, 35 points decrease in error
      (*.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 b b) (*.f64 x-scale x-scale))) (*.f64 (/.f64 a y-scale) (/.f64 a y-scale))): 50 points increase in error, 15 points decrease in error
      (*.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2)) (*.f64 x-scale x-scale)) (*.f64 (/.f64 a y-scale) (/.f64 a y-scale))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (pow.f64 b 2) (*.f64 x-scale x-scale)) (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 a (/.f64 a y-scale)) y-scale))): 7 points increase in error, 5 points decrease in error
      (*.f64 (/.f64 (pow.f64 b 2) (*.f64 x-scale x-scale)) (/.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 a a) y-scale)) y-scale)): 8 points increase in error, 10 points decrease in error
      (*.f64 (/.f64 (pow.f64 b 2) (*.f64 x-scale x-scale)) (/.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 a 2)) y-scale) y-scale)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (pow.f64 b 2) (*.f64 x-scale x-scale)) (Rewrite<= associate-/r*_binary64 (/.f64 (pow.f64 a 2) (*.f64 y-scale y-scale)))): 24 points increase in error, 1 points decrease in error
      (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (pow.f64 b 2) (pow.f64 a 2)) (*.f64 (*.f64 x-scale x-scale) (*.f64 y-scale y-scale)))): 17 points increase in error, 12 points decrease in error
      (/.f64 (*.f64 (pow.f64 b 2) (pow.f64 a 2)) (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 x-scale 2)) (*.f64 y-scale y-scale))): 0 points increase in error, 0 points decrease in error
      (/.f64 (*.f64 (pow.f64 b 2) (pow.f64 a 2)) (*.f64 (pow.f64 x-scale 2) (Rewrite<= unpow2_binary64 (pow.f64 y-scale 2)))): 0 points increase in error, 0 points decrease in error
    6. Applied egg-rr5.6

      \[\leadsto -4 \cdot {\color{blue}{\left(\frac{\frac{b}{\frac{y-scale}{a}}}{x-scale}\right)}}^{2} \]

    if 5.00000000000000027e-129 < a < 3.10000000000000019e53

    1. Initial program 36.3

      \[\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} \cdot \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} - \left(4 \cdot \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}\right) \cdot \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} \]
    2. Simplified38.9

      \[\leadsto \color{blue}{\frac{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{y-scale \cdot x-scale} \cdot \frac{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{y-scale \cdot x-scale} - \left(4 \cdot \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}\right) \cdot \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}} \]
      Proof
      (-.f64 (*.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2)) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2)))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 6 points increase in error, 4 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2)) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2)))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 8 points increase in error, 2 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale)) (*.f64 (*.f64 4 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) x-scale) x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 3 points increase in error, 19 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale)) (*.f64 (*.f64 4 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) x-scale) x-scale)) (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) y-scale) y-scale)))): 3 points increase in error, 20 points decrease in error
    3. Taylor expanded in angle around 0 32.1

      \[\leadsto \color{blue}{-4 \cdot \frac{{b}^{2} \cdot {a}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Simplified21.3

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot a}{\frac{\left(y-scale \cdot x-scale\right) \cdot \left(y-scale \cdot x-scale\right)}{b \cdot b}}} \]
      Proof
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (*.f64 y-scale x-scale) (*.f64 y-scale x-scale)) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (Rewrite<= unswap-sqr_binary64 (*.f64 (*.f64 y-scale y-scale) (*.f64 x-scale x-scale))) (*.f64 b b)))): 48 points increase in error, 2 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 y-scale 2)) (*.f64 x-scale x-scale)) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 x-scale x-scale) (pow.f64 y-scale 2))) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 x-scale 2)) (pow.f64 y-scale 2)) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2)) (Rewrite<= unpow2_binary64 (pow.f64 b 2))))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 a a) (pow.f64 b 2)) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2))))): 8 points increase in error, 2 points decrease in error
      (*.f64 -4 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 b 2) (*.f64 a a))) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2))) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2)))): 0 points increase in error, 0 points decrease in error
    5. Applied egg-rr14.1

      \[\leadsto -4 \cdot \frac{a \cdot a}{\color{blue}{\frac{y-scale \cdot \left(y-scale \cdot x-scale\right)}{b} \cdot \frac{x-scale}{b}}} \]
    6. Applied egg-rr2.7

      \[\leadsto -4 \cdot \color{blue}{\left(\frac{a}{\frac{y-scale \cdot x-scale}{b}} \cdot \frac{a}{\frac{y-scale \cdot x-scale}{b}}\right)} \]

    if 3.10000000000000019e53 < a < 7.1999999999999999e236

    1. Initial program 55.3

      \[\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} \cdot \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} - \left(4 \cdot \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}\right) \cdot \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} \]
    2. Simplified55.9

      \[\leadsto \color{blue}{\frac{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{y-scale \cdot x-scale} \cdot \frac{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)}{y-scale \cdot x-scale} - \left(4 \cdot \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}\right) \cdot \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}} \]
      Proof
      (-.f64 (*.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2)) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2)))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale)) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (*.f64 b b) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 6 points increase in error, 4 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (Rewrite<= unpow2_binary64 (pow.f64 b 2)) (*.f64 a a))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2)))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (*.f64 y-scale x-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 0 points increase in error, 0 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale))) (*.f64 (*.f64 4 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 x-scale x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 8 points increase in error, 2 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale)) (*.f64 (*.f64 4 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) x-scale) x-scale))) (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) (*.f64 y-scale y-scale)))): 3 points increase in error, 19 points decrease in error
      (-.f64 (*.f64 (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale) (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) x-scale) y-scale)) (*.f64 (*.f64 4 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) x-scale) x-scale)) (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (+.f64 (pow.f64 (*.f64 a (cos.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2) (pow.f64 (*.f64 b (sin.f64 (*.f64 (/.f64 angle 180) (PI.f64)))) 2)) y-scale) y-scale)))): 3 points increase in error, 20 points decrease in error
    3. Taylor expanded in angle around 0 48.9

      \[\leadsto \color{blue}{-4 \cdot \frac{{b}^{2} \cdot {a}^{2}}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    4. Simplified42.4

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot a}{\frac{\left(y-scale \cdot x-scale\right) \cdot \left(y-scale \cdot x-scale\right)}{b \cdot b}}} \]
      Proof
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (*.f64 y-scale x-scale) (*.f64 y-scale x-scale)) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (Rewrite<= unswap-sqr_binary64 (*.f64 (*.f64 y-scale y-scale) (*.f64 x-scale x-scale))) (*.f64 b b)))): 48 points increase in error, 2 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 y-scale 2)) (*.f64 x-scale x-scale)) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 x-scale x-scale) (pow.f64 y-scale 2))) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 x-scale 2)) (pow.f64 y-scale 2)) (*.f64 b b)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 a a) (/.f64 (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2)) (Rewrite<= unpow2_binary64 (pow.f64 b 2))))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 a a) (pow.f64 b 2)) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2))))): 8 points increase in error, 2 points decrease in error
      (*.f64 -4 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 b 2) (*.f64 a a))) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2)))): 0 points increase in error, 0 points decrease in error
      (*.f64 -4 (/.f64 (*.f64 (pow.f64 b 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2))) (*.f64 (pow.f64 x-scale 2) (pow.f64 y-scale 2)))): 0 points increase in error, 0 points decrease in error
    5. Applied egg-rr5.2

      \[\leadsto -4 \cdot \color{blue}{\left(\frac{a}{\frac{y-scale}{\frac{b}{x-scale}}} \cdot \frac{a}{\frac{y-scale}{\frac{b}{x-scale}}}\right)} \]
    6. Applied egg-rr5.4

      \[\leadsto -4 \cdot \left(\frac{a}{\frac{y-scale}{\frac{b}{x-scale}}} \cdot \frac{a}{\color{blue}{\frac{x-scale}{b} \cdot y-scale}}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification5.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{-138}:\\ \;\;\;\;\frac{a \cdot \frac{\frac{b}{y-scale}}{x-scale}}{\left(x-scale \cdot \frac{y-scale}{b}\right) \cdot \frac{-0.25}{a}}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-129}:\\ \;\;\;\;-4 \cdot {\left(\frac{\frac{b}{\frac{y-scale}{a}}}{x-scale}\right)}^{2}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+53}:\\ \;\;\;\;-4 \cdot \left(\frac{a}{\frac{y-scale \cdot x-scale}{b}} \cdot \frac{a}{\frac{y-scale \cdot x-scale}{b}}\right)\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+236}:\\ \;\;\;\;-4 \cdot \left(\frac{a}{\frac{y-scale}{\frac{b}{x-scale}}} \cdot \frac{a}{y-scale \cdot \frac{x-scale}{b}}\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot {\left(\frac{\frac{b}{\frac{y-scale}{a}}}{x-scale}\right)}^{2}\\ \end{array} \]

Alternatives

Alternative 1
Error5.9
Cost7304
\[\begin{array}{l} t_0 := \frac{a}{\frac{y-scale}{\frac{b}{x-scale}}}\\ t_1 := \frac{a \cdot \frac{\frac{b}{y-scale}}{x-scale}}{\left(x-scale \cdot \frac{y-scale}{b}\right) \cdot \frac{-0.25}{a}}\\ t_2 := \frac{b}{x-scale} \cdot \frac{a}{y-scale}\\ \mathbf{if}\;a \leq -2 \cdot 10^{-138}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-258}:\\ \;\;\;\;-4 \cdot {t_2}^{2}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-89}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+200}:\\ \;\;\;\;-4 \cdot \left(t_0 \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{t_2 \cdot \left(a \cdot \frac{b}{x-scale}\right)}{y-scale}\\ \end{array} \]
Alternative 2
Error6.3
Cost1352
\[\begin{array}{l} t_0 := \frac{a}{\frac{y-scale}{\frac{b}{x-scale}}}\\ \mathbf{if}\;a \leq -4.4 \cdot 10^{-138}:\\ \;\;\;\;\frac{a \cdot \frac{\frac{b}{y-scale}}{x-scale}}{\left(x-scale \cdot \frac{y-scale}{b}\right) \cdot \frac{-0.25}{a}}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+202}:\\ \;\;\;\;-4 \cdot \left(t_0 \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{\left(\frac{b}{x-scale} \cdot \frac{a}{y-scale}\right) \cdot \left(a \cdot \frac{b}{x-scale}\right)}{y-scale}\\ \end{array} \]
Alternative 3
Error6.1
Cost1220
\[\begin{array}{l} t_0 := \frac{a}{\frac{y-scale \cdot x-scale}{b}}\\ \mathbf{if}\;y-scale \leq -4.6 \cdot 10^{-169}:\\ \;\;\;\;-4 \cdot \left(t_0 \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(\frac{a}{\frac{y-scale}{\frac{b}{x-scale}}} \cdot \frac{a}{y-scale \cdot \frac{x-scale}{b}}\right)\\ \end{array} \]
Alternative 4
Error19.6
Cost1088
\[-4 \cdot \left(\left(\frac{b}{x-scale} \cdot \frac{b}{x-scale}\right) \cdot \left(\frac{a}{y-scale} \cdot \frac{a}{y-scale}\right)\right) \]
Alternative 5
Error9.4
Cost1088
\[-4 \cdot \left(\left(a \cdot \frac{\frac{b}{y-scale}}{x-scale}\right) \cdot \frac{a}{\frac{y-scale}{\frac{b}{x-scale}}}\right) \]
Alternative 6
Error6.1
Cost1088
\[-4 \cdot \left(\frac{a}{\frac{y-scale}{\frac{b}{x-scale}}} \cdot \frac{a}{y-scale \cdot \frac{x-scale}{b}}\right) \]
Alternative 7
Error6.0
Cost1088
\[\begin{array}{l} t_0 := \frac{a}{\frac{y-scale}{\frac{b}{x-scale}}}\\ -4 \cdot \left(t_0 \cdot t_0\right) \end{array} \]

Error

Reproduce

herbie shell --seed 2022335 
(FPCore (a b angle x-scale y-scale)
  :name "Simplification of discriminant from scale-rotated-ellipse"
  :precision binary64
  (- (* (/ (/ (* (* (* 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 (- (pow b 2.0) (pow a 2.0))) (sin (* (/ angle 180.0) PI))) (cos (* (/ angle 180.0) PI))) x-scale) y-scale)) (* (* 4.0 (/ (/ (+ (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))))