Average Error: 41.1 → 26.2
Time: 1.8min
Precision: binary64
\[\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 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := {\left(a \cdot b\right)}^{2}\\ t_2 := \cos t_0\\ t_3 := \sin t_0\\ t_4 := \mathsf{fma}\left(4, \frac{{t_2}^{4} \cdot t_1}{y-scale \cdot y-scale}, \mathsf{fma}\left(4, \frac{t_1 \cdot {t_3}^{4}}{y-scale \cdot y-scale}, 8 \cdot \left({\left(\left(t_2 \cdot a\right) \cdot \left(b \cdot t_3\right)\right)}^{2} \cdot {y-scale}^{-2}\right)\right)\right)\\ \mathbf{if}\;y-scale \leq -1.1813850436860082 \cdot 10^{+159}:\\ \;\;\;\;0\\ \mathbf{elif}\;y-scale \leq -1.2055991195742165 \cdot 10^{-154}:\\ \;\;\;\;-{\left(\frac{x-scale \cdot x-scale}{t_4}\right)}^{-1}\\ \mathbf{elif}\;y-scale \leq 1.0490117072824621 \cdot 10^{-144}:\\ \;\;\;\;0\\ \mathbf{elif}\;y-scale \leq 4.144448978699342 \cdot 10^{+153}:\\ \;\;\;\;-{\left(\left(x-scale \cdot x-scale\right) \cdot \frac{1}{t_4}\right)}^{-1}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
\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 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := {\left(a \cdot b\right)}^{2}\\
t_2 := \cos t_0\\
t_3 := \sin t_0\\
t_4 := \mathsf{fma}\left(4, \frac{{t_2}^{4} \cdot t_1}{y-scale \cdot y-scale}, \mathsf{fma}\left(4, \frac{t_1 \cdot {t_3}^{4}}{y-scale \cdot y-scale}, 8 \cdot \left({\left(\left(t_2 \cdot a\right) \cdot \left(b \cdot t_3\right)\right)}^{2} \cdot {y-scale}^{-2}\right)\right)\right)\\
\mathbf{if}\;y-scale \leq -1.1813850436860082 \cdot 10^{+159}:\\
\;\;\;\;0\\

\mathbf{elif}\;y-scale \leq -1.2055991195742165 \cdot 10^{-154}:\\
\;\;\;\;-{\left(\frac{x-scale \cdot x-scale}{t_4}\right)}^{-1}\\

\mathbf{elif}\;y-scale \leq 1.0490117072824621 \cdot 10^{-144}:\\
\;\;\;\;0\\

\mathbf{elif}\;y-scale \leq 4.144448978699342 \cdot 10^{+153}:\\
\;\;\;\;-{\left(\left(x-scale \cdot x-scale\right) \cdot \frac{1}{t_4}\right)}^{-1}\\

\mathbf{else}:\\
\;\;\;\;0\\


\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 (* 0.005555555555555556 (* angle PI)))
        (t_1 (pow (* a b) 2.0))
        (t_2 (cos t_0))
        (t_3 (sin t_0))
        (t_4
         (fma
          4.0
          (/ (* (pow t_2 4.0) t_1) (* y-scale y-scale))
          (fma
           4.0
           (/ (* t_1 (pow t_3 4.0)) (* y-scale y-scale))
           (* 8.0 (* (pow (* (* t_2 a) (* b t_3)) 2.0) (pow y-scale -2.0)))))))
   (if (<= y-scale -1.1813850436860082e+159)
     0.0
     (if (<= y-scale -1.2055991195742165e-154)
       (- (pow (/ (* x-scale x-scale) t_4) -1.0))
       (if (<= y-scale 1.0490117072824621e-144)
         0.0
         (if (<= y-scale 4.144448978699342e+153)
           (- (pow (* (* x-scale x-scale) (/ 1.0 t_4)) -1.0))
           0.0))))))
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 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = pow((a * b), 2.0);
	double t_2 = cos(t_0);
	double t_3 = sin(t_0);
	double t_4 = fma(4.0, ((pow(t_2, 4.0) * t_1) / (y_45_scale * y_45_scale)), fma(4.0, ((t_1 * pow(t_3, 4.0)) / (y_45_scale * y_45_scale)), (8.0 * (pow(((t_2 * a) * (b * t_3)), 2.0) * pow(y_45_scale, -2.0)))));
	double tmp;
	if (y_45_scale <= -1.1813850436860082e+159) {
		tmp = 0.0;
	} else if (y_45_scale <= -1.2055991195742165e-154) {
		tmp = -pow(((x_45_scale * x_45_scale) / t_4), -1.0);
	} else if (y_45_scale <= 1.0490117072824621e-144) {
		tmp = 0.0;
	} else if (y_45_scale <= 4.144448978699342e+153) {
		tmp = -pow(((x_45_scale * x_45_scale) * (1.0 / t_4)), -1.0);
	} else {
		tmp = 0.0;
	}
	return tmp;
}

