Anisotropic x16 LOD (ratio of anisotropy)

Percentage Accurate: 97.8% → 97.5%
Time: 1.6min
Alternatives: 14
Speedup: N/A×

Specification

?
\[\left(\left(\left(\left(\left(\left(1 \leq w \land w \leq 16384\right) \land \left(1 \leq h \land h \leq 16384\right)\right) \land \left(10^{-20} \leq \left|dX.u\right| \land \left|dX.u\right| \leq 10^{+20}\right)\right) \land \left(10^{-20} \leq \left|dX.v\right| \land \left|dX.v\right| \leq 10^{+20}\right)\right) \land \left(10^{-20} \leq \left|dY.u\right| \land \left|dY.u\right| \leq 10^{+20}\right)\right) \land \left(10^{-20} \leq \left|dY.v\right| \land \left|dY.v\right| \leq 10^{+20}\right)\right) \land maxAniso = 16\]
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_2 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_3 := \left\lfloorw\right\rfloor \cdot dX.u\\ t_4 := \mathsf{max}\left(t\_3 \cdot t\_3 + t\_0 \cdot t\_0, t\_2 \cdot t\_2 + t\_1 \cdot t\_1\right)\\ t_5 := \sqrt{t\_4}\\ t_6 := \left|t\_3 \cdot t\_1 - t\_0 \cdot t\_2\right|\\ t_7 := \frac{t\_4}{t\_6}\\ t_8 := t\_7 > \left\lfloormaxAniso\right\rfloor\\ t_9 := \begin{array}{l} \mathbf{if}\;t\_8:\\ \;\;\;\;\frac{t\_5}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_6}{t\_5}\\ \end{array}\\ t_10 := \begin{array}{l} \mathbf{if}\;t\_8:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array}\\ \mathbf{if}\;t\_9 < 1:\\ \;\;\;\;\mathsf{max}\left(1, t\_10 \cdot t\_9\right)\\ \mathbf{else}:\\ \;\;\;\;t\_10\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (* (floor h) dX.v))
        (t_1 (* (floor h) dY.v))
        (t_2 (* (floor w) dY.u))
        (t_3 (* (floor w) dX.u))
        (t_4 (fmax (+ (* t_3 t_3) (* t_0 t_0)) (+ (* t_2 t_2) (* t_1 t_1))))
        (t_5 (sqrt t_4))
        (t_6 (fabs (- (* t_3 t_1) (* t_0 t_2))))
        (t_7 (/ t_4 t_6))
        (t_8 (> t_7 (floor maxAniso)))
        (t_9 (if t_8 (/ t_5 (floor maxAniso)) (/ t_6 t_5)))
        (t_10 (if t_8 (floor maxAniso) t_7)))
   (if (< t_9 1.0) (fmax 1.0 (* t_10 t_9)) t_10)))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = floorf(h) * dX_46_v;
	float t_1 = floorf(h) * dY_46_v;
	float t_2 = floorf(w) * dY_46_u;
	float t_3 = floorf(w) * dX_46_u;
	float t_4 = fmaxf(((t_3 * t_3) + (t_0 * t_0)), ((t_2 * t_2) + (t_1 * t_1)));
	float t_5 = sqrtf(t_4);
	float t_6 = fabsf(((t_3 * t_1) - (t_0 * t_2)));
	float t_7 = t_4 / t_6;
	int t_8 = t_7 > floorf(maxAniso);
	float tmp;
	if (t_8) {
		tmp = t_5 / floorf(maxAniso);
	} else {
		tmp = t_6 / t_5;
	}
	float t_9 = tmp;
	float tmp_1;
	if (t_8) {
		tmp_1 = floorf(maxAniso);
	} else {
		tmp_1 = t_7;
	}
	float t_10 = tmp_1;
	float tmp_2;
	if (t_9 < 1.0f) {
		tmp_2 = fmaxf(1.0f, (t_10 * t_9));
	} else {
		tmp_2 = t_10;
	}
	return tmp_2;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(floor(h) * dX_46_v)
	t_1 = Float32(floor(h) * dY_46_v)
	t_2 = Float32(floor(w) * dY_46_u)
	t_3 = Float32(floor(w) * dX_46_u)
	t_4 = (Float32(Float32(t_3 * t_3) + Float32(t_0 * t_0)) != Float32(Float32(t_3 * t_3) + Float32(t_0 * t_0))) ? Float32(Float32(t_2 * t_2) + Float32(t_1 * t_1)) : ((Float32(Float32(t_2 * t_2) + Float32(t_1 * t_1)) != Float32(Float32(t_2 * t_2) + Float32(t_1 * t_1))) ? Float32(Float32(t_3 * t_3) + Float32(t_0 * t_0)) : max(Float32(Float32(t_3 * t_3) + Float32(t_0 * t_0)), Float32(Float32(t_2 * t_2) + Float32(t_1 * t_1))))
	t_5 = sqrt(t_4)
	t_6 = abs(Float32(Float32(t_3 * t_1) - Float32(t_0 * t_2)))
	t_7 = Float32(t_4 / t_6)
	t_8 = t_7 > floor(maxAniso)
	tmp = Float32(0.0)
	if (t_8)
		tmp = Float32(t_5 / floor(maxAniso));
	else
		tmp = Float32(t_6 / t_5);
	end
	t_9 = tmp
	tmp_1 = Float32(0.0)
	if (t_8)
		tmp_1 = floor(maxAniso);
	else
		tmp_1 = t_7;
	end
	t_10 = tmp_1
	tmp_2 = Float32(0.0)
	if (t_9 < Float32(1.0))
		tmp_2 = (Float32(1.0) != Float32(1.0)) ? Float32(t_10 * t_9) : ((Float32(t_10 * t_9) != Float32(t_10 * t_9)) ? Float32(1.0) : max(Float32(1.0), Float32(t_10 * t_9)));
	else
		tmp_2 = t_10;
	end
	return tmp_2
end
function tmp_4 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = floor(h) * dX_46_v;
	t_1 = floor(h) * dY_46_v;
	t_2 = floor(w) * dY_46_u;
	t_3 = floor(w) * dX_46_u;
	t_4 = max(((t_3 * t_3) + (t_0 * t_0)), ((t_2 * t_2) + (t_1 * t_1)));
	t_5 = sqrt(t_4);
	t_6 = abs(((t_3 * t_1) - (t_0 * t_2)));
	t_7 = t_4 / t_6;
	t_8 = t_7 > floor(maxAniso);
	tmp = single(0.0);
	if (t_8)
		tmp = t_5 / floor(maxAniso);
	else
		tmp = t_6 / t_5;
	end
	t_9 = tmp;
	tmp_2 = single(0.0);
	if (t_8)
		tmp_2 = floor(maxAniso);
	else
		tmp_2 = t_7;
	end
	t_10 = tmp_2;
	tmp_3 = single(0.0);
	if (t_9 < single(1.0))
		tmp_3 = max(single(1.0), (t_10 * t_9));
	else
		tmp_3 = t_10;
	end
	tmp_4 = tmp_3;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left\lfloorh\right\rfloor \cdot dX.v\\
t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_2 := \left\lfloorw\right\rfloor \cdot dY.u\\
t_3 := \left\lfloorw\right\rfloor \cdot dX.u\\
t_4 := \mathsf{max}\left(t\_3 \cdot t\_3 + t\_0 \cdot t\_0, t\_2 \cdot t\_2 + t\_1 \cdot t\_1\right)\\
t_5 := \sqrt{t\_4}\\
t_6 := \left|t\_3 \cdot t\_1 - t\_0 \cdot t\_2\right|\\
t_7 := \frac{t\_4}{t\_6}\\
t_8 := t\_7 > \left\lfloormaxAniso\right\rfloor\\
t_9 := \begin{array}{l}
\mathbf{if}\;t\_8:\\
\;\;\;\;\frac{t\_5}{\left\lfloormaxAniso\right\rfloor}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_6}{t\_5}\\


\end{array}\\
t_10 := \begin{array}{l}
\mathbf{if}\;t\_8:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array}\\
\mathbf{if}\;t\_9 < 1:\\
\;\;\;\;\mathsf{max}\left(1, t\_10 \cdot t\_9\right)\\

\mathbf{else}:\\
\;\;\;\;t\_10\\


\end{array}
\end{array}

Sampling outcomes in binary32 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 97.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_2 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_3 := \left\lfloorw\right\rfloor \cdot dX.u\\ t_4 := \mathsf{max}\left(t\_3 \cdot t\_3 + t\_0 \cdot t\_0, t\_2 \cdot t\_2 + t\_1 \cdot t\_1\right)\\ t_5 := \sqrt{t\_4}\\ t_6 := \left|t\_3 \cdot t\_1 - t\_0 \cdot t\_2\right|\\ t_7 := \frac{t\_4}{t\_6}\\ t_8 := t\_7 > \left\lfloormaxAniso\right\rfloor\\ t_9 := \begin{array}{l} \mathbf{if}\;t\_8:\\ \;\;\;\;\frac{t\_5}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_6}{t\_5}\\ \end{array}\\ t_10 := \begin{array}{l} \mathbf{if}\;t\_8:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array}\\ \mathbf{if}\;t\_9 < 1:\\ \;\;\;\;\mathsf{max}\left(1, t\_10 \cdot t\_9\right)\\ \mathbf{else}:\\ \;\;\;\;t\_10\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (* (floor h) dX.v))
        (t_1 (* (floor h) dY.v))
        (t_2 (* (floor w) dY.u))
        (t_3 (* (floor w) dX.u))
        (t_4 (fmax (+ (* t_3 t_3) (* t_0 t_0)) (+ (* t_2 t_2) (* t_1 t_1))))
        (t_5 (sqrt t_4))
        (t_6 (fabs (- (* t_3 t_1) (* t_0 t_2))))
        (t_7 (/ t_4 t_6))
        (t_8 (> t_7 (floor maxAniso)))
        (t_9 (if t_8 (/ t_5 (floor maxAniso)) (/ t_6 t_5)))
        (t_10 (if t_8 (floor maxAniso) t_7)))
   (if (< t_9 1.0) (fmax 1.0 (* t_10 t_9)) t_10)))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = floorf(h) * dX_46_v;
	float t_1 = floorf(h) * dY_46_v;
	float t_2 = floorf(w) * dY_46_u;
	float t_3 = floorf(w) * dX_46_u;
	float t_4 = fmaxf(((t_3 * t_3) + (t_0 * t_0)), ((t_2 * t_2) + (t_1 * t_1)));
	float t_5 = sqrtf(t_4);
	float t_6 = fabsf(((t_3 * t_1) - (t_0 * t_2)));
	float t_7 = t_4 / t_6;
	int t_8 = t_7 > floorf(maxAniso);
	float tmp;
	if (t_8) {
		tmp = t_5 / floorf(maxAniso);
	} else {
		tmp = t_6 / t_5;
	}
	float t_9 = tmp;
	float tmp_1;
	if (t_8) {
		tmp_1 = floorf(maxAniso);
	} else {
		tmp_1 = t_7;
	}
	float t_10 = tmp_1;
	float tmp_2;
	if (t_9 < 1.0f) {
		tmp_2 = fmaxf(1.0f, (t_10 * t_9));
	} else {
		tmp_2 = t_10;
	}
	return tmp_2;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(floor(h) * dX_46_v)
	t_1 = Float32(floor(h) * dY_46_v)
	t_2 = Float32(floor(w) * dY_46_u)
	t_3 = Float32(floor(w) * dX_46_u)
	t_4 = (Float32(Float32(t_3 * t_3) + Float32(t_0 * t_0)) != Float32(Float32(t_3 * t_3) + Float32(t_0 * t_0))) ? Float32(Float32(t_2 * t_2) + Float32(t_1 * t_1)) : ((Float32(Float32(t_2 * t_2) + Float32(t_1 * t_1)) != Float32(Float32(t_2 * t_2) + Float32(t_1 * t_1))) ? Float32(Float32(t_3 * t_3) + Float32(t_0 * t_0)) : max(Float32(Float32(t_3 * t_3) + Float32(t_0 * t_0)), Float32(Float32(t_2 * t_2) + Float32(t_1 * t_1))))
	t_5 = sqrt(t_4)
	t_6 = abs(Float32(Float32(t_3 * t_1) - Float32(t_0 * t_2)))
	t_7 = Float32(t_4 / t_6)
	t_8 = t_7 > floor(maxAniso)
	tmp = Float32(0.0)
	if (t_8)
		tmp = Float32(t_5 / floor(maxAniso));
	else
		tmp = Float32(t_6 / t_5);
	end
	t_9 = tmp
	tmp_1 = Float32(0.0)
	if (t_8)
		tmp_1 = floor(maxAniso);
	else
		tmp_1 = t_7;
	end
	t_10 = tmp_1
	tmp_2 = Float32(0.0)
	if (t_9 < Float32(1.0))
		tmp_2 = (Float32(1.0) != Float32(1.0)) ? Float32(t_10 * t_9) : ((Float32(t_10 * t_9) != Float32(t_10 * t_9)) ? Float32(1.0) : max(Float32(1.0), Float32(t_10 * t_9)));
	else
		tmp_2 = t_10;
	end
	return tmp_2
end
function tmp_4 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = floor(h) * dX_46_v;
	t_1 = floor(h) * dY_46_v;
	t_2 = floor(w) * dY_46_u;
	t_3 = floor(w) * dX_46_u;
	t_4 = max(((t_3 * t_3) + (t_0 * t_0)), ((t_2 * t_2) + (t_1 * t_1)));
	t_5 = sqrt(t_4);
	t_6 = abs(((t_3 * t_1) - (t_0 * t_2)));
	t_7 = t_4 / t_6;
	t_8 = t_7 > floor(maxAniso);
	tmp = single(0.0);
	if (t_8)
		tmp = t_5 / floor(maxAniso);
	else
		tmp = t_6 / t_5;
	end
	t_9 = tmp;
	tmp_2 = single(0.0);
	if (t_8)
		tmp_2 = floor(maxAniso);
	else
		tmp_2 = t_7;
	end
	t_10 = tmp_2;
	tmp_3 = single(0.0);
	if (t_9 < single(1.0))
		tmp_3 = max(single(1.0), (t_10 * t_9));
	else
		tmp_3 = t_10;
	end
	tmp_4 = tmp_3;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left\lfloorh\right\rfloor \cdot dX.v\\
t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_2 := \left\lfloorw\right\rfloor \cdot dY.u\\
t_3 := \left\lfloorw\right\rfloor \cdot dX.u\\
t_4 := \mathsf{max}\left(t\_3 \cdot t\_3 + t\_0 \cdot t\_0, t\_2 \cdot t\_2 + t\_1 \cdot t\_1\right)\\
t_5 := \sqrt{t\_4}\\
t_6 := \left|t\_3 \cdot t\_1 - t\_0 \cdot t\_2\right|\\
t_7 := \frac{t\_4}{t\_6}\\
t_8 := t\_7 > \left\lfloormaxAniso\right\rfloor\\
t_9 := \begin{array}{l}
\mathbf{if}\;t\_8:\\
\;\;\;\;\frac{t\_5}{\left\lfloormaxAniso\right\rfloor}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_6}{t\_5}\\


\end{array}\\
t_10 := \begin{array}{l}
\mathbf{if}\;t\_8:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array}\\
\mathbf{if}\;t\_9 < 1:\\
\;\;\;\;\mathsf{max}\left(1, t\_10 \cdot t\_9\right)\\

\mathbf{else}:\\
\;\;\;\;t\_10\\


\end{array}
\end{array}