Error

Bits error versus a

Bits error versus b

Bits error versus angle

Bits error versus x-scale

Bits error versus y-scale

Derivation

  1. Split input into 3 regimes
  2. if y-scale < -1.1813850436860082e159 or -1.20559911957421654e-154 < y-scale < 1.0490117072824621e-144 or 4.1444489786993417e153 < y-scale

    1. Initial program 41.7

      \[\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 b around 0 44.3

      \[\leadsto \color{blue}{4 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left({a}^{4} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{{y-scale}^{2} \cdot {x-scale}^{2}} - 4 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left({a}^{4} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}\right)}{{x-scale}^{2} \cdot {y-scale}^{2}}} \]
    3. Simplified29.0

      \[\leadsto \color{blue}{0} \]

    if -1.1813850436860082e159 < y-scale < -1.20559911957421654e-154

    1. Initial program 40.8

      \[\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 x-scale around 0 35.0

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

      \[\leadsto \color{blue}{-\frac{\mathsf{fma}\left(4, \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4} \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot b\right)\right)}{y-scale \cdot y-scale}, \mathsf{fma}\left(4, \frac{\left(a \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4}\right)}{y-scale \cdot y-scale}, 8 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left(\left(a \cdot a\right) \cdot \left({\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left(b \cdot b\right)\right)\right)}{y-scale \cdot y-scale}\right)\right)}{x-scale \cdot x-scale}} \]
    4. Applied egg-rr32.4

      \[\leadsto -\color{blue}{{\left(\frac{x-scale \cdot x-scale}{\mathsf{fma}\left(4, \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4} \cdot {\left(a \cdot b\right)}^{2}}{y-scale \cdot y-scale}, \mathsf{fma}\left(4, \frac{{\left(a \cdot b\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4}}{y-scale \cdot y-scale}, 8 \cdot \left(\left({\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot a\right)}^{2} \cdot {\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}\right) \cdot {y-scale}^{-2}\right)\right)\right)}\right)}^{-1}} \]
    5. Applied egg-rr25.1

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

    if 1.0490117072824621e-144 < y-scale < 4.1444489786993417e153

    1. Initial program 40.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. Taylor expanded in x-scale around 0 32.7

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

      \[\leadsto \color{blue}{-\frac{\mathsf{fma}\left(4, \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4} \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot b\right)\right)}{y-scale \cdot y-scale}, \mathsf{fma}\left(4, \frac{\left(a \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4}\right)}{y-scale \cdot y-scale}, 8 \cdot \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left(\left(a \cdot a\right) \cdot \left({\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2} \cdot \left(b \cdot b\right)\right)\right)}{y-scale \cdot y-scale}\right)\right)}{x-scale \cdot x-scale}} \]
    4. Applied egg-rr29.9

      \[\leadsto -\color{blue}{{\left(\frac{x-scale \cdot x-scale}{\mathsf{fma}\left(4, \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4} \cdot {\left(a \cdot b\right)}^{2}}{y-scale \cdot y-scale}, \mathsf{fma}\left(4, \frac{{\left(a \cdot b\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4}}{y-scale \cdot y-scale}, 8 \cdot \left(\left({\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot a\right)}^{2} \cdot {\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}\right) \cdot {y-scale}^{-2}\right)\right)\right)}\right)}^{-1}} \]
    5. Applied egg-rr22.0

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y-scale \leq -1.1813850436860082 \cdot 10^{+159}:\\ \;\;\;\;0\\ \mathbf{elif}\;y-scale \leq -1.2055991195742165 \cdot 10^{-154}:\\ \;\;\;\;-{\left(\frac{x-scale \cdot x-scale}{\mathsf{fma}\left(4, \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4} \cdot {\left(a \cdot b\right)}^{2}}{y-scale \cdot y-scale}, \mathsf{fma}\left(4, \frac{{\left(a \cdot b\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4}}{y-scale \cdot y-scale}, 8 \cdot \left({\left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot a\right) \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)}^{2} \cdot {y-scale}^{-2}\right)\right)\right)}\right)}^{-1}\\ \mathbf{elif}\;y-scale \leq 1.0490117072824621 \cdot 10^{-144}:\\ \;\;\;\;0\\ \mathbf{elif}\;y-scale \leq 4.144448978699342 \cdot 10^{+153}:\\ \;\;\;\;-{\left(\left(x-scale \cdot x-scale\right) \cdot \frac{1}{\mathsf{fma}\left(4, \frac{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4} \cdot {\left(a \cdot b\right)}^{2}}{y-scale \cdot y-scale}, \mathsf{fma}\left(4, \frac{{\left(a \cdot b\right)}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{4}}{y-scale \cdot y-scale}, 8 \cdot \left({\left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot a\right) \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)}^{2} \cdot {y-scale}^{-2}\right)\right)\right)}\right)}^{-1}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]

Reproduce

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