Alternative 1: 97.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := dX.u \cdot dY.v - dX.v \cdot dY.u\\ t_1 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\ t_2 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_3 := \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot t\_0\right)\right|\\ t_4 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_5 := \mathsf{max}\left(t\_2, {\left(\mathsf{hypot}\left(t\_4, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\ t_6 := \sqrt{t\_5}\\ t_7 := \frac{t\_5}{t\_3} > \left\lfloormaxAniso\right\rfloor\\ t_8 := \begin{array}{l} \mathbf{if}\;t\_7:\\ \;\;\;\;\frac{t\_6}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;t\_3 \cdot \frac{1}{t\_6}\\ \end{array}\\ \mathbf{if}\;t\_8 < 1:\\ \;\;\;\;\mathsf{max}\left(1, t\_8 \cdot \begin{array}{l} \mathbf{if}\;t\_7:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(t\_2, {t\_4}^{2}\right)}{t\_3}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{t\_5}{\left|\left(dX.u \cdot dY.v\right) \cdot t\_1\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\left|t\_0 \cdot t\_1\right|}{t\_5}\right)}^{-1}\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (- (* dX.u dY.v) (* dX.v dY.u)))
        (t_1 (* (floor w) (floor h)))
        (t_2 (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0))
        (t_3 (fabs (* (floor w) (* (floor h) t_0))))
        (t_4 (* (floor w) dY.u))
        (t_5 (fmax t_2 (pow (hypot t_4 (* (floor h) dY.v)) 2.0)))
        (t_6 (sqrt t_5))
        (t_7 (> (/ t_5 t_3) (floor maxAniso)))
        (t_8 (if t_7 (/ t_6 (floor maxAniso)) (* t_3 (/ 1.0 t_6)))))
   (if (< t_8 1.0)
     (fmax
      1.0
      (* t_8 (if t_7 (floor maxAniso) (/ (fmax t_2 (pow t_4 2.0)) t_3))))
     (if (> (/ t_5 (fabs (* (* dX.u dY.v) t_1))) (floor maxAniso))
       (floor maxAniso)
       (pow (/ (fabs (* t_0 t_1)) t_5) -1.0)))))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	float t_1 = floorf(w) * floorf(h);
	float t_2 = powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f);
	float t_3 = fabsf((floorf(w) * (floorf(h) * t_0)));
	float t_4 = floorf(w) * dY_46_u;
	float t_5 = fmaxf(t_2, powf(hypotf(t_4, (floorf(h) * dY_46_v)), 2.0f));
	float t_6 = sqrtf(t_5);
	int t_7 = (t_5 / t_3) > floorf(maxAniso);
	float tmp;
	if (t_7) {
		tmp = t_6 / floorf(maxAniso);
	} else {
		tmp = t_3 * (1.0f / t_6);
	}
	float t_8 = tmp;
	float tmp_2;
	if (t_8 < 1.0f) {
		float tmp_3;
		if (t_7) {
			tmp_3 = floorf(maxAniso);
		} else {
			tmp_3 = fmaxf(t_2, powf(t_4, 2.0f)) / t_3;
		}
		tmp_2 = fmaxf(1.0f, (t_8 * tmp_3));
	} else if ((t_5 / fabsf(((dX_46_u * dY_46_v) * t_1))) > floorf(maxAniso)) {
		tmp_2 = floorf(maxAniso);
	} else {
		tmp_2 = powf((fabsf((t_0 * t_1)) / t_5), -1.0f);
	}
	return tmp_2;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u))
	t_1 = Float32(floor(w) * floor(h))
	t_2 = hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_3 = abs(Float32(floor(w) * Float32(floor(h) * t_0)))
	t_4 = Float32(floor(w) * dY_46_u)
	t_5 = (t_2 != t_2) ? (hypot(t_4, Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) : (((hypot(t_4, Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) != (hypot(t_4, Float32(floor(h) * dY_46_v)) ^ Float32(2.0))) ? t_2 : max(t_2, (hypot(t_4, Float32(floor(h) * dY_46_v)) ^ Float32(2.0))))
	t_6 = sqrt(t_5)
	t_7 = Float32(t_5 / t_3) > floor(maxAniso)
	tmp = Float32(0.0)
	if (t_7)
		tmp = Float32(t_6 / floor(maxAniso));
	else
		tmp = Float32(t_3 * Float32(Float32(1.0) / t_6));
	end
	t_8 = tmp
	tmp_2 = Float32(0.0)
	if (t_8 < Float32(1.0))
		tmp_3 = Float32(0.0)
		if (t_7)
			tmp_3 = floor(maxAniso);
		else
			tmp_3 = Float32(((t_2 != t_2) ? (t_4 ^ Float32(2.0)) : (((t_4 ^ Float32(2.0)) != (t_4 ^ Float32(2.0))) ? t_2 : max(t_2, (t_4 ^ Float32(2.0))))) / t_3);
		end
		tmp_2 = (Float32(1.0) != Float32(1.0)) ? Float32(t_8 * tmp_3) : ((Float32(t_8 * tmp_3) != Float32(t_8 * tmp_3)) ? Float32(1.0) : max(Float32(1.0), Float32(t_8 * tmp_3)));
	elseif (Float32(t_5 / abs(Float32(Float32(dX_46_u * dY_46_v) * t_1))) > floor(maxAniso))
		tmp_2 = floor(maxAniso);
	else
		tmp_2 = Float32(abs(Float32(t_0 * t_1)) / t_5) ^ Float32(-1.0);
	end
	return tmp_2
end
function tmp_5 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	t_1 = floor(w) * floor(h);
	t_2 = hypot((dX_46_u * floor(w)), (dX_46_v * floor(h))) ^ single(2.0);
	t_3 = abs((floor(w) * (floor(h) * t_0)));
	t_4 = floor(w) * dY_46_u;
	t_5 = max(t_2, (hypot(t_4, (floor(h) * dY_46_v)) ^ single(2.0)));
	t_6 = sqrt(t_5);
	t_7 = (t_5 / t_3) > floor(maxAniso);
	tmp = single(0.0);
	if (t_7)
		tmp = t_6 / floor(maxAniso);
	else
		tmp = t_3 * (single(1.0) / t_6);
	end
	t_8 = tmp;
	tmp_3 = single(0.0);
	if (t_8 < single(1.0))
		tmp_4 = single(0.0);
		if (t_7)
			tmp_4 = floor(maxAniso);
		else
			tmp_4 = max(t_2, (t_4 ^ single(2.0))) / t_3;
		end
		tmp_3 = max(single(1.0), (t_8 * tmp_4));
	elseif ((t_5 / abs(((dX_46_u * dY_46_v) * t_1))) > floor(maxAniso))
		tmp_3 = floor(maxAniso);
	else
		tmp_3 = (abs((t_0 * t_1)) / t_5) ^ single(-1.0);
	end
	tmp_5 = tmp_3;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := dX.u \cdot dY.v - dX.v \cdot dY.u\\
t_1 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\
t_2 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_3 := \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot t\_0\right)\right|\\
t_4 := \left\lfloorw\right\rfloor \cdot dY.u\\
t_5 := \mathsf{max}\left(t\_2, {\left(\mathsf{hypot}\left(t\_4, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\
t_6 := \sqrt{t\_5}\\
t_7 := \frac{t\_5}{t\_3} > \left\lfloormaxAniso\right\rfloor\\
t_8 := \begin{array}{l}
\mathbf{if}\;t\_7:\\
\;\;\;\;\frac{t\_6}{\left\lfloormaxAniso\right\rfloor}\\

\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \frac{1}{t\_6}\\


\end{array}\\
\mathbf{if}\;t\_8 < 1:\\
\;\;\;\;\mathsf{max}\left(1, t\_8 \cdot \begin{array}{l}
\mathbf{if}\;t\_7:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{max}\left(t\_2, {t\_4}^{2}\right)}{t\_3}\\


\end{array}\right)\\

\mathbf{elif}\;\frac{t\_5}{\left|\left(dX.u \cdot dY.v\right) \cdot t\_1\right|} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;{\left(\frac{\left|t\_0 \cdot t\_1\right|}{t\_5}\right)}^{-1}\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in dX.u around inf 98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\color{blue}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  4. Step-by-step derivation
    1. associate-*r*98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\color{blue}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)}\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
    2. *-commutative98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
    3. *-commutative98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  5. Simplified98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  6. Taylor expanded in w around 0 98.5%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  7. Simplified98.5%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ } \end{array}} \]
  8. Taylor expanded in dY.u around inf 98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
  9. Step-by-step derivation
    1. *-commutative98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    2. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot {dY.u}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    3. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dY.u \cdot dY.u\right)\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    4. swap-sqr98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    5. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
  10. Simplified98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
  11. Step-by-step derivation
    1. clear-num98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array} \]
    2. inv-pow98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{-1}\\ \end{array} \]
    3. associate-*r*98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right|}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{-1}\\ \end{array} \]
    4. *-commutative98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\left|\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right|}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{-1}\\ \end{array} \]
  12. Applied egg-rr98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\left|\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right|}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{-1}\\ \end{array} \]
  13. Final simplification98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right| \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right| \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\left|\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right|}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{-1}\\ \end{array} \]
  14. Add Preprocessing

Alternative 2: 97.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_1 := \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ t_2 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_3 := \mathsf{max}\left(t\_0, {\left(\mathsf{hypot}\left(t\_2, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\ t_4 := \sqrt{t\_3}\\ t_5 := \frac{t\_3}{t\_1}\\ t_6 := t\_5 > \left\lfloormaxAniso\right\rfloor\\ t_7 := \begin{array}{l} \mathbf{if}\;t\_6:\\ \;\;\;\;\frac{t\_4}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \frac{1}{t\_4}\\ \end{array}\\ \mathbf{if}\;t\_7 < 1:\\ \;\;\;\;\mathsf{max}\left(1, t\_7 \cdot \begin{array}{l} \mathbf{if}\;t\_6:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(t\_0, {t\_2}^{2}\right)}{t\_1}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{t\_3}{\left|\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0))
        (t_1
         (fabs (* (floor w) (* (floor h) (- (* dX.u dY.v) (* dX.v dY.u))))))
        (t_2 (* (floor w) dY.u))
        (t_3 (fmax t_0 (pow (hypot t_2 (* (floor h) dY.v)) 2.0)))
        (t_4 (sqrt t_3))
        (t_5 (/ t_3 t_1))
        (t_6 (> t_5 (floor maxAniso)))
        (t_7 (if t_6 (/ t_4 (floor maxAniso)) (* t_1 (/ 1.0 t_4)))))
   (if (< t_7 1.0)
     (fmax
      1.0
      (* t_7 (if t_6 (floor maxAniso) (/ (fmax t_0 (pow t_2 2.0)) t_1))))
     (if (>
          (/ t_3 (fabs (* (* dX.u dY.v) (* (floor w) (floor h)))))
          (floor maxAniso))
       (floor maxAniso)
       t_5))))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f);
	float t_1 = fabsf((floorf(w) * (floorf(h) * ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)))));
	float t_2 = floorf(w) * dY_46_u;
	float t_3 = fmaxf(t_0, powf(hypotf(t_2, (floorf(h) * dY_46_v)), 2.0f));
	float t_4 = sqrtf(t_3);
	float t_5 = t_3 / t_1;
	int t_6 = t_5 > floorf(maxAniso);
	float tmp;
	if (t_6) {
		tmp = t_4 / floorf(maxAniso);
	} else {
		tmp = t_1 * (1.0f / t_4);
	}
	float t_7 = tmp;
	float tmp_2;
	if (t_7 < 1.0f) {
		float tmp_3;
		if (t_6) {
			tmp_3 = floorf(maxAniso);
		} else {
			tmp_3 = fmaxf(t_0, powf(t_2, 2.0f)) / t_1;
		}
		tmp_2 = fmaxf(1.0f, (t_7 * tmp_3));
	} else if ((t_3 / fabsf(((dX_46_u * dY_46_v) * (floorf(w) * floorf(h))))) > floorf(maxAniso)) {
		tmp_2 = floorf(maxAniso);
	} else {
		tmp_2 = t_5;
	}
	return tmp_2;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_1 = abs(Float32(floor(w) * Float32(floor(h) * Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u)))))
	t_2 = Float32(floor(w) * dY_46_u)
	t_3 = (t_0 != t_0) ? (hypot(t_2, Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) : (((hypot(t_2, Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) != (hypot(t_2, Float32(floor(h) * dY_46_v)) ^ Float32(2.0))) ? t_0 : max(t_0, (hypot(t_2, Float32(floor(h) * dY_46_v)) ^ Float32(2.0))))
	t_4 = sqrt(t_3)
	t_5 = Float32(t_3 / t_1)
	t_6 = t_5 > floor(maxAniso)
	tmp = Float32(0.0)
	if (t_6)
		tmp = Float32(t_4 / floor(maxAniso));
	else
		tmp = Float32(t_1 * Float32(Float32(1.0) / t_4));
	end
	t_7 = tmp
	tmp_2 = Float32(0.0)
	if (t_7 < Float32(1.0))
		tmp_3 = Float32(0.0)
		if (t_6)
			tmp_3 = floor(maxAniso);
		else
			tmp_3 = Float32(((t_0 != t_0) ? (t_2 ^ Float32(2.0)) : (((t_2 ^ Float32(2.0)) != (t_2 ^ Float32(2.0))) ? t_0 : max(t_0, (t_2 ^ Float32(2.0))))) / t_1);
		end
		tmp_2 = (Float32(1.0) != Float32(1.0)) ? Float32(t_7 * tmp_3) : ((Float32(t_7 * tmp_3) != Float32(t_7 * tmp_3)) ? Float32(1.0) : max(Float32(1.0), Float32(t_7 * tmp_3)));
	elseif (Float32(t_3 / abs(Float32(Float32(dX_46_u * dY_46_v) * Float32(floor(w) * floor(h))))) > floor(maxAniso))
		tmp_2 = floor(maxAniso);
	else
		tmp_2 = t_5;
	end
	return tmp_2
end
function tmp_5 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = hypot((dX_46_u * floor(w)), (dX_46_v * floor(h))) ^ single(2.0);
	t_1 = abs((floor(w) * (floor(h) * ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)))));
	t_2 = floor(w) * dY_46_u;
	t_3 = max(t_0, (hypot(t_2, (floor(h) * dY_46_v)) ^ single(2.0)));
	t_4 = sqrt(t_3);
	t_5 = t_3 / t_1;
	t_6 = t_5 > floor(maxAniso);
	tmp = single(0.0);
	if (t_6)
		tmp = t_4 / floor(maxAniso);
	else
		tmp = t_1 * (single(1.0) / t_4);
	end
	t_7 = tmp;
	tmp_3 = single(0.0);
	if (t_7 < single(1.0))
		tmp_4 = single(0.0);
		if (t_6)
			tmp_4 = floor(maxAniso);
		else
			tmp_4 = max(t_0, (t_2 ^ single(2.0))) / t_1;
		end
		tmp_3 = max(single(1.0), (t_7 * tmp_4));
	elseif ((t_3 / abs(((dX_46_u * dY_46_v) * (floor(w) * floor(h))))) > floor(maxAniso))
		tmp_3 = floor(maxAniso);
	else
		tmp_3 = t_5;
	end
	tmp_5 = tmp_3;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_1 := \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\
t_2 := \left\lfloorw\right\rfloor \cdot dY.u\\
t_3 := \mathsf{max}\left(t\_0, {\left(\mathsf{hypot}\left(t\_2, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\
t_4 := \sqrt{t\_3}\\
t_5 := \frac{t\_3}{t\_1}\\
t_6 := t\_5 > \left\lfloormaxAniso\right\rfloor\\
t_7 := \begin{array}{l}
\mathbf{if}\;t\_6:\\
\;\;\;\;\frac{t\_4}{\left\lfloormaxAniso\right\rfloor}\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \frac{1}{t\_4}\\


\end{array}\\
\mathbf{if}\;t\_7 < 1:\\
\;\;\;\;\mathsf{max}\left(1, t\_7 \cdot \begin{array}{l}
\mathbf{if}\;t\_6:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{max}\left(t\_0, {t\_2}^{2}\right)}{t\_1}\\


\end{array}\right)\\

\mathbf{elif}\;\frac{t\_3}{\left|\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_5\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in dX.u around inf 98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\color{blue}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  4. Step-by-step derivation
    1. associate-*r*98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\color{blue}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)}\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
    2. *-commutative98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
    3. *-commutative98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  5. Simplified98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  6. Taylor expanded in w around 0 98.5%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  7. Simplified98.5%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ } \end{array}} \]
  8. Taylor expanded in dY.u around inf 98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
  9. Step-by-step derivation
    1. *-commutative98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    2. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot {dY.u}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    3. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dY.u \cdot dY.u\right)\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    4. swap-sqr98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    5. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
  10. Simplified98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
  11. Final simplification98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right| \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right| \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
  12. Add Preprocessing

Alternative 3: 97.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := dX.u \cdot dY.v - dX.v \cdot dY.u\\ t_1 := \mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\ t_2 := \sqrt{t\_1}\\ t_3 := \frac{t\_2}{\left\lfloormaxAniso\right\rfloor}\\ t_4 := \frac{1}{t\_2}\\ t_5 := \left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot t\_0\right)\\ t_6 := \left|t\_5\right|\\ t_7 := \frac{t\_1}{t\_6}\\ t_8 := t\_7 > \left\lfloormaxAniso\right\rfloor\\ t_9 := \frac{t\_1}{t\_5}\\ t_10 := t\_9 > \left\lfloormaxAniso\right\rfloor\\ \mathbf{if}\;\begin{array}{l} \mathbf{if}\;t\_8:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_6 \cdot t\_4\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;t\_10:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(t\_4 \cdot \left(\left\lfloorw\right\rfloor \cdot t\_0\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;t\_10:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_9\\ \end{array}\right)\\ \mathbf{elif}\;t\_8:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (- (* dX.u dY.v) (* dX.v dY.u)))
        (t_1
         (fmax
          (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0)
          (pow (hypot (* (floor w) dY.u) (* (floor h) dY.v)) 2.0)))
        (t_2 (sqrt t_1))
        (t_3 (/ t_2 (floor maxAniso)))
        (t_4 (/ 1.0 t_2))
        (t_5 (* (floor w) (* (floor h) t_0)))
        (t_6 (fabs t_5))
        (t_7 (/ t_1 t_6))
        (t_8 (> t_7 (floor maxAniso)))
        (t_9 (/ t_1 t_5))
        (t_10 (> t_9 (floor maxAniso))))
   (if (< (if t_8 t_3 (* t_6 t_4)) 1.0)
     (fmax
      1.0
      (*
       (if t_10 t_3 (* (floor h) (* t_4 (* (floor w) t_0))))
       (if t_10 (floor maxAniso) t_9)))
     (if t_8 (floor maxAniso) t_7))))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	float t_1 = fmaxf(powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f), powf(hypotf((floorf(w) * dY_46_u), (floorf(h) * dY_46_v)), 2.0f));
	float t_2 = sqrtf(t_1);
	float t_3 = t_2 / floorf(maxAniso);
	float t_4 = 1.0f / t_2;
	float t_5 = floorf(w) * (floorf(h) * t_0);
	float t_6 = fabsf(t_5);
	float t_7 = t_1 / t_6;
	int t_8 = t_7 > floorf(maxAniso);
	float t_9 = t_1 / t_5;
	int t_10 = t_9 > floorf(maxAniso);
	float tmp;
	if (t_8) {
		tmp = t_3;
	} else {
		tmp = t_6 * t_4;
	}
	float tmp_3;
	if (tmp < 1.0f) {
		float tmp_4;
		if (t_10) {
			tmp_4 = t_3;
		} else {
			tmp_4 = floorf(h) * (t_4 * (floorf(w) * t_0));
		}
		float tmp_5;
		if (t_10) {
			tmp_5 = floorf(maxAniso);
		} else {
			tmp_5 = t_9;
		}
		tmp_3 = fmaxf(1.0f, (tmp_4 * tmp_5));
	} else if (t_8) {
		tmp_3 = floorf(maxAniso);
	} else {
		tmp_3 = t_7;
	}
	return tmp_3;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u))
	t_1 = ((hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)) != (hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0))) ? (hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) : (((hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) != (hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0))) ? (hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)) : max((hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)), (hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0))))
	t_2 = sqrt(t_1)
	t_3 = Float32(t_2 / floor(maxAniso))
	t_4 = Float32(Float32(1.0) / t_2)
	t_5 = Float32(floor(w) * Float32(floor(h) * t_0))
	t_6 = abs(t_5)
	t_7 = Float32(t_1 / t_6)
	t_8 = t_7 > floor(maxAniso)
	t_9 = Float32(t_1 / t_5)
	t_10 = t_9 > floor(maxAniso)
	tmp = Float32(0.0)
	if (t_8)
		tmp = t_3;
	else
		tmp = Float32(t_6 * t_4);
	end
	tmp_3 = Float32(0.0)
	if (tmp < Float32(1.0))
		tmp_4 = Float32(0.0)
		if (t_10)
			tmp_4 = t_3;
		else
			tmp_4 = Float32(floor(h) * Float32(t_4 * Float32(floor(w) * t_0)));
		end
		tmp_5 = Float32(0.0)
		if (t_10)
			tmp_5 = floor(maxAniso);
		else
			tmp_5 = t_9;
		end
		tmp_3 = (Float32(1.0) != Float32(1.0)) ? Float32(tmp_4 * tmp_5) : ((Float32(tmp_4 * tmp_5) != Float32(tmp_4 * tmp_5)) ? Float32(1.0) : max(Float32(1.0), Float32(tmp_4 * tmp_5)));
	elseif (t_8)
		tmp_3 = floor(maxAniso);
	else
		tmp_3 = t_7;
	end
	return tmp_3
end
function tmp_7 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	t_1 = max((hypot((dX_46_u * floor(w)), (dX_46_v * floor(h))) ^ single(2.0)), (hypot((floor(w) * dY_46_u), (floor(h) * dY_46_v)) ^ single(2.0)));
	t_2 = sqrt(t_1);
	t_3 = t_2 / floor(maxAniso);
	t_4 = single(1.0) / t_2;
	t_5 = floor(w) * (floor(h) * t_0);
	t_6 = abs(t_5);
	t_7 = t_1 / t_6;
	t_8 = t_7 > floor(maxAniso);
	t_9 = t_1 / t_5;
	t_10 = t_9 > floor(maxAniso);
	tmp = single(0.0);
	if (t_8)
		tmp = t_3;
	else
		tmp = t_6 * t_4;
	end
	tmp_4 = single(0.0);
	if (tmp < single(1.0))
		tmp_5 = single(0.0);
		if (t_10)
			tmp_5 = t_3;
		else
			tmp_5 = floor(h) * (t_4 * (floor(w) * t_0));
		end
		tmp_6 = single(0.0);
		if (t_10)
			tmp_6 = floor(maxAniso);
		else
			tmp_6 = t_9;
		end
		tmp_4 = max(single(1.0), (tmp_5 * tmp_6));
	elseif (t_8)
		tmp_4 = floor(maxAniso);
	else
		tmp_4 = t_7;
	end
	tmp_7 = tmp_4;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := dX.u \cdot dY.v - dX.v \cdot dY.u\\
t_1 := \mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\
t_2 := \sqrt{t\_1}\\
t_3 := \frac{t\_2}{\left\lfloormaxAniso\right\rfloor}\\
t_4 := \frac{1}{t\_2}\\
t_5 := \left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot t\_0\right)\\
t_6 := \left|t\_5\right|\\
t_7 := \frac{t\_1}{t\_6}\\
t_8 := t\_7 > \left\lfloormaxAniso\right\rfloor\\
t_9 := \frac{t\_1}{t\_5}\\
t_10 := t\_9 > \left\lfloormaxAniso\right\rfloor\\
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;t\_8:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;t\_6 \cdot t\_4\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, \begin{array}{l}
\mathbf{if}\;t\_10:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\left\lfloorh\right\rfloor \cdot \left(t\_4 \cdot \left(\left\lfloorw\right\rfloor \cdot t\_0\right)\right)\\


\end{array} \cdot \begin{array}{l}
\mathbf{if}\;t\_10:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_9\\


\end{array}\right)\\

\mathbf{elif}\;t\_8:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Applied egg-rr97.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\color{blue}{e^{\mathsf{log1p}\left(\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right)\right|}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\right)} - 1}\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  4. Simplified97.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\right)\right)}\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  5. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  6. Simplified97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ } \end{array}} \]
  7. Final simplification97.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right| \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
  8. Add Preprocessing

Alternative 4: 86.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := dX.u \cdot dY.v - dX.v \cdot dY.u\\ t_1 := \mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\ t_2 := \sqrt{t\_1}\\ t_3 := \frac{t\_2}{\left\lfloormaxAniso\right\rfloor}\\ t_4 := \left\lfloorh\right\rfloor \cdot t\_0\\ t_5 := \frac{t\_1}{\left\lfloorw\right\rfloor \cdot t\_4}\\ t_6 := t\_5 > \left\lfloormaxAniso\right\rfloor\\ t_7 := \left\lfloorw\right\rfloor \cdot t\_0\\ \mathbf{if}\;\begin{array}{l} \mathbf{if}\;t\_6:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\left\lfloorh\right\rfloor \cdot \frac{t\_7}{t\_2}\right)}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;t\_6:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\frac{1}{t\_2} \cdot t\_7\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;t\_6:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{t\_4}{t\_1}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (- (* dX.u dY.v) (* dX.v dY.u)))
        (t_1
         (fmax
          (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0)
          (pow (hypot (* (floor w) dY.u) (* (floor h) dY.v)) 2.0)))
        (t_2 (sqrt t_1))
        (t_3 (/ t_2 (floor maxAniso)))
        (t_4 (* (floor h) t_0))
        (t_5 (/ t_1 (* (floor w) t_4)))
        (t_6 (> t_5 (floor maxAniso)))
        (t_7 (* (floor w) t_0)))
   (if (< (if t_6 t_3 (exp (log (* (floor h) (/ t_7 t_2))))) 1.0)
     (fmax
      1.0
      (*
       (if t_6 t_3 (* (floor h) (* (/ 1.0 t_2) t_7)))
       (if t_6 (floor maxAniso) t_5)))
     (if (> (pow (pow (* (floor w) (/ t_4 t_1)) 2.0) -0.5) (floor maxAniso))
       (floor maxAniso)
       t_5))))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	float t_1 = fmaxf(powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f), powf(hypotf((floorf(w) * dY_46_u), (floorf(h) * dY_46_v)), 2.0f));
	float t_2 = sqrtf(t_1);
	float t_3 = t_2 / floorf(maxAniso);
	float t_4 = floorf(h) * t_0;
	float t_5 = t_1 / (floorf(w) * t_4);
	int t_6 = t_5 > floorf(maxAniso);
	float t_7 = floorf(w) * t_0;
	float tmp;
	if (t_6) {
		tmp = t_3;
	} else {
		tmp = expf(logf((floorf(h) * (t_7 / t_2))));
	}
	float tmp_3;
	if (tmp < 1.0f) {
		float tmp_4;
		if (t_6) {
			tmp_4 = t_3;
		} else {
			tmp_4 = floorf(h) * ((1.0f / t_2) * t_7);
		}
		float tmp_5;
		if (t_6) {
			tmp_5 = floorf(maxAniso);
		} else {
			tmp_5 = t_5;
		}
		tmp_3 = fmaxf(1.0f, (tmp_4 * tmp_5));
	} else if (powf(powf((floorf(w) * (t_4 / t_1)), 2.0f), -0.5f) > floorf(maxAniso)) {
		tmp_3 = floorf(maxAniso);
	} else {
		tmp_3 = t_5;
	}
	return tmp_3;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u))
	t_1 = ((hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)) != (hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0))) ? (hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) : (((hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) != (hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0))) ? (hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)) : max((hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)), (hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0))))
	t_2 = sqrt(t_1)
	t_3 = Float32(t_2 / floor(maxAniso))
	t_4 = Float32(floor(h) * t_0)
	t_5 = Float32(t_1 / Float32(floor(w) * t_4))
	t_6 = t_5 > floor(maxAniso)
	t_7 = Float32(floor(w) * t_0)
	tmp = Float32(0.0)
	if (t_6)
		tmp = t_3;
	else
		tmp = exp(log(Float32(floor(h) * Float32(t_7 / t_2))));
	end
	tmp_3 = Float32(0.0)
	if (tmp < Float32(1.0))
		tmp_4 = Float32(0.0)
		if (t_6)
			tmp_4 = t_3;
		else
			tmp_4 = Float32(floor(h) * Float32(Float32(Float32(1.0) / t_2) * t_7));
		end
		tmp_5 = Float32(0.0)
		if (t_6)
			tmp_5 = floor(maxAniso);
		else
			tmp_5 = t_5;
		end
		tmp_3 = (Float32(1.0) != Float32(1.0)) ? Float32(tmp_4 * tmp_5) : ((Float32(tmp_4 * tmp_5) != Float32(tmp_4 * tmp_5)) ? Float32(1.0) : max(Float32(1.0), Float32(tmp_4 * tmp_5)));
	elseif (((Float32(floor(w) * Float32(t_4 / t_1)) ^ Float32(2.0)) ^ Float32(-0.5)) > floor(maxAniso))
		tmp_3 = floor(maxAniso);
	else
		tmp_3 = t_5;
	end
	return tmp_3
end
function tmp_7 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	t_1 = max((hypot((dX_46_u * floor(w)), (dX_46_v * floor(h))) ^ single(2.0)), (hypot((floor(w) * dY_46_u), (floor(h) * dY_46_v)) ^ single(2.0)));
	t_2 = sqrt(t_1);
	t_3 = t_2 / floor(maxAniso);
	t_4 = floor(h) * t_0;
	t_5 = t_1 / (floor(w) * t_4);
	t_6 = t_5 > floor(maxAniso);
	t_7 = floor(w) * t_0;
	tmp = single(0.0);
	if (t_6)
		tmp = t_3;
	else
		tmp = exp(log((floor(h) * (t_7 / t_2))));
	end
	tmp_4 = single(0.0);
	if (tmp < single(1.0))
		tmp_5 = single(0.0);
		if (t_6)
			tmp_5 = t_3;
		else
			tmp_5 = floor(h) * ((single(1.0) / t_2) * t_7);
		end
		tmp_6 = single(0.0);
		if (t_6)
			tmp_6 = floor(maxAniso);
		else
			tmp_6 = t_5;
		end
		tmp_4 = max(single(1.0), (tmp_5 * tmp_6));
	elseif ((((floor(w) * (t_4 / t_1)) ^ single(2.0)) ^ single(-0.5)) > floor(maxAniso))
		tmp_4 = floor(maxAniso);
	else
		tmp_4 = t_5;
	end
	tmp_7 = tmp_4;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := dX.u \cdot dY.v - dX.v \cdot dY.u\\
t_1 := \mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\
t_2 := \sqrt{t\_1}\\
t_3 := \frac{t\_2}{\left\lfloormaxAniso\right\rfloor}\\
t_4 := \left\lfloorh\right\rfloor \cdot t\_0\\
t_5 := \frac{t\_1}{\left\lfloorw\right\rfloor \cdot t\_4}\\
t_6 := t\_5 > \left\lfloormaxAniso\right\rfloor\\
t_7 := \left\lfloorw\right\rfloor \cdot t\_0\\
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;t\_6:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;e^{\log \left(\left\lfloorh\right\rfloor \cdot \frac{t\_7}{t\_2}\right)}\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, \begin{array}{l}
\mathbf{if}\;t\_6:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\frac{1}{t\_2} \cdot t\_7\right)\\


\end{array} \cdot \begin{array}{l}
\mathbf{if}\;t\_6:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_5\\


\end{array}\right)\\

\mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{t\_4}{t\_1}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_5\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  4. Simplified58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
  5. Taylor expanded in dX.u around 0 58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ } \end{array}} \]
  6. Simplified59.0%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ } \end{array}} \]
  7. Step-by-step derivation
    1. clear-num59.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{\frac{1}{\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
    2. *-commutative59.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{1}{\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{\left\lfloorw\right\rfloor \cdot dX.u}, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
    3. *-commutative59.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{1}{\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \color{blue}{\left\lfloorh\right\rfloor \cdot dX.v}\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
    4. unpow-159.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{{\left(\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{-1}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  8. Applied egg-rr59.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  9. Step-by-step derivation
    1. add-exp-log86.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\right)}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
    2. un-div-inv86.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\left\lfloorh\right\rfloor \cdot \frac{\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  10. Applied egg-rr86.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\left\lfloorh\right\rfloor \cdot \frac{\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  11. Final simplification86.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\left\lfloorh\right\rfloor \cdot \frac{\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  12. Add Preprocessing

Alternative 5: 60.9% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_1 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\ t_2 := {\left(\left\lfloorh\right\rfloor\right)}^{2}\\ t_3 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\ t_4 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_5 := \mathsf{max}\left(t\_0, {\left(\mathsf{hypot}\left(t\_4, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\ t_6 := \sqrt{t\_5}\\ t_7 := \frac{t\_6}{\left\lfloormaxAniso\right\rfloor}\\ t_8 := dX.u \cdot dY.v - dX.v \cdot dY.u\\ t_9 := \left\lfloorh\right\rfloor \cdot \left(\frac{1}{t\_6} \cdot \left(\left\lfloorw\right\rfloor \cdot t\_8\right)\right)\\ t_10 := \left\lfloorh\right\rfloor \cdot t\_8\\ t_11 := \frac{t\_5}{\left\lfloorw\right\rfloor \cdot t\_10}\\ t_12 := t\_11 > \left\lfloormaxAniso\right\rfloor\\ t_13 := t\_8 \cdot t\_1\\ t_14 := \frac{t\_5}{t\_13}\\ t_15 := \sqrt{\frac{1}{t\_5}} \cdot t\_13\\ t_16 := t\_14 > \left\lfloormaxAniso\right\rfloor\\ \mathbf{if}\;dY.u \leq 0.0013500000350177288:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{t\_5}{\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot dY.u\right)\right) \cdot \left(-dX.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_7\\ \mathbf{else}:\\ \;\;\;\;t\_9\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;t\_12:\\ \;\;\;\;t\_7\\ \mathbf{else}:\\ \;\;\;\;t\_9\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;t\_12:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_11\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{t\_10}{t\_5}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_11\\ \end{array}\\ \mathbf{elif}\;\begin{array}{l} \mathbf{if}\;\frac{t\_5}{\left(dX.u \cdot dY.v\right) \cdot t\_1} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_7\\ \mathbf{else}:\\ \;\;\;\;t\_15\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;t\_16:\\ \;\;\;\;t\_7\\ \mathbf{else}:\\ \;\;\;\;t\_15\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;t\_16:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(t\_0, {t\_4}^{2}\right)}{t\_13}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, t\_3, {dX.v}^{2} \cdot t\_2\right), \mathsf{fma}\left({dY.u}^{2}, t\_3, t\_2 \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_14\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0))
        (t_1 (* (floor w) (floor h)))
        (t_2 (pow (floor h) 2.0))
        (t_3 (pow (floor w) 2.0))
        (t_4 (* (floor w) dY.u))
        (t_5 (fmax t_0 (pow (hypot t_4 (* (floor h) dY.v)) 2.0)))
        (t_6 (sqrt t_5))
        (t_7 (/ t_6 (floor maxAniso)))
        (t_8 (- (* dX.u dY.v) (* dX.v dY.u)))
        (t_9 (* (floor h) (* (/ 1.0 t_6) (* (floor w) t_8))))
        (t_10 (* (floor h) t_8))
        (t_11 (/ t_5 (* (floor w) t_10)))
        (t_12 (> t_11 (floor maxAniso)))
        (t_13 (* t_8 t_1))
        (t_14 (/ t_5 t_13))
        (t_15 (* (sqrt (/ 1.0 t_5)) t_13))
        (t_16 (> t_14 (floor maxAniso))))
   (if (<= dY.u 0.0013500000350177288)
     (if (<
          (if (>
               (/ t_5 (* (* (floor w) (* (floor h) dY.u)) (- dX.v)))
               (floor maxAniso))
            t_7
            t_9)
          1.0)
       (fmax 1.0 (* (if t_12 t_7 t_9) (if t_12 (floor maxAniso) t_11)))
       (if (> (pow (pow (* (floor w) (/ t_10 t_5)) 2.0) -0.5) (floor maxAniso))
         (floor maxAniso)
         t_11))
     (if (<
          (if (> (/ t_5 (* (* dX.u dY.v) t_1)) (floor maxAniso)) t_7 t_15)
          1.0)
       (fmax
        1.0
        (*
         (if t_16 t_7 t_15)
         (if t_16 (floor maxAniso) (/ (fmax t_0 (pow t_4 2.0)) t_13))))
       (if (>
            (/
             (fmax
              (fma (pow dX.u 2.0) t_3 (* (pow dX.v 2.0) t_2))
              (fma (pow dY.u 2.0) t_3 (* t_2 (pow dY.v 2.0))))
             (* (floor w) (* (floor h) (* dX.u dY.v))))
            (floor maxAniso))
         (floor maxAniso)
         t_14)))))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f);
	float t_1 = floorf(w) * floorf(h);
	float t_2 = powf(floorf(h), 2.0f);
	float t_3 = powf(floorf(w), 2.0f);
	float t_4 = floorf(w) * dY_46_u;
	float t_5 = fmaxf(t_0, powf(hypotf(t_4, (floorf(h) * dY_46_v)), 2.0f));
	float t_6 = sqrtf(t_5);
	float t_7 = t_6 / floorf(maxAniso);
	float t_8 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	float t_9 = floorf(h) * ((1.0f / t_6) * (floorf(w) * t_8));
	float t_10 = floorf(h) * t_8;
	float t_11 = t_5 / (floorf(w) * t_10);
	int t_12 = t_11 > floorf(maxAniso);
	float t_13 = t_8 * t_1;
	float t_14 = t_5 / t_13;
	float t_15 = sqrtf((1.0f / t_5)) * t_13;
	int t_16 = t_14 > floorf(maxAniso);
	float tmp;
	if ((t_5 / ((dX_46_u * dY_46_v) * t_1)) > floorf(maxAniso)) {
		tmp = t_7;
	} else {
		tmp = t_15;
	}
	float tmp_7;
	if (dY_46_u <= 0.0013500000350177288f) {
		float tmp_8;
		if ((t_5 / ((floorf(w) * (floorf(h) * dY_46_u)) * -dX_46_v)) > floorf(maxAniso)) {
			tmp_8 = t_7;
		} else {
			tmp_8 = t_9;
		}
		float tmp_11;
		if (tmp_8 < 1.0f) {
			float tmp_12;
			if (t_12) {
				tmp_12 = t_7;
			} else {
				tmp_12 = t_9;
			}
			float tmp_13;
			if (t_12) {
				tmp_13 = floorf(maxAniso);
			} else {
				tmp_13 = t_11;
			}
			tmp_11 = fmaxf(1.0f, (tmp_12 * tmp_13));
		} else if (powf(powf((floorf(w) * (t_10 / t_5)), 2.0f), -0.5f) > floorf(maxAniso)) {
			tmp_11 = floorf(maxAniso);
		} else {
			tmp_11 = t_11;
		}
		tmp_7 = tmp_11;
	} else if (tmp < 1.0f) {
		float tmp_14;
		if (t_16) {
			tmp_14 = t_7;
		} else {
			tmp_14 = t_15;
		}
		float tmp_15;
		if (t_16) {
			tmp_15 = floorf(maxAniso);
		} else {
			tmp_15 = fmaxf(t_0, powf(t_4, 2.0f)) / t_13;
		}
		tmp_7 = fmaxf(1.0f, (tmp_14 * tmp_15));
	} else if ((fmaxf(fmaf(powf(dX_46_u, 2.0f), t_3, (powf(dX_46_v, 2.0f) * t_2)), fmaf(powf(dY_46_u, 2.0f), t_3, (t_2 * powf(dY_46_v, 2.0f)))) / (floorf(w) * (floorf(h) * (dX_46_u * dY_46_v)))) > floorf(maxAniso)) {
		tmp_7 = floorf(maxAniso);
	} else {
		tmp_7 = t_14;
	}
	return tmp_7;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_1 = Float32(floor(w) * floor(h))
	t_2 = floor(h) ^ Float32(2.0)
	t_3 = floor(w) ^ Float32(2.0)
	t_4 = Float32(floor(w) * dY_46_u)
	t_5 = (t_0 != t_0) ? (hypot(t_4, Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) : (((hypot(t_4, Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) != (hypot(t_4, Float32(floor(h) * dY_46_v)) ^ Float32(2.0))) ? t_0 : max(t_0, (hypot(t_4, Float32(floor(h) * dY_46_v)) ^ Float32(2.0))))
	t_6 = sqrt(t_5)
	t_7 = Float32(t_6 / floor(maxAniso))
	t_8 = Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u))
	t_9 = Float32(floor(h) * Float32(Float32(Float32(1.0) / t_6) * Float32(floor(w) * t_8)))
	t_10 = Float32(floor(h) * t_8)
	t_11 = Float32(t_5 / Float32(floor(w) * t_10))
	t_12 = t_11 > floor(maxAniso)
	t_13 = Float32(t_8 * t_1)
	t_14 = Float32(t_5 / t_13)
	t_15 = Float32(sqrt(Float32(Float32(1.0) / t_5)) * t_13)
	t_16 = t_14 > floor(maxAniso)
	tmp = Float32(0.0)
	if (Float32(t_5 / Float32(Float32(dX_46_u * dY_46_v) * t_1)) > floor(maxAniso))
		tmp = t_7;
	else
		tmp = t_15;
	end
	tmp_7 = Float32(0.0)
	if (dY_46_u <= Float32(0.0013500000350177288))
		tmp_8 = Float32(0.0)
		if (Float32(t_5 / Float32(Float32(floor(w) * Float32(floor(h) * dY_46_u)) * Float32(-dX_46_v))) > floor(maxAniso))
			tmp_8 = t_7;
		else
			tmp_8 = t_9;
		end
		tmp_11 = Float32(0.0)
		if (tmp_8 < Float32(1.0))
			tmp_12 = Float32(0.0)
			if (t_12)
				tmp_12 = t_7;
			else
				tmp_12 = t_9;
			end
			tmp_13 = Float32(0.0)
			if (t_12)
				tmp_13 = floor(maxAniso);
			else
				tmp_13 = t_11;
			end
			tmp_11 = (Float32(1.0) != Float32(1.0)) ? Float32(tmp_12 * tmp_13) : ((Float32(tmp_12 * tmp_13) != Float32(tmp_12 * tmp_13)) ? Float32(1.0) : max(Float32(1.0), Float32(tmp_12 * tmp_13)));
		elseif (((Float32(floor(w) * Float32(t_10 / t_5)) ^ Float32(2.0)) ^ Float32(-0.5)) > floor(maxAniso))
			tmp_11 = floor(maxAniso);
		else
			tmp_11 = t_11;
		end
		tmp_7 = tmp_11;
	elseif (tmp < Float32(1.0))
		tmp_14 = Float32(0.0)
		if (t_16)
			tmp_14 = t_7;
		else
			tmp_14 = t_15;
		end
		tmp_15 = Float32(0.0)
		if (t_16)
			tmp_15 = floor(maxAniso);
		else
			tmp_15 = Float32(((t_0 != t_0) ? (t_4 ^ Float32(2.0)) : (((t_4 ^ Float32(2.0)) != (t_4 ^ Float32(2.0))) ? t_0 : max(t_0, (t_4 ^ Float32(2.0))))) / t_13);
		end
		tmp_7 = (Float32(1.0) != Float32(1.0)) ? Float32(tmp_14 * tmp_15) : ((Float32(tmp_14 * tmp_15) != Float32(tmp_14 * tmp_15)) ? Float32(1.0) : max(Float32(1.0), Float32(tmp_14 * tmp_15)));
	elseif (Float32(((fma((dX_46_u ^ Float32(2.0)), t_3, Float32((dX_46_v ^ Float32(2.0)) * t_2)) != fma((dX_46_u ^ Float32(2.0)), t_3, Float32((dX_46_v ^ Float32(2.0)) * t_2))) ? fma((dY_46_u ^ Float32(2.0)), t_3, Float32(t_2 * (dY_46_v ^ Float32(2.0)))) : ((fma((dY_46_u ^ Float32(2.0)), t_3, Float32(t_2 * (dY_46_v ^ Float32(2.0)))) != fma((dY_46_u ^ Float32(2.0)), t_3, Float32(t_2 * (dY_46_v ^ Float32(2.0))))) ? fma((dX_46_u ^ Float32(2.0)), t_3, Float32((dX_46_v ^ Float32(2.0)) * t_2)) : max(fma((dX_46_u ^ Float32(2.0)), t_3, Float32((dX_46_v ^ Float32(2.0)) * t_2)), fma((dY_46_u ^ Float32(2.0)), t_3, Float32(t_2 * (dY_46_v ^ Float32(2.0))))))) / Float32(floor(w) * Float32(floor(h) * Float32(dX_46_u * dY_46_v)))) > floor(maxAniso))
		tmp_7 = floor(maxAniso);
	else
		tmp_7 = t_14;
	end
	return tmp_7
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_1 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\
t_2 := {\left(\left\lfloorh\right\rfloor\right)}^{2}\\
t_3 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\
t_4 := \left\lfloorw\right\rfloor \cdot dY.u\\
t_5 := \mathsf{max}\left(t\_0, {\left(\mathsf{hypot}\left(t\_4, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\
t_6 := \sqrt{t\_5}\\
t_7 := \frac{t\_6}{\left\lfloormaxAniso\right\rfloor}\\
t_8 := dX.u \cdot dY.v - dX.v \cdot dY.u\\
t_9 := \left\lfloorh\right\rfloor \cdot \left(\frac{1}{t\_6} \cdot \left(\left\lfloorw\right\rfloor \cdot t\_8\right)\right)\\
t_10 := \left\lfloorh\right\rfloor \cdot t\_8\\
t_11 := \frac{t\_5}{\left\lfloorw\right\rfloor \cdot t\_10}\\
t_12 := t\_11 > \left\lfloormaxAniso\right\rfloor\\
t_13 := t\_8 \cdot t\_1\\
t_14 := \frac{t\_5}{t\_13}\\
t_15 := \sqrt{\frac{1}{t\_5}} \cdot t\_13\\
t_16 := t\_14 > \left\lfloormaxAniso\right\rfloor\\
\mathbf{if}\;dY.u \leq 0.0013500000350177288:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;\frac{t\_5}{\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot dY.u\right)\right) \cdot \left(-dX.v\right)} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_7\\

\mathbf{else}:\\
\;\;\;\;t\_9\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, \begin{array}{l}
\mathbf{if}\;t\_12:\\
\;\;\;\;t\_7\\

\mathbf{else}:\\
\;\;\;\;t\_9\\


\end{array} \cdot \begin{array}{l}
\mathbf{if}\;t\_12:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_11\\


\end{array}\right)\\

\mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{t\_10}{t\_5}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_11\\


\end{array}\\

\mathbf{elif}\;\begin{array}{l}
\mathbf{if}\;\frac{t\_5}{\left(dX.u \cdot dY.v\right) \cdot t\_1} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_7\\

\mathbf{else}:\\
\;\;\;\;t\_15\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, \begin{array}{l}
\mathbf{if}\;t\_16:\\
\;\;\;\;t\_7\\

\mathbf{else}:\\
\;\;\;\;t\_15\\


\end{array} \cdot \begin{array}{l}
\mathbf{if}\;t\_16:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{max}\left(t\_0, {t\_4}^{2}\right)}{t\_13}\\


\end{array}\right)\\

\mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, t\_3, {dX.v}^{2} \cdot t\_2\right), \mathsf{fma}\left({dY.u}^{2}, t\_3, t\_2 \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_14\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if dY.u < 0.00135000004

    1. Initial program 98.3%

      \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in w around 0 98.3%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
    4. Simplified61.4%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
    5. Taylor expanded in dX.u around 0 61.4%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ } \end{array}} \]
    6. Simplified61.5%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ } \end{array}} \]
    7. Step-by-step derivation
      1. clear-num61.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{\frac{1}{\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
      2. *-commutative61.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{1}{\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{\left\lfloorw\right\rfloor \cdot dX.u}, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
      3. *-commutative61.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{1}{\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \color{blue}{\left\lfloorh\right\rfloor \cdot dX.v}\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
      4. unpow-161.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{{\left(\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{-1}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
    8. Applied egg-rr62.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
    9. Taylor expanded in dX.u around 0 67.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{-1 \cdot \frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
    10. Simplified67.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{-dX.v \cdot \left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot dY.u\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]

    if 0.00135000004 < dY.u

    1. Initial program 95.9%

      \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in w around 0 95.9%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
    4. Simplified52.2%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
    5. Taylor expanded in dX.u around inf 46.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    6. Step-by-step derivation
      1. fma-define46.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\color{blue}{\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
      2. fma-define46.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \color{blue}{\mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
      3. *-commutative46.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
      4. associate-*r*46.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
      5. *-commutative46.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
      6. *-commutative46.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
      7. associate-*l*46.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    7. Simplified46.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    8. Taylor expanded in dY.u around inf 46.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    9. Step-by-step derivation
      1. *-commutative99.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
      2. unpow299.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot {dY.u}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
      3. unpow299.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dY.u \cdot dY.u\right)\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
      4. swap-sqr99.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
      5. unpow299.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    10. Simplified46.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    11. Taylor expanded in dX.u around inf 59.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    12. Simplified59.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;dY.u \leq 0.0013500000350177288:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot dY.u\right)\right) \cdot \left(-dX.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\\ \mathbf{elif}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 59.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := dX.u \cdot dY.v - dX.v \cdot dY.u\\ t_1 := dX.u \cdot \left\lfloorw\right\rfloor\\ t_2 := \mathsf{max}\left({\left(\mathsf{hypot}\left(t\_1, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\ t_3 := \sqrt{t\_2}\\ t_4 := \frac{t\_3}{\left\lfloormaxAniso\right\rfloor}\\ t_5 := \left\lfloorh\right\rfloor \cdot t\_0\\ t_6 := \frac{t\_2}{\left\lfloorw\right\rfloor \cdot t\_5}\\ t_7 := t\_6 > \left\lfloormaxAniso\right\rfloor\\ \mathbf{if}\;\begin{array}{l} \mathbf{if}\;t\_7:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{t\_2}} \cdot \left(dY.v \cdot \left(t\_1 \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;t\_7:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\frac{1}{t\_3} \cdot \left(\left\lfloorw\right\rfloor \cdot t\_0\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;t\_7:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_6\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{t\_5}{t\_2}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_6\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (- (* dX.u dY.v) (* dX.v dY.u)))
        (t_1 (* dX.u (floor w)))
        (t_2
         (fmax
          (pow (hypot t_1 (* dX.v (floor h))) 2.0)
          (pow (hypot (* (floor w) dY.u) (* (floor h) dY.v)) 2.0)))
        (t_3 (sqrt t_2))
        (t_4 (/ t_3 (floor maxAniso)))
        (t_5 (* (floor h) t_0))
        (t_6 (/ t_2 (* (floor w) t_5)))
        (t_7 (> t_6 (floor maxAniso))))
   (if (< (if t_7 t_4 (* (sqrt (/ 1.0 t_2)) (* dY.v (* t_1 (floor h))))) 1.0)
     (fmax
      1.0
      (*
       (if t_7 t_4 (* (floor h) (* (/ 1.0 t_3) (* (floor w) t_0))))
       (if t_7 (floor maxAniso) t_6)))
     (if (> (pow (pow (* (floor w) (/ t_5 t_2)) 2.0) -0.5) (floor maxAniso))
       (floor maxAniso)
       t_6))))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	float t_1 = dX_46_u * floorf(w);
	float t_2 = fmaxf(powf(hypotf(t_1, (dX_46_v * floorf(h))), 2.0f), powf(hypotf((floorf(w) * dY_46_u), (floorf(h) * dY_46_v)), 2.0f));
	float t_3 = sqrtf(t_2);
	float t_4 = t_3 / floorf(maxAniso);
	float t_5 = floorf(h) * t_0;
	float t_6 = t_2 / (floorf(w) * t_5);
	int t_7 = t_6 > floorf(maxAniso);
	float tmp;
	if (t_7) {
		tmp = t_4;
	} else {
		tmp = sqrtf((1.0f / t_2)) * (dY_46_v * (t_1 * floorf(h)));
	}
	float tmp_3;
	if (tmp < 1.0f) {
		float tmp_4;
		if (t_7) {
			tmp_4 = t_4;
		} else {
			tmp_4 = floorf(h) * ((1.0f / t_3) * (floorf(w) * t_0));
		}
		float tmp_5;
		if (t_7) {
			tmp_5 = floorf(maxAniso);
		} else {
			tmp_5 = t_6;
		}
		tmp_3 = fmaxf(1.0f, (tmp_4 * tmp_5));
	} else if (powf(powf((floorf(w) * (t_5 / t_2)), 2.0f), -0.5f) > floorf(maxAniso)) {
		tmp_3 = floorf(maxAniso);
	} else {
		tmp_3 = t_6;
	}
	return tmp_3;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u))
	t_1 = Float32(dX_46_u * floor(w))
	t_2 = ((hypot(t_1, Float32(dX_46_v * floor(h))) ^ Float32(2.0)) != (hypot(t_1, Float32(dX_46_v * floor(h))) ^ Float32(2.0))) ? (hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) : (((hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) != (hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0))) ? (hypot(t_1, Float32(dX_46_v * floor(h))) ^ Float32(2.0)) : max((hypot(t_1, Float32(dX_46_v * floor(h))) ^ Float32(2.0)), (hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v)) ^ Float32(2.0))))
	t_3 = sqrt(t_2)
	t_4 = Float32(t_3 / floor(maxAniso))
	t_5 = Float32(floor(h) * t_0)
	t_6 = Float32(t_2 / Float32(floor(w) * t_5))
	t_7 = t_6 > floor(maxAniso)
	tmp = Float32(0.0)
	if (t_7)
		tmp = t_4;
	else
		tmp = Float32(sqrt(Float32(Float32(1.0) / t_2)) * Float32(dY_46_v * Float32(t_1 * floor(h))));
	end
	tmp_3 = Float32(0.0)
	if (tmp < Float32(1.0))
		tmp_4 = Float32(0.0)
		if (t_7)
			tmp_4 = t_4;
		else
			tmp_4 = Float32(floor(h) * Float32(Float32(Float32(1.0) / t_3) * Float32(floor(w) * t_0)));
		end
		tmp_5 = Float32(0.0)
		if (t_7)
			tmp_5 = floor(maxAniso);
		else
			tmp_5 = t_6;
		end
		tmp_3 = (Float32(1.0) != Float32(1.0)) ? Float32(tmp_4 * tmp_5) : ((Float32(tmp_4 * tmp_5) != Float32(tmp_4 * tmp_5)) ? Float32(1.0) : max(Float32(1.0), Float32(tmp_4 * tmp_5)));
	elseif (((Float32(floor(w) * Float32(t_5 / t_2)) ^ Float32(2.0)) ^ Float32(-0.5)) > floor(maxAniso))
		tmp_3 = floor(maxAniso);
	else
		tmp_3 = t_6;
	end
	return tmp_3
end
function tmp_7 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	t_1 = dX_46_u * floor(w);
	t_2 = max((hypot(t_1, (dX_46_v * floor(h))) ^ single(2.0)), (hypot((floor(w) * dY_46_u), (floor(h) * dY_46_v)) ^ single(2.0)));
	t_3 = sqrt(t_2);
	t_4 = t_3 / floor(maxAniso);
	t_5 = floor(h) * t_0;
	t_6 = t_2 / (floor(w) * t_5);
	t_7 = t_6 > floor(maxAniso);
	tmp = single(0.0);
	if (t_7)
		tmp = t_4;
	else
		tmp = sqrt((single(1.0) / t_2)) * (dY_46_v * (t_1 * floor(h)));
	end
	tmp_4 = single(0.0);
	if (tmp < single(1.0))
		tmp_5 = single(0.0);
		if (t_7)
			tmp_5 = t_4;
		else
			tmp_5 = floor(h) * ((single(1.0) / t_3) * (floor(w) * t_0));
		end
		tmp_6 = single(0.0);
		if (t_7)
			tmp_6 = floor(maxAniso);
		else
			tmp_6 = t_6;
		end
		tmp_4 = max(single(1.0), (tmp_5 * tmp_6));
	elseif ((((floor(w) * (t_5 / t_2)) ^ single(2.0)) ^ single(-0.5)) > floor(maxAniso))
		tmp_4 = floor(maxAniso);
	else
		tmp_4 = t_6;
	end
	tmp_7 = tmp_4;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := dX.u \cdot dY.v - dX.v \cdot dY.u\\
t_1 := dX.u \cdot \left\lfloorw\right\rfloor\\
t_2 := \mathsf{max}\left({\left(\mathsf{hypot}\left(t\_1, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\
t_3 := \sqrt{t\_2}\\
t_4 := \frac{t\_3}{\left\lfloormaxAniso\right\rfloor}\\
t_5 := \left\lfloorh\right\rfloor \cdot t\_0\\
t_6 := \frac{t\_2}{\left\lfloorw\right\rfloor \cdot t\_5}\\
t_7 := t\_6 > \left\lfloormaxAniso\right\rfloor\\
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;t\_7:\\
\;\;\;\;t\_4\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{1}{t\_2}} \cdot \left(dY.v \cdot \left(t\_1 \cdot \left\lfloorh\right\rfloor\right)\right)\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, \begin{array}{l}
\mathbf{if}\;t\_7:\\
\;\;\;\;t\_4\\

\mathbf{else}:\\
\;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\frac{1}{t\_3} \cdot \left(\left\lfloorw\right\rfloor \cdot t\_0\right)\right)\\


\end{array} \cdot \begin{array}{l}
\mathbf{if}\;t\_7:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_6\\


\end{array}\right)\\

\mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{t\_5}{t\_2}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_6\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  4. Simplified58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
  5. Taylor expanded in dX.u around 0 58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ } \end{array}} \]
  6. Simplified59.0%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ } \end{array}} \]
  7. Step-by-step derivation
    1. clear-num59.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{\frac{1}{\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
    2. *-commutative59.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{1}{\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{\left\lfloorw\right\rfloor \cdot dX.u}, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
    3. *-commutative59.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{1}{\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \color{blue}{\left\lfloorh\right\rfloor \cdot dX.v}\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
    4. unpow-159.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{{\left(\frac{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{-1}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  8. Applied egg-rr59.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  9. Taylor expanded in dX.u around inf 60.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left(dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  10. Simplified60.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot \left\lfloorw\right\rfloor\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right) \cdot \frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  11. Final simplification60.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(dY.v \cdot \left(\left(dX.u \cdot \left\lfloorw\right\rfloor\right) \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\left\lfloorw\right\rfloor \cdot \frac{\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{2}\right)}^{-0.5} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  12. Add Preprocessing

Alternative 7: 59.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_1 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\\ t_2 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_3 := \mathsf{max}\left(t\_0, {\left(\mathsf{hypot}\left(t\_2, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\ t_4 := \frac{t\_3}{t\_1}\\ t_5 := t\_4 > \left\lfloormaxAniso\right\rfloor\\ t_6 := \begin{array}{l} \mathbf{if}\;t\_5:\\ \;\;\;\;\frac{\sqrt{t\_3}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{t\_3}} \cdot t\_1\\ \end{array}\\ \mathbf{if}\;t\_6 < 1:\\ \;\;\;\;\mathsf{max}\left(1, t\_6 \cdot \begin{array}{l} \mathbf{if}\;t\_5:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(t\_0, {t\_2}^{2}\right)}{t\_1}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\frac{t\_3}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}\right)}^{3}\right)}^{0.3333333333333333} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0))
        (t_1 (* (- (* dX.u dY.v) (* dX.v dY.u)) (* (floor w) (floor h))))
        (t_2 (* (floor w) dY.u))
        (t_3 (fmax t_0 (pow (hypot t_2 (* (floor h) dY.v)) 2.0)))
        (t_4 (/ t_3 t_1))
        (t_5 (> t_4 (floor maxAniso)))
        (t_6
         (if t_5 (/ (sqrt t_3) (floor maxAniso)) (* (sqrt (/ 1.0 t_3)) t_1))))
   (if (< t_6 1.0)
     (fmax
      1.0
      (* t_6 (if t_5 (floor maxAniso) (/ (fmax t_0 (pow t_2 2.0)) t_1))))
     (if (>
          (pow
           (pow (/ t_3 (* (floor w) (* (floor h) (* dX.u dY.v)))) 3.0)
           0.3333333333333333)
          (floor maxAniso))
       (floor maxAniso)
       t_4))))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f);
	float t_1 = ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)) * (floorf(w) * floorf(h));
	float t_2 = floorf(w) * dY_46_u;
	float t_3 = fmaxf(t_0, powf(hypotf(t_2, (floorf(h) * dY_46_v)), 2.0f));
	float t_4 = t_3 / t_1;
	int t_5 = t_4 > floorf(maxAniso);
	float tmp;
	if (t_5) {
		tmp = sqrtf(t_3) / floorf(maxAniso);
	} else {
		tmp = sqrtf((1.0f / t_3)) * t_1;
	}
	float t_6 = tmp;
	float tmp_2;
	if (t_6 < 1.0f) {
		float tmp_3;
		if (t_5) {
			tmp_3 = floorf(maxAniso);
		} else {
			tmp_3 = fmaxf(t_0, powf(t_2, 2.0f)) / t_1;
		}
		tmp_2 = fmaxf(1.0f, (t_6 * tmp_3));
	} else if (powf(powf((t_3 / (floorf(w) * (floorf(h) * (dX_46_u * dY_46_v)))), 3.0f), 0.3333333333333333f) > floorf(maxAniso)) {
		tmp_2 = floorf(maxAniso);
	} else {
		tmp_2 = t_4;
	}
	return tmp_2;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_1 = Float32(Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u)) * Float32(floor(w) * floor(h)))
	t_2 = Float32(floor(w) * dY_46_u)
	t_3 = (t_0 != t_0) ? (hypot(t_2, Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) : (((hypot(t_2, Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) != (hypot(t_2, Float32(floor(h) * dY_46_v)) ^ Float32(2.0))) ? t_0 : max(t_0, (hypot(t_2, Float32(floor(h) * dY_46_v)) ^ Float32(2.0))))
	t_4 = Float32(t_3 / t_1)
	t_5 = t_4 > floor(maxAniso)
	tmp = Float32(0.0)
	if (t_5)
		tmp = Float32(sqrt(t_3) / floor(maxAniso));
	else
		tmp = Float32(sqrt(Float32(Float32(1.0) / t_3)) * t_1);
	end
	t_6 = tmp
	tmp_2 = Float32(0.0)
	if (t_6 < Float32(1.0))
		tmp_3 = Float32(0.0)
		if (t_5)
			tmp_3 = floor(maxAniso);
		else
			tmp_3 = Float32(((t_0 != t_0) ? (t_2 ^ Float32(2.0)) : (((t_2 ^ Float32(2.0)) != (t_2 ^ Float32(2.0))) ? t_0 : max(t_0, (t_2 ^ Float32(2.0))))) / t_1);
		end
		tmp_2 = (Float32(1.0) != Float32(1.0)) ? Float32(t_6 * tmp_3) : ((Float32(t_6 * tmp_3) != Float32(t_6 * tmp_3)) ? Float32(1.0) : max(Float32(1.0), Float32(t_6 * tmp_3)));
	elseif (((Float32(t_3 / Float32(floor(w) * Float32(floor(h) * Float32(dX_46_u * dY_46_v)))) ^ Float32(3.0)) ^ Float32(0.3333333333333333)) > floor(maxAniso))
		tmp_2 = floor(maxAniso);
	else
		tmp_2 = t_4;
	end
	return tmp_2
end
function tmp_5 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = hypot((dX_46_u * floor(w)), (dX_46_v * floor(h))) ^ single(2.0);
	t_1 = ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)) * (floor(w) * floor(h));
	t_2 = floor(w) * dY_46_u;
	t_3 = max(t_0, (hypot(t_2, (floor(h) * dY_46_v)) ^ single(2.0)));
	t_4 = t_3 / t_1;
	t_5 = t_4 > floor(maxAniso);
	tmp = single(0.0);
	if (t_5)
		tmp = sqrt(t_3) / floor(maxAniso);
	else
		tmp = sqrt((single(1.0) / t_3)) * t_1;
	end
	t_6 = tmp;
	tmp_3 = single(0.0);
	if (t_6 < single(1.0))
		tmp_4 = single(0.0);
		if (t_5)
			tmp_4 = floor(maxAniso);
		else
			tmp_4 = max(t_0, (t_2 ^ single(2.0))) / t_1;
		end
		tmp_3 = max(single(1.0), (t_6 * tmp_4));
	elseif ((((t_3 / (floor(w) * (floor(h) * (dX_46_u * dY_46_v)))) ^ single(3.0)) ^ single(0.3333333333333333)) > floor(maxAniso))
		tmp_3 = floor(maxAniso);
	else
		tmp_3 = t_4;
	end
	tmp_5 = tmp_3;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_1 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\\
t_2 := \left\lfloorw\right\rfloor \cdot dY.u\\
t_3 := \mathsf{max}\left(t\_0, {\left(\mathsf{hypot}\left(t\_2, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\
t_4 := \frac{t\_3}{t\_1}\\
t_5 := t\_4 > \left\lfloormaxAniso\right\rfloor\\
t_6 := \begin{array}{l}
\mathbf{if}\;t\_5:\\
\;\;\;\;\frac{\sqrt{t\_3}}{\left\lfloormaxAniso\right\rfloor}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{1}{t\_3}} \cdot t\_1\\


\end{array}\\
\mathbf{if}\;t\_6 < 1:\\
\;\;\;\;\mathsf{max}\left(1, t\_6 \cdot \begin{array}{l}
\mathbf{if}\;t\_5:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{max}\left(t\_0, {t\_2}^{2}\right)}{t\_1}\\


\end{array}\right)\\

\mathbf{elif}\;{\left({\left(\frac{t\_3}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}\right)}^{3}\right)}^{0.3333333333333333} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_4\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  4. Simplified58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
  5. Taylor expanded in dX.u around inf 50.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  6. Step-by-step derivation
    1. fma-define50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\color{blue}{\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. fma-define50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \color{blue}{\mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    3. *-commutative50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    4. associate-*r*50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    5. *-commutative50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    6. *-commutative50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    7. associate-*l*50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  7. Simplified50.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  8. Taylor expanded in dY.u around inf 51.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  9. Step-by-step derivation
    1. *-commutative98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    2. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot {dY.u}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    3. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dY.u \cdot dY.u\right)\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    4. swap-sqr98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    5. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
  10. Simplified51.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  11. Applied egg-rr60.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{{\left({\left(\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}\right)}^{3}\right)}^{0.3333333333333333}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  12. Final simplification60.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array}\right)\\ \mathbf{elif}\;{\left({\left(\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}\right)}^{3}\right)}^{0.3333333333333333} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array} \]
  13. Add Preprocessing

Alternative 8: 59.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_1 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\ t_2 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_3 := \mathsf{max}\left(t\_2, {\left(\mathsf{hypot}\left(t\_0, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\ t_4 := \frac{\sqrt{t\_3}}{\left\lfloormaxAniso\right\rfloor}\\ t_5 := {\left(\left\lfloorh\right\rfloor\right)}^{2}\\ t_6 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\ t_7 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot t\_6\\ t_8 := \sqrt{\frac{1}{t\_3}} \cdot t\_7\\ t_9 := \frac{t\_3}{t\_7}\\ t_10 := t\_9 > \left\lfloormaxAniso\right\rfloor\\ \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{t\_3}{\left(dX.u \cdot dY.v\right) \cdot t\_6} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;t\_8\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;t\_10:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;t\_8\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;t\_10:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(t\_2, {t\_0}^{2}\right)}{t\_7}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, t\_1, {dX.v}^{2} \cdot t\_5\right), \mathsf{fma}\left({dY.u}^{2}, t\_1, t\_5 \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_9\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (* (floor w) dY.u))
        (t_1 (pow (floor w) 2.0))
        (t_2 (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0))
        (t_3 (fmax t_2 (pow (hypot t_0 (* (floor h) dY.v)) 2.0)))
        (t_4 (/ (sqrt t_3) (floor maxAniso)))
        (t_5 (pow (floor h) 2.0))
        (t_6 (* (floor w) (floor h)))
        (t_7 (* (- (* dX.u dY.v) (* dX.v dY.u)) t_6))
        (t_8 (* (sqrt (/ 1.0 t_3)) t_7))
        (t_9 (/ t_3 t_7))
        (t_10 (> t_9 (floor maxAniso))))
   (if (< (if (> (/ t_3 (* (* dX.u dY.v) t_6)) (floor maxAniso)) t_4 t_8) 1.0)
     (fmax
      1.0
      (*
       (if t_10 t_4 t_8)
       (if t_10 (floor maxAniso) (/ (fmax t_2 (pow t_0 2.0)) t_7))))
     (if (>
          (/
           (fmax
            (fma (pow dX.u 2.0) t_1 (* (pow dX.v 2.0) t_5))
            (fma (pow dY.u 2.0) t_1 (* t_5 (pow dY.v 2.0))))
           (* (floor w) (* (floor h) (* dX.u dY.v))))
          (floor maxAniso))
       (floor maxAniso)
       t_9))))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = floorf(w) * dY_46_u;
	float t_1 = powf(floorf(w), 2.0f);
	float t_2 = powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f);
	float t_3 = fmaxf(t_2, powf(hypotf(t_0, (floorf(h) * dY_46_v)), 2.0f));
	float t_4 = sqrtf(t_3) / floorf(maxAniso);
	float t_5 = powf(floorf(h), 2.0f);
	float t_6 = floorf(w) * floorf(h);
	float t_7 = ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)) * t_6;
	float t_8 = sqrtf((1.0f / t_3)) * t_7;
	float t_9 = t_3 / t_7;
	int t_10 = t_9 > floorf(maxAniso);
	float tmp;
	if ((t_3 / ((dX_46_u * dY_46_v) * t_6)) > floorf(maxAniso)) {
		tmp = t_4;
	} else {
		tmp = t_8;
	}
	float tmp_3;
	if (tmp < 1.0f) {
		float tmp_4;
		if (t_10) {
			tmp_4 = t_4;
		} else {
			tmp_4 = t_8;
		}
		float tmp_5;
		if (t_10) {
			tmp_5 = floorf(maxAniso);
		} else {
			tmp_5 = fmaxf(t_2, powf(t_0, 2.0f)) / t_7;
		}
		tmp_3 = fmaxf(1.0f, (tmp_4 * tmp_5));
	} else if ((fmaxf(fmaf(powf(dX_46_u, 2.0f), t_1, (powf(dX_46_v, 2.0f) * t_5)), fmaf(powf(dY_46_u, 2.0f), t_1, (t_5 * powf(dY_46_v, 2.0f)))) / (floorf(w) * (floorf(h) * (dX_46_u * dY_46_v)))) > floorf(maxAniso)) {
		tmp_3 = floorf(maxAniso);
	} else {
		tmp_3 = t_9;
	}
	return tmp_3;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(floor(w) * dY_46_u)
	t_1 = floor(w) ^ Float32(2.0)
	t_2 = hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_3 = (t_2 != t_2) ? (hypot(t_0, Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) : (((hypot(t_0, Float32(floor(h) * dY_46_v)) ^ Float32(2.0)) != (hypot(t_0, Float32(floor(h) * dY_46_v)) ^ Float32(2.0))) ? t_2 : max(t_2, (hypot(t_0, Float32(floor(h) * dY_46_v)) ^ Float32(2.0))))
	t_4 = Float32(sqrt(t_3) / floor(maxAniso))
	t_5 = floor(h) ^ Float32(2.0)
	t_6 = Float32(floor(w) * floor(h))
	t_7 = Float32(Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u)) * t_6)
	t_8 = Float32(sqrt(Float32(Float32(1.0) / t_3)) * t_7)
	t_9 = Float32(t_3 / t_7)
	t_10 = t_9 > floor(maxAniso)
	tmp = Float32(0.0)
	if (Float32(t_3 / Float32(Float32(dX_46_u * dY_46_v) * t_6)) > floor(maxAniso))
		tmp = t_4;
	else
		tmp = t_8;
	end
	tmp_3 = Float32(0.0)
	if (tmp < Float32(1.0))
		tmp_4 = Float32(0.0)
		if (t_10)
			tmp_4 = t_4;
		else
			tmp_4 = t_8;
		end
		tmp_5 = Float32(0.0)
		if (t_10)
			tmp_5 = floor(maxAniso);
		else
			tmp_5 = Float32(((t_2 != t_2) ? (t_0 ^ Float32(2.0)) : (((t_0 ^ Float32(2.0)) != (t_0 ^ Float32(2.0))) ? t_2 : max(t_2, (t_0 ^ Float32(2.0))))) / t_7);
		end
		tmp_3 = (Float32(1.0) != Float32(1.0)) ? Float32(tmp_4 * tmp_5) : ((Float32(tmp_4 * tmp_5) != Float32(tmp_4 * tmp_5)) ? Float32(1.0) : max(Float32(1.0), Float32(tmp_4 * tmp_5)));
	elseif (Float32(((fma((dX_46_u ^ Float32(2.0)), t_1, Float32((dX_46_v ^ Float32(2.0)) * t_5)) != fma((dX_46_u ^ Float32(2.0)), t_1, Float32((dX_46_v ^ Float32(2.0)) * t_5))) ? fma((dY_46_u ^ Float32(2.0)), t_1, Float32(t_5 * (dY_46_v ^ Float32(2.0)))) : ((fma((dY_46_u ^ Float32(2.0)), t_1, Float32(t_5 * (dY_46_v ^ Float32(2.0)))) != fma((dY_46_u ^ Float32(2.0)), t_1, Float32(t_5 * (dY_46_v ^ Float32(2.0))))) ? fma((dX_46_u ^ Float32(2.0)), t_1, Float32((dX_46_v ^ Float32(2.0)) * t_5)) : max(fma((dX_46_u ^ Float32(2.0)), t_1, Float32((dX_46_v ^ Float32(2.0)) * t_5)), fma((dY_46_u ^ Float32(2.0)), t_1, Float32(t_5 * (dY_46_v ^ Float32(2.0))))))) / Float32(floor(w) * Float32(floor(h) * Float32(dX_46_u * dY_46_v)))) > floor(maxAniso))
		tmp_3 = floor(maxAniso);
	else
		tmp_3 = t_9;
	end
	return tmp_3
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\
t_1 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\
t_2 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_3 := \mathsf{max}\left(t\_2, {\left(\mathsf{hypot}\left(t\_0, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\\
t_4 := \frac{\sqrt{t\_3}}{\left\lfloormaxAniso\right\rfloor}\\
t_5 := {\left(\left\lfloorh\right\rfloor\right)}^{2}\\
t_6 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\
t_7 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot t\_6\\
t_8 := \sqrt{\frac{1}{t\_3}} \cdot t\_7\\
t_9 := \frac{t\_3}{t\_7}\\
t_10 := t\_9 > \left\lfloormaxAniso\right\rfloor\\
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;\frac{t\_3}{\left(dX.u \cdot dY.v\right) \cdot t\_6} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_4\\

\mathbf{else}:\\
\;\;\;\;t\_8\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, \begin{array}{l}
\mathbf{if}\;t\_10:\\
\;\;\;\;t\_4\\

\mathbf{else}:\\
\;\;\;\;t\_8\\


\end{array} \cdot \begin{array}{l}
\mathbf{if}\;t\_10:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{max}\left(t\_2, {t\_0}^{2}\right)}{t\_7}\\


\end{array}\right)\\

\mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, t\_1, {dX.v}^{2} \cdot t\_5\right), \mathsf{fma}\left({dY.u}^{2}, t\_1, t\_5 \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_9\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  4. Simplified58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
  5. Taylor expanded in dX.u around inf 50.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  6. Step-by-step derivation
    1. fma-define50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\color{blue}{\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. fma-define50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \color{blue}{\mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    3. *-commutative50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    4. associate-*r*50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    5. *-commutative50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    6. *-commutative50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    7. associate-*l*50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  7. Simplified50.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\color{blue}{\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  8. Taylor expanded in dY.u around inf 51.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  9. Step-by-step derivation
    1. *-commutative98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    2. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot {dY.u}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    3. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dY.u \cdot dY.u\right)\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    4. swap-sqr98.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
    5. unpow298.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left|\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right|}\\ \end{array} \]
  10. Simplified51.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  11. Taylor expanded in dX.u around inf 59.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  12. Simplified59.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  13. Final simplification59.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array} \]
  14. Add Preprocessing

Alternative 9: 50.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\ t_1 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot t\_0\\ t_2 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\ t_3 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_4 := {\left(\left\lfloorh\right\rfloor\right)}^{2}\\ t_5 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_6 := \mathsf{max}\left(t\_3, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_5\right)\right)}^{2}\right)\\ t_7 := \frac{\sqrt{t\_6}}{\left\lfloormaxAniso\right\rfloor}\\ t_8 := \sqrt{\frac{1}{t\_6}} \cdot t\_1\\ t_9 := \frac{t\_6}{t\_1}\\ t_10 := t\_9 > \left\lfloormaxAniso\right\rfloor\\ \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{t\_6}{\left(dX.u \cdot dY.v\right) \cdot t\_0} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_7\\ \mathbf{else}:\\ \;\;\;\;t\_8\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(t\_3, {t\_5}^{2}\right)}{t\_1} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_7\\ \mathbf{else}:\\ \;\;\;\;t\_8\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;t\_10:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_9\\ \end{array}\right)\\ \mathbf{elif}\;t\_10:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, t\_2, {dX.v}^{2} \cdot t\_4\right), \mathsf{fma}\left({dY.u}^{2}, t\_2, t\_4 \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (* (floor w) (floor h)))
        (t_1 (* (- (* dX.u dY.v) (* dX.v dY.u)) t_0))
        (t_2 (pow (floor w) 2.0))
        (t_3 (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0))
        (t_4 (pow (floor h) 2.0))
        (t_5 (* (floor h) dY.v))
        (t_6 (fmax t_3 (pow (hypot (* (floor w) dY.u) t_5) 2.0)))
        (t_7 (/ (sqrt t_6) (floor maxAniso)))
        (t_8 (* (sqrt (/ 1.0 t_6)) t_1))
        (t_9 (/ t_6 t_1))
        (t_10 (> t_9 (floor maxAniso))))
   (if (< (if (> (/ t_6 (* (* dX.u dY.v) t_0)) (floor maxAniso)) t_7 t_8) 1.0)
     (fmax
      1.0
      (*
       (if (> (/ (fmax t_3 (pow t_5 2.0)) t_1) (floor maxAniso)) t_7 t_8)
       (if t_10 (floor maxAniso) t_9)))
     (if t_10
       (floor maxAniso)
       (/
        (fmax
         (fma (pow dX.u 2.0) t_2 (* (pow dX.v 2.0) t_4))
         (fma (pow dY.u 2.0) t_2 (* t_4 (pow dY.v 2.0))))
        (* (floor w) (* (floor h) (* dX.u dY.v))))))))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = floorf(w) * floorf(h);
	float t_1 = ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)) * t_0;
	float t_2 = powf(floorf(w), 2.0f);
	float t_3 = powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f);
	float t_4 = powf(floorf(h), 2.0f);
	float t_5 = floorf(h) * dY_46_v;
	float t_6 = fmaxf(t_3, powf(hypotf((floorf(w) * dY_46_u), t_5), 2.0f));
	float t_7 = sqrtf(t_6) / floorf(maxAniso);
	float t_8 = sqrtf((1.0f / t_6)) * t_1;
	float t_9 = t_6 / t_1;
	int t_10 = t_9 > floorf(maxAniso);
	float tmp;
	if ((t_6 / ((dX_46_u * dY_46_v) * t_0)) > floorf(maxAniso)) {
		tmp = t_7;
	} else {
		tmp = t_8;
	}
	float tmp_3;
	if (tmp < 1.0f) {
		float tmp_4;
		if ((fmaxf(t_3, powf(t_5, 2.0f)) / t_1) > floorf(maxAniso)) {
			tmp_4 = t_7;
		} else {
			tmp_4 = t_8;
		}
		float tmp_5;
		if (t_10) {
			tmp_5 = floorf(maxAniso);
		} else {
			tmp_5 = t_9;
		}
		tmp_3 = fmaxf(1.0f, (tmp_4 * tmp_5));
	} else if (t_10) {
		tmp_3 = floorf(maxAniso);
	} else {
		tmp_3 = fmaxf(fmaf(powf(dX_46_u, 2.0f), t_2, (powf(dX_46_v, 2.0f) * t_4)), fmaf(powf(dY_46_u, 2.0f), t_2, (t_4 * powf(dY_46_v, 2.0f)))) / (floorf(w) * (floorf(h) * (dX_46_u * dY_46_v)));
	}
	return tmp_3;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(floor(w) * floor(h))
	t_1 = Float32(Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u)) * t_0)
	t_2 = floor(w) ^ Float32(2.0)
	t_3 = hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_4 = floor(h) ^ Float32(2.0)
	t_5 = Float32(floor(h) * dY_46_v)
	t_6 = (t_3 != t_3) ? (hypot(Float32(floor(w) * dY_46_u), t_5) ^ Float32(2.0)) : (((hypot(Float32(floor(w) * dY_46_u), t_5) ^ Float32(2.0)) != (hypot(Float32(floor(w) * dY_46_u), t_5) ^ Float32(2.0))) ? t_3 : max(t_3, (hypot(Float32(floor(w) * dY_46_u), t_5) ^ Float32(2.0))))
	t_7 = Float32(sqrt(t_6) / floor(maxAniso))
	t_8 = Float32(sqrt(Float32(Float32(1.0) / t_6)) * t_1)
	t_9 = Float32(t_6 / t_1)
	t_10 = t_9 > floor(maxAniso)
	tmp = Float32(0.0)
	if (Float32(t_6 / Float32(Float32(dX_46_u * dY_46_v) * t_0)) > floor(maxAniso))
		tmp = t_7;
	else
		tmp = t_8;
	end
	tmp_3 = Float32(0.0)
	if (tmp < Float32(1.0))
		tmp_4 = Float32(0.0)
		if (Float32(((t_3 != t_3) ? (t_5 ^ Float32(2.0)) : (((t_5 ^ Float32(2.0)) != (t_5 ^ Float32(2.0))) ? t_3 : max(t_3, (t_5 ^ Float32(2.0))))) / t_1) > floor(maxAniso))
			tmp_4 = t_7;
		else
			tmp_4 = t_8;
		end
		tmp_5 = Float32(0.0)
		if (t_10)
			tmp_5 = floor(maxAniso);
		else
			tmp_5 = t_9;
		end
		tmp_3 = (Float32(1.0) != Float32(1.0)) ? Float32(tmp_4 * tmp_5) : ((Float32(tmp_4 * tmp_5) != Float32(tmp_4 * tmp_5)) ? Float32(1.0) : max(Float32(1.0), Float32(tmp_4 * tmp_5)));
	elseif (t_10)
		tmp_3 = floor(maxAniso);
	else
		tmp_3 = Float32(((fma((dX_46_u ^ Float32(2.0)), t_2, Float32((dX_46_v ^ Float32(2.0)) * t_4)) != fma((dX_46_u ^ Float32(2.0)), t_2, Float32((dX_46_v ^ Float32(2.0)) * t_4))) ? fma((dY_46_u ^ Float32(2.0)), t_2, Float32(t_4 * (dY_46_v ^ Float32(2.0)))) : ((fma((dY_46_u ^ Float32(2.0)), t_2, Float32(t_4 * (dY_46_v ^ Float32(2.0)))) != fma((dY_46_u ^ Float32(2.0)), t_2, Float32(t_4 * (dY_46_v ^ Float32(2.0))))) ? fma((dX_46_u ^ Float32(2.0)), t_2, Float32((dX_46_v ^ Float32(2.0)) * t_4)) : max(fma((dX_46_u ^ Float32(2.0)), t_2, Float32((dX_46_v ^ Float32(2.0)) * t_4)), fma((dY_46_u ^ Float32(2.0)), t_2, Float32(t_4 * (dY_46_v ^ Float32(2.0))))))) / Float32(floor(w) * Float32(floor(h) * Float32(dX_46_u * dY_46_v))));
	end
	return tmp_3
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\
t_1 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot t\_0\\
t_2 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\
t_3 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_4 := {\left(\left\lfloorh\right\rfloor\right)}^{2}\\
t_5 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_6 := \mathsf{max}\left(t\_3, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_5\right)\right)}^{2}\right)\\
t_7 := \frac{\sqrt{t\_6}}{\left\lfloormaxAniso\right\rfloor}\\
t_8 := \sqrt{\frac{1}{t\_6}} \cdot t\_1\\
t_9 := \frac{t\_6}{t\_1}\\
t_10 := t\_9 > \left\lfloormaxAniso\right\rfloor\\
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;\frac{t\_6}{\left(dX.u \cdot dY.v\right) \cdot t\_0} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_7\\

\mathbf{else}:\\
\;\;\;\;t\_8\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, \begin{array}{l}
\mathbf{if}\;\frac{\mathsf{max}\left(t\_3, {t\_5}^{2}\right)}{t\_1} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_7\\

\mathbf{else}:\\
\;\;\;\;t\_8\\


\end{array} \cdot \begin{array}{l}
\mathbf{if}\;t\_10:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_9\\


\end{array}\right)\\

\mathbf{elif}\;t\_10:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, t\_2, {dX.v}^{2} \cdot t\_4\right), \mathsf{fma}\left({dY.u}^{2}, t\_2, t\_4 \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  4. Simplified58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
  5. Taylor expanded in dX.u around inf 52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  6. Simplified52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  7. Taylor expanded in dY.u around 0 52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  8. Step-by-step derivation
    1. *-commutative52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot {dY.v}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    3. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \color{blue}{\left(dY.v \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    4. swap-sqr52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    5. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  9. Simplified52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  10. Taylor expanded in dX.u around inf 53.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}\\ \end{array} \]
  11. Step-by-step derivation
    1. fma-define50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\color{blue}{\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. fma-define50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \color{blue}{\mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    3. *-commutative50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    4. associate-*r*50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    5. *-commutative50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    6. *-commutative50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    7. associate-*l*50.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\color{blue}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  12. Simplified53.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}\\ \end{array} \]
  13. Final simplification53.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\mathsf{fma}\left({dX.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{fma}\left({dY.u}^{2}, {\left(\left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v\right)\right)}\\ \end{array} \]
  14. Add Preprocessing

Alternative 10: 51.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := dX.u \cdot \left\lfloorw\right\rfloor\\ t_1 := {\left(\mathsf{hypot}\left(t\_0, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_2 := dX.u \cdot dY.v - dX.v \cdot dY.u\\ t_3 := t\_2 \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\\ t_4 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_5 := \mathsf{max}\left(t\_1, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_4\right)\right)}^{2}\right)\\ t_6 := \frac{\sqrt{t\_5}}{\left\lfloormaxAniso\right\rfloor}\\ t_7 := \frac{t\_5}{t\_3}\\ t_8 := \sqrt{\frac{1}{t\_5}}\\ t_9 := \begin{array}{l} \mathbf{if}\;t\_7 > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array}\\ \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{t\_5}{dY.v \cdot \left(t\_0 \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_6\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(t\_2 \cdot t\_8\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(t\_1, {t\_4}^{2}\right)}{t\_3} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_6\\ \mathbf{else}:\\ \;\;\;\;t\_8 \cdot t\_3\\ \end{array} \cdot t\_9\right)\\ \mathbf{else}:\\ \;\;\;\;t\_9\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (* dX.u (floor w)))
        (t_1 (pow (hypot t_0 (* dX.v (floor h))) 2.0))
        (t_2 (- (* dX.u dY.v) (* dX.v dY.u)))
        (t_3 (* t_2 (* (floor w) (floor h))))
        (t_4 (* (floor h) dY.v))
        (t_5 (fmax t_1 (pow (hypot (* (floor w) dY.u) t_4) 2.0)))
        (t_6 (/ (sqrt t_5) (floor maxAniso)))
        (t_7 (/ t_5 t_3))
        (t_8 (sqrt (/ 1.0 t_5)))
        (t_9 (if (> t_7 (floor maxAniso)) (floor maxAniso) t_7)))
   (if (<
        (if (> (/ t_5 (* dY.v (* t_0 (floor h)))) (floor maxAniso))
          t_6
          (* (floor h) (* (floor w) (* t_2 t_8))))
        1.0)
     (fmax
      1.0
      (*
       (if (> (/ (fmax t_1 (pow t_4 2.0)) t_3) (floor maxAniso))
         t_6
         (* t_8 t_3))
       t_9))
     t_9)))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = dX_46_u * floorf(w);
	float t_1 = powf(hypotf(t_0, (dX_46_v * floorf(h))), 2.0f);
	float t_2 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	float t_3 = t_2 * (floorf(w) * floorf(h));
	float t_4 = floorf(h) * dY_46_v;
	float t_5 = fmaxf(t_1, powf(hypotf((floorf(w) * dY_46_u), t_4), 2.0f));
	float t_6 = sqrtf(t_5) / floorf(maxAniso);
	float t_7 = t_5 / t_3;
	float t_8 = sqrtf((1.0f / t_5));
	float tmp;
	if (t_7 > floorf(maxAniso)) {
		tmp = floorf(maxAniso);
	} else {
		tmp = t_7;
	}
	float t_9 = tmp;
	float tmp_1;
	if ((t_5 / (dY_46_v * (t_0 * floorf(h)))) > floorf(maxAniso)) {
		tmp_1 = t_6;
	} else {
		tmp_1 = floorf(h) * (floorf(w) * (t_2 * t_8));
	}
	float tmp_3;
	if (tmp_1 < 1.0f) {
		float tmp_4;
		if ((fmaxf(t_1, powf(t_4, 2.0f)) / t_3) > floorf(maxAniso)) {
			tmp_4 = t_6;
		} else {
			tmp_4 = t_8 * t_3;
		}
		tmp_3 = fmaxf(1.0f, (tmp_4 * t_9));
	} else {
		tmp_3 = t_9;
	}
	return tmp_3;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(dX_46_u * floor(w))
	t_1 = hypot(t_0, Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_2 = Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u))
	t_3 = Float32(t_2 * Float32(floor(w) * floor(h)))
	t_4 = Float32(floor(h) * dY_46_v)
	t_5 = (t_1 != t_1) ? (hypot(Float32(floor(w) * dY_46_u), t_4) ^ Float32(2.0)) : (((hypot(Float32(floor(w) * dY_46_u), t_4) ^ Float32(2.0)) != (hypot(Float32(floor(w) * dY_46_u), t_4) ^ Float32(2.0))) ? t_1 : max(t_1, (hypot(Float32(floor(w) * dY_46_u), t_4) ^ Float32(2.0))))
	t_6 = Float32(sqrt(t_5) / floor(maxAniso))
	t_7 = Float32(t_5 / t_3)
	t_8 = sqrt(Float32(Float32(1.0) / t_5))
	tmp = Float32(0.0)
	if (t_7 > floor(maxAniso))
		tmp = floor(maxAniso);
	else
		tmp = t_7;
	end
	t_9 = tmp
	tmp_1 = Float32(0.0)
	if (Float32(t_5 / Float32(dY_46_v * Float32(t_0 * floor(h)))) > floor(maxAniso))
		tmp_1 = t_6;
	else
		tmp_1 = Float32(floor(h) * Float32(floor(w) * Float32(t_2 * t_8)));
	end
	tmp_3 = Float32(0.0)
	if (tmp_1 < Float32(1.0))
		tmp_4 = Float32(0.0)
		if (Float32(((t_1 != t_1) ? (t_4 ^ Float32(2.0)) : (((t_4 ^ Float32(2.0)) != (t_4 ^ Float32(2.0))) ? t_1 : max(t_1, (t_4 ^ Float32(2.0))))) / t_3) > floor(maxAniso))
			tmp_4 = t_6;
		else
			tmp_4 = Float32(t_8 * t_3);
		end
		tmp_3 = (Float32(1.0) != Float32(1.0)) ? Float32(tmp_4 * t_9) : ((Float32(tmp_4 * t_9) != Float32(tmp_4 * t_9)) ? Float32(1.0) : max(Float32(1.0), Float32(tmp_4 * t_9)));
	else
		tmp_3 = t_9;
	end
	return tmp_3
end
function tmp_6 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = dX_46_u * floor(w);
	t_1 = hypot(t_0, (dX_46_v * floor(h))) ^ single(2.0);
	t_2 = (dX_46_u * dY_46_v) - (dX_46_v * dY_46_u);
	t_3 = t_2 * (floor(w) * floor(h));
	t_4 = floor(h) * dY_46_v;
	t_5 = max(t_1, (hypot((floor(w) * dY_46_u), t_4) ^ single(2.0)));
	t_6 = sqrt(t_5) / floor(maxAniso);
	t_7 = t_5 / t_3;
	t_8 = sqrt((single(1.0) / t_5));
	tmp = single(0.0);
	if (t_7 > floor(maxAniso))
		tmp = floor(maxAniso);
	else
		tmp = t_7;
	end
	t_9 = tmp;
	tmp_2 = single(0.0);
	if ((t_5 / (dY_46_v * (t_0 * floor(h)))) > floor(maxAniso))
		tmp_2 = t_6;
	else
		tmp_2 = floor(h) * (floor(w) * (t_2 * t_8));
	end
	tmp_4 = single(0.0);
	if (tmp_2 < single(1.0))
		tmp_5 = single(0.0);
		if ((max(t_1, (t_4 ^ single(2.0))) / t_3) > floor(maxAniso))
			tmp_5 = t_6;
		else
			tmp_5 = t_8 * t_3;
		end
		tmp_4 = max(single(1.0), (tmp_5 * t_9));
	else
		tmp_4 = t_9;
	end
	tmp_6 = tmp_4;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := dX.u \cdot \left\lfloorw\right\rfloor\\
t_1 := {\left(\mathsf{hypot}\left(t\_0, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_2 := dX.u \cdot dY.v - dX.v \cdot dY.u\\
t_3 := t\_2 \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\\
t_4 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_5 := \mathsf{max}\left(t\_1, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_4\right)\right)}^{2}\right)\\
t_6 := \frac{\sqrt{t\_5}}{\left\lfloormaxAniso\right\rfloor}\\
t_7 := \frac{t\_5}{t\_3}\\
t_8 := \sqrt{\frac{1}{t\_5}}\\
t_9 := \begin{array}{l}
\mathbf{if}\;t\_7 > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array}\\
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;\frac{t\_5}{dY.v \cdot \left(t\_0 \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_6\\

\mathbf{else}:\\
\;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(t\_2 \cdot t\_8\right)\right)\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, \begin{array}{l}
\mathbf{if}\;\frac{\mathsf{max}\left(t\_1, {t\_4}^{2}\right)}{t\_3} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_6\\

\mathbf{else}:\\
\;\;\;\;t\_8 \cdot t\_3\\


\end{array} \cdot t\_9\right)\\

\mathbf{else}:\\
\;\;\;\;t\_9\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  4. Simplified58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
  5. Taylor expanded in dX.u around inf 52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  6. Simplified52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  7. Taylor expanded in dY.u around 0 52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  8. Step-by-step derivation
    1. *-commutative52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot {dY.v}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    3. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \color{blue}{\left(dY.v \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    4. swap-sqr52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    5. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  9. Simplified52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  10. Taylor expanded in dX.u around 0 52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1}:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  11. Simplified52.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\right)\\ \end{array} < 1}:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  12. Final simplification52.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{dY.v \cdot \left(\left(dX.u \cdot \left\lfloorw\right\rfloor\right) \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array} \]
  13. Add Preprocessing

Alternative 11: 50.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ t_1 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_2 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_3 := \mathsf{max}\left(t\_1, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_2\right)\right)}^{2}\right)\\ t_4 := \frac{t\_3}{t\_0}\\ t_5 := \begin{array}{l} \mathbf{if}\;t\_4 > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array}\\ t_6 := \frac{\sqrt{t\_3}}{\left\lfloormaxAniso\right\rfloor}\\ t_7 := t\_0 \cdot \sqrt{\frac{1}{t\_3}}\\ \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{t\_3}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_6\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, t\_5 \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(t\_1, {t\_2}^{2}\right)}{t\_0} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_6\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (* (floor w) (* (floor h) (- (* dX.u dY.v) (* dX.v dY.u)))))
        (t_1 (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0))
        (t_2 (* (floor h) dY.v))
        (t_3 (fmax t_1 (pow (hypot (* (floor w) dY.u) t_2) 2.0)))
        (t_4 (/ t_3 t_0))
        (t_5 (if (> t_4 (floor maxAniso)) (floor maxAniso) t_4))
        (t_6 (/ (sqrt t_3) (floor maxAniso)))
        (t_7 (* t_0 (sqrt (/ 1.0 t_3)))))
   (if (<
        (if (>
             (/ t_3 (* dX.u (* dY.v (* (floor w) (floor h)))))
             (floor maxAniso))
          t_6
          t_7)
        1.0)
     (fmax
      1.0
      (*
       t_5
       (if (> (/ (fmax t_1 (pow t_2 2.0)) t_0) (floor maxAniso)) t_6 t_7)))
     t_5)))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = floorf(w) * (floorf(h) * ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)));
	float t_1 = powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f);
	float t_2 = floorf(h) * dY_46_v;
	float t_3 = fmaxf(t_1, powf(hypotf((floorf(w) * dY_46_u), t_2), 2.0f));
	float t_4 = t_3 / t_0;
	float tmp;
	if (t_4 > floorf(maxAniso)) {
		tmp = floorf(maxAniso);
	} else {
		tmp = t_4;
	}
	float t_5 = tmp;
	float t_6 = sqrtf(t_3) / floorf(maxAniso);
	float t_7 = t_0 * sqrtf((1.0f / t_3));
	float tmp_1;
	if ((t_3 / (dX_46_u * (dY_46_v * (floorf(w) * floorf(h))))) > floorf(maxAniso)) {
		tmp_1 = t_6;
	} else {
		tmp_1 = t_7;
	}
	float tmp_3;
	if (tmp_1 < 1.0f) {
		float tmp_4;
		if ((fmaxf(t_1, powf(t_2, 2.0f)) / t_0) > floorf(maxAniso)) {
			tmp_4 = t_6;
		} else {
			tmp_4 = t_7;
		}
		tmp_3 = fmaxf(1.0f, (t_5 * tmp_4));
	} else {
		tmp_3 = t_5;
	}
	return tmp_3;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(floor(w) * Float32(floor(h) * Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u))))
	t_1 = hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_2 = Float32(floor(h) * dY_46_v)
	t_3 = (t_1 != t_1) ? (hypot(Float32(floor(w) * dY_46_u), t_2) ^ Float32(2.0)) : (((hypot(Float32(floor(w) * dY_46_u), t_2) ^ Float32(2.0)) != (hypot(Float32(floor(w) * dY_46_u), t_2) ^ Float32(2.0))) ? t_1 : max(t_1, (hypot(Float32(floor(w) * dY_46_u), t_2) ^ Float32(2.0))))
	t_4 = Float32(t_3 / t_0)
	tmp = Float32(0.0)
	if (t_4 > floor(maxAniso))
		tmp = floor(maxAniso);
	else
		tmp = t_4;
	end
	t_5 = tmp
	t_6 = Float32(sqrt(t_3) / floor(maxAniso))
	t_7 = Float32(t_0 * sqrt(Float32(Float32(1.0) / t_3)))
	tmp_1 = Float32(0.0)
	if (Float32(t_3 / Float32(dX_46_u * Float32(dY_46_v * Float32(floor(w) * floor(h))))) > floor(maxAniso))
		tmp_1 = t_6;
	else
		tmp_1 = t_7;
	end
	tmp_3 = Float32(0.0)
	if (tmp_1 < Float32(1.0))
		tmp_4 = Float32(0.0)
		if (Float32(((t_1 != t_1) ? (t_2 ^ Float32(2.0)) : (((t_2 ^ Float32(2.0)) != (t_2 ^ Float32(2.0))) ? t_1 : max(t_1, (t_2 ^ Float32(2.0))))) / t_0) > floor(maxAniso))
			tmp_4 = t_6;
		else
			tmp_4 = t_7;
		end
		tmp_3 = (Float32(1.0) != Float32(1.0)) ? Float32(t_5 * tmp_4) : ((Float32(t_5 * tmp_4) != Float32(t_5 * tmp_4)) ? Float32(1.0) : max(Float32(1.0), Float32(t_5 * tmp_4)));
	else
		tmp_3 = t_5;
	end
	return tmp_3
end
function tmp_6 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = floor(w) * (floor(h) * ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)));
	t_1 = hypot((dX_46_u * floor(w)), (dX_46_v * floor(h))) ^ single(2.0);
	t_2 = floor(h) * dY_46_v;
	t_3 = max(t_1, (hypot((floor(w) * dY_46_u), t_2) ^ single(2.0)));
	t_4 = t_3 / t_0;
	tmp = single(0.0);
	if (t_4 > floor(maxAniso))
		tmp = floor(maxAniso);
	else
		tmp = t_4;
	end
	t_5 = tmp;
	t_6 = sqrt(t_3) / floor(maxAniso);
	t_7 = t_0 * sqrt((single(1.0) / t_3));
	tmp_2 = single(0.0);
	if ((t_3 / (dX_46_u * (dY_46_v * (floor(w) * floor(h))))) > floor(maxAniso))
		tmp_2 = t_6;
	else
		tmp_2 = t_7;
	end
	tmp_4 = single(0.0);
	if (tmp_2 < single(1.0))
		tmp_5 = single(0.0);
		if ((max(t_1, (t_2 ^ single(2.0))) / t_0) > floor(maxAniso))
			tmp_5 = t_6;
		else
			tmp_5 = t_7;
		end
		tmp_4 = max(single(1.0), (t_5 * tmp_5));
	else
		tmp_4 = t_5;
	end
	tmp_6 = tmp_4;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_2 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_3 := \mathsf{max}\left(t\_1, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_2\right)\right)}^{2}\right)\\
t_4 := \frac{t\_3}{t\_0}\\
t_5 := \begin{array}{l}
\mathbf{if}\;t\_4 > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_4\\


\end{array}\\
t_6 := \frac{\sqrt{t\_3}}{\left\lfloormaxAniso\right\rfloor}\\
t_7 := t\_0 \cdot \sqrt{\frac{1}{t\_3}}\\
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;\frac{t\_3}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_6\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, t\_5 \cdot \begin{array}{l}
\mathbf{if}\;\frac{\mathsf{max}\left(t\_1, {t\_2}^{2}\right)}{t\_0} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_6\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_5\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  4. Simplified58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
  5. Taylor expanded in dX.u around inf 52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  6. Simplified52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  7. Taylor expanded in dY.u around 0 52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  8. Step-by-step derivation
    1. *-commutative52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot {dY.v}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    3. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \color{blue}{\left(dY.v \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    4. swap-sqr52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    5. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  9. Simplified52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  10. Taylor expanded in dX.u around 0 52.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left\lfloorh\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ } \end{array}} \]
  11. Simplified52.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ } \end{array}} \]
  12. Final simplification52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\right) \cdot \sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)}\\ \end{array} \]
  13. Add Preprocessing

Alternative 12: 50.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_1 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\ t_2 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot t\_1\\ t_3 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_4 := \mathsf{max}\left(t\_0, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_3\right)\right)}^{2}\right)\\ t_5 := \frac{\sqrt{t\_4}}{\left\lfloormaxAniso\right\rfloor}\\ t_6 := \frac{t\_4}{t\_2}\\ t_7 := \begin{array}{l} \mathbf{if}\;t\_6 > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_6\\ \end{array}\\ \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{t\_4}{\left(dX.u \cdot dY.v\right) \cdot t\_1} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{t\_4}} \cdot t\_2\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, t\_7 \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(t\_0, {t\_3}^{2}\right)}{t\_2} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot {t\_4}^{-0.5}\\ \end{array}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0))
        (t_1 (* (floor w) (floor h)))
        (t_2 (* (- (* dX.u dY.v) (* dX.v dY.u)) t_1))
        (t_3 (* (floor h) dY.v))
        (t_4 (fmax t_0 (pow (hypot (* (floor w) dY.u) t_3) 2.0)))
        (t_5 (/ (sqrt t_4) (floor maxAniso)))
        (t_6 (/ t_4 t_2))
        (t_7 (if (> t_6 (floor maxAniso)) (floor maxAniso) t_6)))
   (if (<
        (if (> (/ t_4 (* (* dX.u dY.v) t_1)) (floor maxAniso))
          t_5
          (* (sqrt (/ 1.0 t_4)) t_2))
        1.0)
     (fmax
      1.0
      (*
       t_7
       (if (> (/ (fmax t_0 (pow t_3 2.0)) t_2) (floor maxAniso))
         t_5
         (* t_2 (pow t_4 -0.5)))))
     t_7)))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f);
	float t_1 = floorf(w) * floorf(h);
	float t_2 = ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)) * t_1;
	float t_3 = floorf(h) * dY_46_v;
	float t_4 = fmaxf(t_0, powf(hypotf((floorf(w) * dY_46_u), t_3), 2.0f));
	float t_5 = sqrtf(t_4) / floorf(maxAniso);
	float t_6 = t_4 / t_2;
	float tmp;
	if (t_6 > floorf(maxAniso)) {
		tmp = floorf(maxAniso);
	} else {
		tmp = t_6;
	}
	float t_7 = tmp;
	float tmp_1;
	if ((t_4 / ((dX_46_u * dY_46_v) * t_1)) > floorf(maxAniso)) {
		tmp_1 = t_5;
	} else {
		tmp_1 = sqrtf((1.0f / t_4)) * t_2;
	}
	float tmp_3;
	if (tmp_1 < 1.0f) {
		float tmp_4;
		if ((fmaxf(t_0, powf(t_3, 2.0f)) / t_2) > floorf(maxAniso)) {
			tmp_4 = t_5;
		} else {
			tmp_4 = t_2 * powf(t_4, -0.5f);
		}
		tmp_3 = fmaxf(1.0f, (t_7 * tmp_4));
	} else {
		tmp_3 = t_7;
	}
	return tmp_3;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_1 = Float32(floor(w) * floor(h))
	t_2 = Float32(Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u)) * t_1)
	t_3 = Float32(floor(h) * dY_46_v)
	t_4 = (t_0 != t_0) ? (hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0)) : (((hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0)) != (hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0))) ? t_0 : max(t_0, (hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0))))
	t_5 = Float32(sqrt(t_4) / floor(maxAniso))
	t_6 = Float32(t_4 / t_2)
	tmp = Float32(0.0)
	if (t_6 > floor(maxAniso))
		tmp = floor(maxAniso);
	else
		tmp = t_6;
	end
	t_7 = tmp
	tmp_1 = Float32(0.0)
	if (Float32(t_4 / Float32(Float32(dX_46_u * dY_46_v) * t_1)) > floor(maxAniso))
		tmp_1 = t_5;
	else
		tmp_1 = Float32(sqrt(Float32(Float32(1.0) / t_4)) * t_2);
	end
	tmp_3 = Float32(0.0)
	if (tmp_1 < Float32(1.0))
		tmp_4 = Float32(0.0)
		if (Float32(((t_0 != t_0) ? (t_3 ^ Float32(2.0)) : (((t_3 ^ Float32(2.0)) != (t_3 ^ Float32(2.0))) ? t_0 : max(t_0, (t_3 ^ Float32(2.0))))) / t_2) > floor(maxAniso))
			tmp_4 = t_5;
		else
			tmp_4 = Float32(t_2 * (t_4 ^ Float32(-0.5)));
		end
		tmp_3 = (Float32(1.0) != Float32(1.0)) ? Float32(t_7 * tmp_4) : ((Float32(t_7 * tmp_4) != Float32(t_7 * tmp_4)) ? Float32(1.0) : max(Float32(1.0), Float32(t_7 * tmp_4)));
	else
		tmp_3 = t_7;
	end
	return tmp_3
end
function tmp_6 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = hypot((dX_46_u * floor(w)), (dX_46_v * floor(h))) ^ single(2.0);
	t_1 = floor(w) * floor(h);
	t_2 = ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)) * t_1;
	t_3 = floor(h) * dY_46_v;
	t_4 = max(t_0, (hypot((floor(w) * dY_46_u), t_3) ^ single(2.0)));
	t_5 = sqrt(t_4) / floor(maxAniso);
	t_6 = t_4 / t_2;
	tmp = single(0.0);
	if (t_6 > floor(maxAniso))
		tmp = floor(maxAniso);
	else
		tmp = t_6;
	end
	t_7 = tmp;
	tmp_2 = single(0.0);
	if ((t_4 / ((dX_46_u * dY_46_v) * t_1)) > floor(maxAniso))
		tmp_2 = t_5;
	else
		tmp_2 = sqrt((single(1.0) / t_4)) * t_2;
	end
	tmp_4 = single(0.0);
	if (tmp_2 < single(1.0))
		tmp_5 = single(0.0);
		if ((max(t_0, (t_3 ^ single(2.0))) / t_2) > floor(maxAniso))
			tmp_5 = t_5;
		else
			tmp_5 = t_2 * (t_4 ^ single(-0.5));
		end
		tmp_4 = max(single(1.0), (t_7 * tmp_5));
	else
		tmp_4 = t_7;
	end
	tmp_6 = tmp_4;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_1 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\
t_2 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot t\_1\\
t_3 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_4 := \mathsf{max}\left(t\_0, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_3\right)\right)}^{2}\right)\\
t_5 := \frac{\sqrt{t\_4}}{\left\lfloormaxAniso\right\rfloor}\\
t_6 := \frac{t\_4}{t\_2}\\
t_7 := \begin{array}{l}
\mathbf{if}\;t\_6 > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_6\\


\end{array}\\
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;\frac{t\_4}{\left(dX.u \cdot dY.v\right) \cdot t\_1} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_5\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{1}{t\_4}} \cdot t\_2\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, t\_7 \cdot \begin{array}{l}
\mathbf{if}\;\frac{\mathsf{max}\left(t\_0, {t\_3}^{2}\right)}{t\_2} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_5\\

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot {t\_4}^{-0.5}\\


\end{array}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  4. Simplified58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
  5. Taylor expanded in dX.u around inf 52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  6. Simplified52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  7. Taylor expanded in dY.u around 0 52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  8. Step-by-step derivation
    1. *-commutative52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot {dY.v}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    3. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \color{blue}{\left(dY.v \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    4. swap-sqr52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    5. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  9. Simplified52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  10. Step-by-step derivation
    1. pow1/252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}\right)}^{0.5} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. inv-pow52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\right)}^{-1}\right)}^{0.5} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    3. pow-pow52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\right)}^{\left(-1 \cdot 0.5\right)} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    4. *-commutative52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\right)}^{\left(-1 \cdot 0.5\right)} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    5. *-commutative52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\right)}^{\left(-1 \cdot 0.5\right)} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    6. metadata-eval52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\right)}^{-0.5} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  11. Applied egg-rr52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\right)}^{-0.5} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  12. Final simplification52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right) \cdot {\left(\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)\right)}^{-0.5}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array} \]
  13. Add Preprocessing

Alternative 13: 51.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\ t_1 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot t\_0\\ t_2 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_3 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_4 := \mathsf{max}\left(t\_2, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_3\right)\right)}^{2}\right)\\ t_5 := \frac{\sqrt{t\_4}}{\left\lfloormaxAniso\right\rfloor}\\ t_6 := \sqrt{\frac{1}{t\_4}} \cdot t\_1\\ t_7 := \frac{t\_4}{t\_1}\\ \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{t\_4}{\left(dX.u \cdot dY.v\right) \cdot t\_0} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;t\_6\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(t\_2, {t\_3}^{2}\right)}{t\_1} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;t\_6\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{t\_4}{\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot dY.u\right)\right) \cdot \left(-dX.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array}\right)\\ \mathbf{elif}\;t\_7 > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (* (floor w) (floor h)))
        (t_1 (* (- (* dX.u dY.v) (* dX.v dY.u)) t_0))
        (t_2 (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0))
        (t_3 (* (floor h) dY.v))
        (t_4 (fmax t_2 (pow (hypot (* (floor w) dY.u) t_3) 2.0)))
        (t_5 (/ (sqrt t_4) (floor maxAniso)))
        (t_6 (* (sqrt (/ 1.0 t_4)) t_1))
        (t_7 (/ t_4 t_1)))
   (if (< (if (> (/ t_4 (* (* dX.u dY.v) t_0)) (floor maxAniso)) t_5 t_6) 1.0)
     (fmax
      1.0
      (*
       (if (> (/ (fmax t_2 (pow t_3 2.0)) t_1) (floor maxAniso)) t_5 t_6)
       (if (>
            (/ t_4 (* (* (floor w) (* (floor h) dY.u)) (- dX.v)))
            (floor maxAniso))
         (floor maxAniso)
         t_7)))
     (if (> t_7 (floor maxAniso)) (floor maxAniso) t_7))))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = floorf(w) * floorf(h);
	float t_1 = ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)) * t_0;
	float t_2 = powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f);
	float t_3 = floorf(h) * dY_46_v;
	float t_4 = fmaxf(t_2, powf(hypotf((floorf(w) * dY_46_u), t_3), 2.0f));
	float t_5 = sqrtf(t_4) / floorf(maxAniso);
	float t_6 = sqrtf((1.0f / t_4)) * t_1;
	float t_7 = t_4 / t_1;
	float tmp;
	if ((t_4 / ((dX_46_u * dY_46_v) * t_0)) > floorf(maxAniso)) {
		tmp = t_5;
	} else {
		tmp = t_6;
	}
	float tmp_3;
	if (tmp < 1.0f) {
		float tmp_4;
		if ((fmaxf(t_2, powf(t_3, 2.0f)) / t_1) > floorf(maxAniso)) {
			tmp_4 = t_5;
		} else {
			tmp_4 = t_6;
		}
		float tmp_5;
		if ((t_4 / ((floorf(w) * (floorf(h) * dY_46_u)) * -dX_46_v)) > floorf(maxAniso)) {
			tmp_5 = floorf(maxAniso);
		} else {
			tmp_5 = t_7;
		}
		tmp_3 = fmaxf(1.0f, (tmp_4 * tmp_5));
	} else if (t_7 > floorf(maxAniso)) {
		tmp_3 = floorf(maxAniso);
	} else {
		tmp_3 = t_7;
	}
	return tmp_3;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(floor(w) * floor(h))
	t_1 = Float32(Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u)) * t_0)
	t_2 = hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_3 = Float32(floor(h) * dY_46_v)
	t_4 = (t_2 != t_2) ? (hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0)) : (((hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0)) != (hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0))) ? t_2 : max(t_2, (hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0))))
	t_5 = Float32(sqrt(t_4) / floor(maxAniso))
	t_6 = Float32(sqrt(Float32(Float32(1.0) / t_4)) * t_1)
	t_7 = Float32(t_4 / t_1)
	tmp = Float32(0.0)
	if (Float32(t_4 / Float32(Float32(dX_46_u * dY_46_v) * t_0)) > floor(maxAniso))
		tmp = t_5;
	else
		tmp = t_6;
	end
	tmp_3 = Float32(0.0)
	if (tmp < Float32(1.0))
		tmp_4 = Float32(0.0)
		if (Float32(((t_2 != t_2) ? (t_3 ^ Float32(2.0)) : (((t_3 ^ Float32(2.0)) != (t_3 ^ Float32(2.0))) ? t_2 : max(t_2, (t_3 ^ Float32(2.0))))) / t_1) > floor(maxAniso))
			tmp_4 = t_5;
		else
			tmp_4 = t_6;
		end
		tmp_5 = Float32(0.0)
		if (Float32(t_4 / Float32(Float32(floor(w) * Float32(floor(h) * dY_46_u)) * Float32(-dX_46_v))) > floor(maxAniso))
			tmp_5 = floor(maxAniso);
		else
			tmp_5 = t_7;
		end
		tmp_3 = (Float32(1.0) != Float32(1.0)) ? Float32(tmp_4 * tmp_5) : ((Float32(tmp_4 * tmp_5) != Float32(tmp_4 * tmp_5)) ? Float32(1.0) : max(Float32(1.0), Float32(tmp_4 * tmp_5)));
	elseif (t_7 > floor(maxAniso))
		tmp_3 = floor(maxAniso);
	else
		tmp_3 = t_7;
	end
	return tmp_3
end
function tmp_7 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = floor(w) * floor(h);
	t_1 = ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)) * t_0;
	t_2 = hypot((dX_46_u * floor(w)), (dX_46_v * floor(h))) ^ single(2.0);
	t_3 = floor(h) * dY_46_v;
	t_4 = max(t_2, (hypot((floor(w) * dY_46_u), t_3) ^ single(2.0)));
	t_5 = sqrt(t_4) / floor(maxAniso);
	t_6 = sqrt((single(1.0) / t_4)) * t_1;
	t_7 = t_4 / t_1;
	tmp = single(0.0);
	if ((t_4 / ((dX_46_u * dY_46_v) * t_0)) > floor(maxAniso))
		tmp = t_5;
	else
		tmp = t_6;
	end
	tmp_4 = single(0.0);
	if (tmp < single(1.0))
		tmp_5 = single(0.0);
		if ((max(t_2, (t_3 ^ single(2.0))) / t_1) > floor(maxAniso))
			tmp_5 = t_5;
		else
			tmp_5 = t_6;
		end
		tmp_6 = single(0.0);
		if ((t_4 / ((floor(w) * (floor(h) * dY_46_u)) * -dX_46_v)) > floor(maxAniso))
			tmp_6 = floor(maxAniso);
		else
			tmp_6 = t_7;
		end
		tmp_4 = max(single(1.0), (tmp_5 * tmp_6));
	elseif (t_7 > floor(maxAniso))
		tmp_4 = floor(maxAniso);
	else
		tmp_4 = t_7;
	end
	tmp_7 = tmp_4;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\
t_1 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot t\_0\\
t_2 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_3 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_4 := \mathsf{max}\left(t\_2, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_3\right)\right)}^{2}\right)\\
t_5 := \frac{\sqrt{t\_4}}{\left\lfloormaxAniso\right\rfloor}\\
t_6 := \sqrt{\frac{1}{t\_4}} \cdot t\_1\\
t_7 := \frac{t\_4}{t\_1}\\
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;\frac{t\_4}{\left(dX.u \cdot dY.v\right) \cdot t\_0} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_5\\

\mathbf{else}:\\
\;\;\;\;t\_6\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, \begin{array}{l}
\mathbf{if}\;\frac{\mathsf{max}\left(t\_2, {t\_3}^{2}\right)}{t\_1} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_5\\

\mathbf{else}:\\
\;\;\;\;t\_6\\


\end{array} \cdot \begin{array}{l}
\mathbf{if}\;\frac{t\_4}{\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot dY.u\right)\right) \cdot \left(-dX.v\right)} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array}\right)\\

\mathbf{elif}\;t\_7 > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  4. Simplified58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
  5. Taylor expanded in dX.u around inf 52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  6. Simplified52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  7. Taylor expanded in dY.u around 0 52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  8. Step-by-step derivation
    1. *-commutative52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot {dY.v}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    3. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \color{blue}{\left(dY.v \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    4. swap-sqr52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    5. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  9. Simplified52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  10. Taylor expanded in dX.u around 0 52.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\color{blue}{-1 \cdot \frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  11. Simplified52.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left(dY.u \cdot \left\lfloorh\right\rfloor\right) \cdot \left\lfloorw\right\rfloor\right) \cdot \left(-dX.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  12. Final simplification52.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorh\right\rfloor \cdot dY.u\right)\right) \cdot \left(-dX.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array} \]
  13. Add Preprocessing

Alternative 14: 51.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\ t_1 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\ t_2 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot t\_1\\ t_3 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_4 := \mathsf{max}\left(t\_0, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_3\right)\right)}^{2}\right)\\ t_5 := \frac{\sqrt{t\_4}}{\left\lfloormaxAniso\right\rfloor}\\ t_6 := \sqrt{\frac{1}{t\_4}} \cdot t\_2\\ t_7 := \frac{t\_4}{t\_2}\\ t_8 := \begin{array}{l} \mathbf{if}\;t\_7 > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array}\\ \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{t\_4}{\left(dX.u \cdot dY.v\right) \cdot t\_1} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;t\_6\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, t\_8 \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(t\_0, {t\_3}^{2}\right)}{dX.u \cdot \left(dY.v \cdot t\_1\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;t\_5\\ \mathbf{else}:\\ \;\;\;\;t\_6\\ \end{array}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_8\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (pow (hypot (* dX.u (floor w)) (* dX.v (floor h))) 2.0))
        (t_1 (* (floor w) (floor h)))
        (t_2 (* (- (* dX.u dY.v) (* dX.v dY.u)) t_1))
        (t_3 (* (floor h) dY.v))
        (t_4 (fmax t_0 (pow (hypot (* (floor w) dY.u) t_3) 2.0)))
        (t_5 (/ (sqrt t_4) (floor maxAniso)))
        (t_6 (* (sqrt (/ 1.0 t_4)) t_2))
        (t_7 (/ t_4 t_2))
        (t_8 (if (> t_7 (floor maxAniso)) (floor maxAniso) t_7)))
   (if (< (if (> (/ t_4 (* (* dX.u dY.v) t_1)) (floor maxAniso)) t_5 t_6) 1.0)
     (fmax
      1.0
      (*
       t_8
       (if (>
            (/ (fmax t_0 (pow t_3 2.0)) (* dX.u (* dY.v t_1)))
            (floor maxAniso))
         t_5
         t_6)))
     t_8)))
float code(float w, float h, float dX_46_u, float dX_46_v, float dY_46_u, float dY_46_v, float maxAniso) {
	float t_0 = powf(hypotf((dX_46_u * floorf(w)), (dX_46_v * floorf(h))), 2.0f);
	float t_1 = floorf(w) * floorf(h);
	float t_2 = ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)) * t_1;
	float t_3 = floorf(h) * dY_46_v;
	float t_4 = fmaxf(t_0, powf(hypotf((floorf(w) * dY_46_u), t_3), 2.0f));
	float t_5 = sqrtf(t_4) / floorf(maxAniso);
	float t_6 = sqrtf((1.0f / t_4)) * t_2;
	float t_7 = t_4 / t_2;
	float tmp;
	if (t_7 > floorf(maxAniso)) {
		tmp = floorf(maxAniso);
	} else {
		tmp = t_7;
	}
	float t_8 = tmp;
	float tmp_1;
	if ((t_4 / ((dX_46_u * dY_46_v) * t_1)) > floorf(maxAniso)) {
		tmp_1 = t_5;
	} else {
		tmp_1 = t_6;
	}
	float tmp_3;
	if (tmp_1 < 1.0f) {
		float tmp_4;
		if ((fmaxf(t_0, powf(t_3, 2.0f)) / (dX_46_u * (dY_46_v * t_1))) > floorf(maxAniso)) {
			tmp_4 = t_5;
		} else {
			tmp_4 = t_6;
		}
		tmp_3 = fmaxf(1.0f, (t_8 * tmp_4));
	} else {
		tmp_3 = t_8;
	}
	return tmp_3;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = hypot(Float32(dX_46_u * floor(w)), Float32(dX_46_v * floor(h))) ^ Float32(2.0)
	t_1 = Float32(floor(w) * floor(h))
	t_2 = Float32(Float32(Float32(dX_46_u * dY_46_v) - Float32(dX_46_v * dY_46_u)) * t_1)
	t_3 = Float32(floor(h) * dY_46_v)
	t_4 = (t_0 != t_0) ? (hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0)) : (((hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0)) != (hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0))) ? t_0 : max(t_0, (hypot(Float32(floor(w) * dY_46_u), t_3) ^ Float32(2.0))))
	t_5 = Float32(sqrt(t_4) / floor(maxAniso))
	t_6 = Float32(sqrt(Float32(Float32(1.0) / t_4)) * t_2)
	t_7 = Float32(t_4 / t_2)
	tmp = Float32(0.0)
	if (t_7 > floor(maxAniso))
		tmp = floor(maxAniso);
	else
		tmp = t_7;
	end
	t_8 = tmp
	tmp_1 = Float32(0.0)
	if (Float32(t_4 / Float32(Float32(dX_46_u * dY_46_v) * t_1)) > floor(maxAniso))
		tmp_1 = t_5;
	else
		tmp_1 = t_6;
	end
	tmp_3 = Float32(0.0)
	if (tmp_1 < Float32(1.0))
		tmp_4 = Float32(0.0)
		if (Float32(((t_0 != t_0) ? (t_3 ^ Float32(2.0)) : (((t_3 ^ Float32(2.0)) != (t_3 ^ Float32(2.0))) ? t_0 : max(t_0, (t_3 ^ Float32(2.0))))) / Float32(dX_46_u * Float32(dY_46_v * t_1))) > floor(maxAniso))
			tmp_4 = t_5;
		else
			tmp_4 = t_6;
		end
		tmp_3 = (Float32(1.0) != Float32(1.0)) ? Float32(t_8 * tmp_4) : ((Float32(t_8 * tmp_4) != Float32(t_8 * tmp_4)) ? Float32(1.0) : max(Float32(1.0), Float32(t_8 * tmp_4)));
	else
		tmp_3 = t_8;
	end
	return tmp_3
end
function tmp_6 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = hypot((dX_46_u * floor(w)), (dX_46_v * floor(h))) ^ single(2.0);
	t_1 = floor(w) * floor(h);
	t_2 = ((dX_46_u * dY_46_v) - (dX_46_v * dY_46_u)) * t_1;
	t_3 = floor(h) * dY_46_v;
	t_4 = max(t_0, (hypot((floor(w) * dY_46_u), t_3) ^ single(2.0)));
	t_5 = sqrt(t_4) / floor(maxAniso);
	t_6 = sqrt((single(1.0) / t_4)) * t_2;
	t_7 = t_4 / t_2;
	tmp = single(0.0);
	if (t_7 > floor(maxAniso))
		tmp = floor(maxAniso);
	else
		tmp = t_7;
	end
	t_8 = tmp;
	tmp_2 = single(0.0);
	if ((t_4 / ((dX_46_u * dY_46_v) * t_1)) > floor(maxAniso))
		tmp_2 = t_5;
	else
		tmp_2 = t_6;
	end
	tmp_4 = single(0.0);
	if (tmp_2 < single(1.0))
		tmp_5 = single(0.0);
		if ((max(t_0, (t_3 ^ single(2.0))) / (dX_46_u * (dY_46_v * t_1))) > floor(maxAniso))
			tmp_5 = t_5;
		else
			tmp_5 = t_6;
		end
		tmp_4 = max(single(1.0), (t_8 * tmp_5));
	else
		tmp_4 = t_8;
	end
	tmp_6 = tmp_4;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}\\
t_1 := \left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\\
t_2 := \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot t\_1\\
t_3 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_4 := \mathsf{max}\left(t\_0, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, t\_3\right)\right)}^{2}\right)\\
t_5 := \frac{\sqrt{t\_4}}{\left\lfloormaxAniso\right\rfloor}\\
t_6 := \sqrt{\frac{1}{t\_4}} \cdot t\_2\\
t_7 := \frac{t\_4}{t\_2}\\
t_8 := \begin{array}{l}
\mathbf{if}\;t\_7 > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;\left\lfloormaxAniso\right\rfloor\\

\mathbf{else}:\\
\;\;\;\;t\_7\\


\end{array}\\
\mathbf{if}\;\begin{array}{l}
\mathbf{if}\;\frac{t\_4}{\left(dX.u \cdot dY.v\right) \cdot t\_1} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_5\\

\mathbf{else}:\\
\;\;\;\;t\_6\\


\end{array} < 1:\\
\;\;\;\;\mathsf{max}\left(1, t\_8 \cdot \begin{array}{l}
\mathbf{if}\;\frac{\mathsf{max}\left(t\_0, {t\_3}^{2}\right)}{dX.u \cdot \left(dY.v \cdot t\_1\right)} > \left\lfloormaxAniso\right\rfloor:\\
\;\;\;\;t\_5\\

\mathbf{else}:\\
\;\;\;\;t\_6\\


\end{array}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_8\\


\end{array}
\end{array}
Derivation
  1. Initial program 97.6%

    \[\begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}{\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right), \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)}{\left|\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right) - \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)\right|}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in w around 0 97.6%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{1}{\left\lfloormaxAniso\right\rfloor} \cdot \sqrt{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right| \cdot \sqrt{\frac{1}{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{\left|dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right) - dX.v \cdot \left(dY.u \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)\right|}\\ } \end{array}} \]
  4. Simplified58.7%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ } \end{array}} \]
  5. Taylor expanded in dX.u around inf 52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  6. Simplified52.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  7. Taylor expanded in dY.u around 0 52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  8. Step-by-step derivation
    1. *-commutative52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot {dY.v}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    3. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \color{blue}{\left(dY.v \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    4. swap-sqr52.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    5. unpow252.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  9. Simplified52.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  10. Taylor expanded in dX.u around inf 51.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorw\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
  11. Step-by-step derivation
    1. Simplified51.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\color{blue}{\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)}} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)\right)\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \left(dX.u \cdot dY.v - dX.v \cdot dY.u\right)}\\ \end{array} \]
    2. Final simplification51.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array} < 1:\\ \;\;\;\;\mathsf{max}\left(1, \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array} \cdot \begin{array}{l} \mathbf{if}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}{dX.u \cdot \left(dY.v \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\frac{\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}}{\left\lfloormaxAniso\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{1}{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}} \cdot \left(\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right)\\ \end{array}\right)\\ \mathbf{elif}\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} > \left\lfloormaxAniso\right\rfloor:\\ \;\;\;\;\left\lfloormaxAniso\right\rfloor\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)}^{2}\right)}{\left(dX.u \cdot dY.v - dX.v \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot \left\lfloorh\right\rfloor\right)}\\ \end{array} \]
    3. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2024139 
    (FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
      :name "Anisotropic x16 LOD (ratio of anisotropy)"
      :precision binary32
      :pre (and (and (and (and (and (and (and (<= 1.0 w) (<= w 16384.0)) (and (<= 1.0 h) (<= h 16384.0))) (and (<= 1e-20 (fabs dX.u)) (<= (fabs dX.u) 1e+20))) (and (<= 1e-20 (fabs dX.v)) (<= (fabs dX.v) 1e+20))) (and (<= 1e-20 (fabs dY.u)) (<= (fabs dY.u) 1e+20))) (and (<= 1e-20 (fabs dY.v)) (<= (fabs dY.v) 1e+20))) (== maxAniso 16.0))
      (if (< (if (> (/ (fmax (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v)))) (fabs (- (* (* (floor w) dX.u) (* (floor h) dY.v)) (* (* (floor h) dX.v) (* (floor w) dY.u))))) (floor maxAniso)) (/ (sqrt (fmax (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v))))) (floor maxAniso)) (/ (fabs (- (* (* (floor w) dX.u) (* (floor h) dY.v)) (* (* (floor h) dX.v) (* (floor w) dY.u)))) (sqrt (fmax (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v))))))) 1.0) (fmax 1.0 (* (if (> (/ (fmax (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v)))) (fabs (- (* (* (floor w) dX.u) (* (floor h) dY.v)) (* (* (floor h) dX.v) (* (floor w) dY.u))))) (floor maxAniso)) (floor maxAniso) (/ (fmax (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v)))) (fabs (- (* (* (floor w) dX.u) (* (floor h) dY.v)) (* (* (floor h) dX.v) (* (floor w) dY.u)))))) (if (> (/ (fmax (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v)))) (fabs (- (* (* (floor w) dX.u) (* (floor h) dY.v)) (* (* (floor h) dX.v) (* (floor w) dY.u))))) (floor maxAniso)) (/ (sqrt (fmax (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v))))) (floor maxAniso)) (/ (fabs (- (* (* (floor w) dX.u) (* (floor h) dY.v)) (* (* (floor h) dX.v) (* (floor w) dY.u)))) (sqrt (fmax (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v))))))))) (if (> (/ (fmax (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v)))) (fabs (- (* (* (floor w) dX.u) (* (floor h) dY.v)) (* (* (floor h) dX.v) (* (floor w) dY.u))))) (floor maxAniso)) (floor maxAniso) (/ (fmax (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v)))) (fabs (- (* (* (floor w) dX.u) (* (floor h) dY.v)) (* (* (floor h) dX.v) (* (floor w) dY.u))))))))