Anisotropic x16 LOD (line direction, v)

Percentage Accurate: 76.7% → 77.0%
Time: 26.1s
Alternatives: 9
Speedup: 1.0×

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\lfloorw\right\rfloor \cdot dY.u\\ t_2 := \left\lfloorw\right\rfloor \cdot dX.u\\ t_3 := t\_2 \cdot t\_2 + t\_0 \cdot t\_0\\ t_4 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_5 := t\_1 \cdot t\_1 + t\_4 \cdot t\_4\\ t_6 := \frac{1}{\sqrt{\mathsf{max}\left(t\_3, t\_5\right)}}\\ \mathbf{if}\;t\_3 \geq t\_5:\\ \;\;\;\;t\_6 \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_6 \cdot t\_4\\ \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 w) dY.u))
        (t_2 (* (floor w) dX.u))
        (t_3 (+ (* t_2 t_2) (* t_0 t_0)))
        (t_4 (* (floor h) dY.v))
        (t_5 (+ (* t_1 t_1) (* t_4 t_4)))
        (t_6 (/ 1.0 (sqrt (fmax t_3 t_5)))))
   (if (>= t_3 t_5) (* t_6 t_0) (* t_6 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 = floorf(h) * dX_46_v;
	float t_1 = floorf(w) * dY_46_u;
	float t_2 = floorf(w) * dX_46_u;
	float t_3 = (t_2 * t_2) + (t_0 * t_0);
	float t_4 = floorf(h) * dY_46_v;
	float t_5 = (t_1 * t_1) + (t_4 * t_4);
	float t_6 = 1.0f / sqrtf(fmaxf(t_3, t_5));
	float tmp;
	if (t_3 >= t_5) {
		tmp = t_6 * t_0;
	} else {
		tmp = t_6 * t_4;
	}
	return tmp;
}
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(w) * dY_46_u)
	t_2 = Float32(floor(w) * dX_46_u)
	t_3 = Float32(Float32(t_2 * t_2) + Float32(t_0 * t_0))
	t_4 = Float32(floor(h) * dY_46_v)
	t_5 = Float32(Float32(t_1 * t_1) + Float32(t_4 * t_4))
	t_6 = Float32(Float32(1.0) / sqrt(((t_3 != t_3) ? t_5 : ((t_5 != t_5) ? t_3 : max(t_3, t_5)))))
	tmp = Float32(0.0)
	if (t_3 >= t_5)
		tmp = Float32(t_6 * t_0);
	else
		tmp = Float32(t_6 * t_4);
	end
	return tmp
end
function tmp_2 = 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(w) * dY_46_u;
	t_2 = floor(w) * dX_46_u;
	t_3 = (t_2 * t_2) + (t_0 * t_0);
	t_4 = floor(h) * dY_46_v;
	t_5 = (t_1 * t_1) + (t_4 * t_4);
	t_6 = single(1.0) / sqrt(max(t_3, t_5));
	tmp = single(0.0);
	if (t_3 >= t_5)
		tmp = t_6 * t_0;
	else
		tmp = t_6 * t_4;
	end
	tmp_2 = tmp;
end
\begin{array}{l}

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

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


\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 9 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: 76.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_1 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_2 := \left\lfloorw\right\rfloor \cdot dX.u\\ t_3 := t\_2 \cdot t\_2 + t\_0 \cdot t\_0\\ t_4 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_5 := t\_1 \cdot t\_1 + t\_4 \cdot t\_4\\ t_6 := \frac{1}{\sqrt{\mathsf{max}\left(t\_3, t\_5\right)}}\\ \mathbf{if}\;t\_3 \geq t\_5:\\ \;\;\;\;t\_6 \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_6 \cdot t\_4\\ \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 w) dY.u))
        (t_2 (* (floor w) dX.u))
        (t_3 (+ (* t_2 t_2) (* t_0 t_0)))
        (t_4 (* (floor h) dY.v))
        (t_5 (+ (* t_1 t_1) (* t_4 t_4)))
        (t_6 (/ 1.0 (sqrt (fmax t_3 t_5)))))
   (if (>= t_3 t_5) (* t_6 t_0) (* t_6 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 = floorf(h) * dX_46_v;
	float t_1 = floorf(w) * dY_46_u;
	float t_2 = floorf(w) * dX_46_u;
	float t_3 = (t_2 * t_2) + (t_0 * t_0);
	float t_4 = floorf(h) * dY_46_v;
	float t_5 = (t_1 * t_1) + (t_4 * t_4);
	float t_6 = 1.0f / sqrtf(fmaxf(t_3, t_5));
	float tmp;
	if (t_3 >= t_5) {
		tmp = t_6 * t_0;
	} else {
		tmp = t_6 * t_4;
	}
	return tmp;
}
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(w) * dY_46_u)
	t_2 = Float32(floor(w) * dX_46_u)
	t_3 = Float32(Float32(t_2 * t_2) + Float32(t_0 * t_0))
	t_4 = Float32(floor(h) * dY_46_v)
	t_5 = Float32(Float32(t_1 * t_1) + Float32(t_4 * t_4))
	t_6 = Float32(Float32(1.0) / sqrt(((t_3 != t_3) ? t_5 : ((t_5 != t_5) ? t_3 : max(t_3, t_5)))))
	tmp = Float32(0.0)
	if (t_3 >= t_5)
		tmp = Float32(t_6 * t_0);
	else
		tmp = Float32(t_6 * t_4);
	end
	return tmp
end
function tmp_2 = 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(w) * dY_46_u;
	t_2 = floor(w) * dX_46_u;
	t_3 = (t_2 * t_2) + (t_0 * t_0);
	t_4 = floor(h) * dY_46_v;
	t_5 = (t_1 * t_1) + (t_4 * t_4);
	t_6 = single(1.0) / sqrt(max(t_3, t_5));
	tmp = single(0.0);
	if (t_3 >= t_5)
		tmp = t_6 * t_0;
	else
		tmp = t_6 * t_4;
	end
	tmp_2 = tmp;
end
\begin{array}{l}

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

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


\end{array}
\end{array}

Alternative 1: 77.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_1 := {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {t\_0}^{2}\\ t_2 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_3 := {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {t\_2}^{2}\\ t_4 := {\left(\mathsf{max}\left(t\_1, t\_3\right)\right)}^{0.5}\\ \mathbf{if}\;t\_1 \geq t\_3:\\ \;\;\;\;\frac{t\_0}{t\_4}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2}{t\_4}\\ \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 (+ (pow (* (floor w) dX.u) 2.0) (pow t_0 2.0)))
        (t_2 (* (floor h) dY.v))
        (t_3 (+ (pow (* (floor w) dY.u) 2.0) (pow t_2 2.0)))
        (t_4 (pow (fmax t_1 t_3) 0.5)))
   (if (>= t_1 t_3) (/ t_0 t_4) (/ t_2 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 = floorf(h) * dX_46_v;
	float t_1 = powf((floorf(w) * dX_46_u), 2.0f) + powf(t_0, 2.0f);
	float t_2 = floorf(h) * dY_46_v;
	float t_3 = powf((floorf(w) * dY_46_u), 2.0f) + powf(t_2, 2.0f);
	float t_4 = powf(fmaxf(t_1, t_3), 0.5f);
	float tmp;
	if (t_1 >= t_3) {
		tmp = t_0 / t_4;
	} else {
		tmp = t_2 / t_4;
	}
	return tmp;
}
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((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + (t_0 ^ Float32(2.0)))
	t_2 = Float32(floor(h) * dY_46_v)
	t_3 = Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (t_2 ^ Float32(2.0)))
	t_4 = ((t_1 != t_1) ? t_3 : ((t_3 != t_3) ? t_1 : max(t_1, t_3))) ^ Float32(0.5)
	tmp = Float32(0.0)
	if (t_1 >= t_3)
		tmp = Float32(t_0 / t_4);
	else
		tmp = Float32(t_2 / t_4);
	end
	return tmp
end
function tmp_2 = 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(w) * dX_46_u) ^ single(2.0)) + (t_0 ^ single(2.0));
	t_2 = floor(h) * dY_46_v;
	t_3 = ((floor(w) * dY_46_u) ^ single(2.0)) + (t_2 ^ single(2.0));
	t_4 = max(t_1, t_3) ^ single(0.5);
	tmp = single(0.0);
	if (t_1 >= t_3)
		tmp = t_0 / t_4;
	else
		tmp = t_2 / t_4;
	end
	tmp_2 = tmp;
end
\begin{array}{l}

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

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


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

    \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
  2. Simplified75.9%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
  3. Add Preprocessing
  4. Applied egg-rr76.0%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ } \end{array}} \]
  5. Add Preprocessing

Alternative 2: 70.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}\\ t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_2 := {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {t\_1}^{2}\\ t_3 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\ t_4 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_5 := {t\_4}^{2}\\ t_6 := {\left(\mathsf{max}\left(t\_0 + t\_5, t\_2\right)\right)}^{0.5}\\ \mathbf{if}\;dX.u \leq 10:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;t\_5 \geq t\_2:\\ \;\;\;\;\frac{t\_4}{t\_6}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1}{t\_6}\\ \end{array}\\ \mathbf{elif}\;t\_0 \geq t\_2:\\ \;\;\;\;\frac{t\_4}{{\left(\mathsf{max}\left(t\_5 + dX.u \cdot \left(dX.u \cdot t\_3\right), t\_2\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1}{{\left(\mathsf{max}\left(t\_3 \cdot \left(dX.u \cdot dX.u\right), t\_2\right)\right)}^{0.5}}\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (pow (* (floor w) dX.u) 2.0))
        (t_1 (* (floor h) dY.v))
        (t_2 (+ (pow (* (floor w) dY.u) 2.0) (pow t_1 2.0)))
        (t_3 (pow (floor w) 2.0))
        (t_4 (* (floor h) dX.v))
        (t_5 (pow t_4 2.0))
        (t_6 (pow (fmax (+ t_0 t_5) t_2) 0.5)))
   (if (<= dX.u 10.0)
     (if (>= t_5 t_2) (/ t_4 t_6) (/ t_1 t_6))
     (if (>= t_0 t_2)
       (/ t_4 (pow (fmax (+ t_5 (* dX.u (* dX.u t_3))) t_2) 0.5))
       (/ t_1 (pow (fmax (* t_3 (* dX.u dX.u)) t_2) 0.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((floorf(w) * dX_46_u), 2.0f);
	float t_1 = floorf(h) * dY_46_v;
	float t_2 = powf((floorf(w) * dY_46_u), 2.0f) + powf(t_1, 2.0f);
	float t_3 = powf(floorf(w), 2.0f);
	float t_4 = floorf(h) * dX_46_v;
	float t_5 = powf(t_4, 2.0f);
	float t_6 = powf(fmaxf((t_0 + t_5), t_2), 0.5f);
	float tmp_1;
	if (dX_46_u <= 10.0f) {
		float tmp_2;
		if (t_5 >= t_2) {
			tmp_2 = t_4 / t_6;
		} else {
			tmp_2 = t_1 / t_6;
		}
		tmp_1 = tmp_2;
	} else if (t_0 >= t_2) {
		tmp_1 = t_4 / powf(fmaxf((t_5 + (dX_46_u * (dX_46_u * t_3))), t_2), 0.5f);
	} else {
		tmp_1 = t_1 / powf(fmaxf((t_3 * (dX_46_u * dX_46_u)), t_2), 0.5f);
	}
	return tmp_1;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(floor(w) * dX_46_u) ^ Float32(2.0)
	t_1 = Float32(floor(h) * dY_46_v)
	t_2 = Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (t_1 ^ Float32(2.0)))
	t_3 = floor(w) ^ Float32(2.0)
	t_4 = Float32(floor(h) * dX_46_v)
	t_5 = t_4 ^ Float32(2.0)
	t_6 = ((Float32(t_0 + t_5) != Float32(t_0 + t_5)) ? t_2 : ((t_2 != t_2) ? Float32(t_0 + t_5) : max(Float32(t_0 + t_5), t_2))) ^ Float32(0.5)
	tmp_1 = Float32(0.0)
	if (dX_46_u <= Float32(10.0))
		tmp_2 = Float32(0.0)
		if (t_5 >= t_2)
			tmp_2 = Float32(t_4 / t_6);
		else
			tmp_2 = Float32(t_1 / t_6);
		end
		tmp_1 = tmp_2;
	elseif (t_0 >= t_2)
		tmp_1 = Float32(t_4 / (((Float32(t_5 + Float32(dX_46_u * Float32(dX_46_u * t_3))) != Float32(t_5 + Float32(dX_46_u * Float32(dX_46_u * t_3)))) ? t_2 : ((t_2 != t_2) ? Float32(t_5 + Float32(dX_46_u * Float32(dX_46_u * t_3))) : max(Float32(t_5 + Float32(dX_46_u * Float32(dX_46_u * t_3))), t_2))) ^ Float32(0.5)));
	else
		tmp_1 = Float32(t_1 / (((Float32(t_3 * Float32(dX_46_u * dX_46_u)) != Float32(t_3 * Float32(dX_46_u * dX_46_u))) ? t_2 : ((t_2 != t_2) ? Float32(t_3 * Float32(dX_46_u * dX_46_u)) : max(Float32(t_3 * Float32(dX_46_u * dX_46_u)), t_2))) ^ Float32(0.5)));
	end
	return tmp_1
end
function tmp_4 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = (floor(w) * dX_46_u) ^ single(2.0);
	t_1 = floor(h) * dY_46_v;
	t_2 = ((floor(w) * dY_46_u) ^ single(2.0)) + (t_1 ^ single(2.0));
	t_3 = floor(w) ^ single(2.0);
	t_4 = floor(h) * dX_46_v;
	t_5 = t_4 ^ single(2.0);
	t_6 = max((t_0 + t_5), t_2) ^ single(0.5);
	tmp_2 = single(0.0);
	if (dX_46_u <= single(10.0))
		tmp_3 = single(0.0);
		if (t_5 >= t_2)
			tmp_3 = t_4 / t_6;
		else
			tmp_3 = t_1 / t_6;
		end
		tmp_2 = tmp_3;
	elseif (t_0 >= t_2)
		tmp_2 = t_4 / (max((t_5 + (dX_46_u * (dX_46_u * t_3))), t_2) ^ single(0.5));
	else
		tmp_2 = t_1 / (max((t_3 * (dX_46_u * dX_46_u)), t_2) ^ single(0.5));
	end
	tmp_4 = tmp_2;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}\\
t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_2 := {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {t\_1}^{2}\\
t_3 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\
t_4 := \left\lfloorh\right\rfloor \cdot dX.v\\
t_5 := {t\_4}^{2}\\
t_6 := {\left(\mathsf{max}\left(t\_0 + t\_5, t\_2\right)\right)}^{0.5}\\
\mathbf{if}\;dX.u \leq 10:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;t\_5 \geq t\_2:\\
\;\;\;\;\frac{t\_4}{t\_6}\\

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


\end{array}\\

\mathbf{elif}\;t\_0 \geq t\_2:\\
\;\;\;\;\frac{t\_4}{{\left(\mathsf{max}\left(t\_5 + dX.u \cdot \left(dX.u \cdot t\_3\right), t\_2\right)\right)}^{0.5}}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{{\left(\mathsf{max}\left(t\_3 \cdot \left(dX.u \cdot dX.u\right), t\_2\right)\right)}^{0.5}}\\


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

    1. Initial program 77.6%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified77.8%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Applied egg-rr78.0%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ } \end{array}} \]
    5. Taylor expanded in dX.u around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    6. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.v \cdot dX.v\right) \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3270.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    7. Simplified70.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
    8. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \cdot \left\lfloorh\right\rfloor \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. >=-lowering->=.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\color{blue}{\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)}, \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      9. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      10. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      11. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \left(\left\lfloorh\right\rfloor\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      12. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      13. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      14. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    9. Applied egg-rr70.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]

    if 10 < dX.u

    1. Initial program 70.7%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified70.7%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Taylor expanded in dX.u around inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.u \cdot dX.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3268.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    6. Simplified68.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)} \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \end{array} \]
    7. Applied egg-rr68.2%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ } \end{array}} \]
    8. Step-by-step derivation
      1. unpow-prod-downN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. pow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \left(dX.u \cdot dX.u\right)\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\left(\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right) \cdot dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\left(\left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \cdot dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3268.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    9. Applied egg-rr68.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left(\color{blue}{\left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \cdot dX.u} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
    10. Taylor expanded in dX.u around inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(\left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \left({dX.u}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right), \left({dX.u}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right), \left({dX.u}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right), \left(dX.u \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f3269.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    12. Simplified69.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left(\left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \cdot dX.u + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{\left\lfloorh\right\rfloor} \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \left(dX.u \cdot dX.u\right), {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \leq 10:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array}\\ \mathbf{elif}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} + dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \left(dX.u \cdot dX.u\right), {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 70.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}\\ t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_3 := {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {t\_1}^{2}\\ t_4 := {t\_2}^{2}\\ t_5 := {\left(\mathsf{max}\left(t\_0 + t\_4, t\_3\right)\right)}^{0.5}\\ t_6 := \frac{t\_2}{t\_5}\\ t_7 := \frac{t\_1}{t\_5}\\ \mathbf{if}\;dX.u \leq 10:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;t\_4 \geq t\_3:\\ \;\;\;\;t\_6\\ \mathbf{else}:\\ \;\;\;\;t\_7\\ \end{array}\\ \mathbf{elif}\;t\_0 \geq t\_3:\\ \;\;\;\;t\_6\\ \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 (* (floor w) dX.u) 2.0))
        (t_1 (* (floor h) dY.v))
        (t_2 (* (floor h) dX.v))
        (t_3 (+ (pow (* (floor w) dY.u) 2.0) (pow t_1 2.0)))
        (t_4 (pow t_2 2.0))
        (t_5 (pow (fmax (+ t_0 t_4) t_3) 0.5))
        (t_6 (/ t_2 t_5))
        (t_7 (/ t_1 t_5)))
   (if (<= dX.u 10.0) (if (>= t_4 t_3) t_6 t_7) (if (>= t_0 t_3) t_6 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((floorf(w) * dX_46_u), 2.0f);
	float t_1 = floorf(h) * dY_46_v;
	float t_2 = floorf(h) * dX_46_v;
	float t_3 = powf((floorf(w) * dY_46_u), 2.0f) + powf(t_1, 2.0f);
	float t_4 = powf(t_2, 2.0f);
	float t_5 = powf(fmaxf((t_0 + t_4), t_3), 0.5f);
	float t_6 = t_2 / t_5;
	float t_7 = t_1 / t_5;
	float tmp_1;
	if (dX_46_u <= 10.0f) {
		float tmp_2;
		if (t_4 >= t_3) {
			tmp_2 = t_6;
		} else {
			tmp_2 = t_7;
		}
		tmp_1 = tmp_2;
	} else if (t_0 >= t_3) {
		tmp_1 = t_6;
	} else {
		tmp_1 = t_7;
	}
	return tmp_1;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(floor(w) * dX_46_u) ^ Float32(2.0)
	t_1 = Float32(floor(h) * dY_46_v)
	t_2 = Float32(floor(h) * dX_46_v)
	t_3 = Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (t_1 ^ Float32(2.0)))
	t_4 = t_2 ^ Float32(2.0)
	t_5 = ((Float32(t_0 + t_4) != Float32(t_0 + t_4)) ? t_3 : ((t_3 != t_3) ? Float32(t_0 + t_4) : max(Float32(t_0 + t_4), t_3))) ^ Float32(0.5)
	t_6 = Float32(t_2 / t_5)
	t_7 = Float32(t_1 / t_5)
	tmp_1 = Float32(0.0)
	if (dX_46_u <= Float32(10.0))
		tmp_2 = Float32(0.0)
		if (t_4 >= t_3)
			tmp_2 = t_6;
		else
			tmp_2 = t_7;
		end
		tmp_1 = tmp_2;
	elseif (t_0 >= t_3)
		tmp_1 = t_6;
	else
		tmp_1 = t_7;
	end
	return tmp_1
end
function tmp_4 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = (floor(w) * dX_46_u) ^ single(2.0);
	t_1 = floor(h) * dY_46_v;
	t_2 = floor(h) * dX_46_v;
	t_3 = ((floor(w) * dY_46_u) ^ single(2.0)) + (t_1 ^ single(2.0));
	t_4 = t_2 ^ single(2.0);
	t_5 = max((t_0 + t_4), t_3) ^ single(0.5);
	t_6 = t_2 / t_5;
	t_7 = t_1 / t_5;
	tmp_2 = single(0.0);
	if (dX_46_u <= single(10.0))
		tmp_3 = single(0.0);
		if (t_4 >= t_3)
			tmp_3 = t_6;
		else
			tmp_3 = t_7;
		end
		tmp_2 = tmp_3;
	elseif (t_0 >= t_3)
		tmp_2 = t_6;
	else
		tmp_2 = t_7;
	end
	tmp_4 = tmp_2;
end
\begin{array}{l}

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

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


\end{array}\\

\mathbf{elif}\;t\_0 \geq t\_3:\\
\;\;\;\;t\_6\\

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


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

    1. Initial program 77.6%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified77.8%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Applied egg-rr78.0%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ } \end{array}} \]
    5. Taylor expanded in dX.u around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    6. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.v \cdot dX.v\right) \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3270.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    7. Simplified70.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
    8. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \cdot \left\lfloorh\right\rfloor \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. >=-lowering->=.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\color{blue}{\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)}, \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      9. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      10. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      11. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \left(\left\lfloorh\right\rfloor\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      12. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      13. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      14. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    9. Applied egg-rr70.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]

    if 10 < dX.u

    1. Initial program 70.7%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified70.7%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Taylor expanded in dX.u around inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.u \cdot dX.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3268.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    6. Simplified68.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)} \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \end{array} \]
    7. Applied egg-rr68.2%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ } \end{array}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \leq 10:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array}\\ \mathbf{elif}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 70.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}\\ t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_3 := {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {t\_1}^{2}\\ t_4 := {t\_2}^{2}\\ t_5 := {\left(\mathsf{max}\left(t\_0 + t\_4, t\_3\right)\right)}^{0.5}\\ t_6 := \frac{t\_1}{t\_5}\\ \mathbf{if}\;dX.u \leq 40:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;t\_4 \geq t\_3:\\ \;\;\;\;\frac{t\_2}{t\_5}\\ \mathbf{else}:\\ \;\;\;\;t\_6\\ \end{array}\\ \mathbf{elif}\;t\_0 \geq t\_3:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \frac{dX.v}{t\_5}\\ \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 (pow (* (floor w) dX.u) 2.0))
        (t_1 (* (floor h) dY.v))
        (t_2 (* (floor h) dX.v))
        (t_3 (+ (pow (* (floor w) dY.u) 2.0) (pow t_1 2.0)))
        (t_4 (pow t_2 2.0))
        (t_5 (pow (fmax (+ t_0 t_4) t_3) 0.5))
        (t_6 (/ t_1 t_5)))
   (if (<= dX.u 40.0)
     (if (>= t_4 t_3) (/ t_2 t_5) t_6)
     (if (>= t_0 t_3) (* (floor h) (/ dX.v t_5)) 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 = powf((floorf(w) * dX_46_u), 2.0f);
	float t_1 = floorf(h) * dY_46_v;
	float t_2 = floorf(h) * dX_46_v;
	float t_3 = powf((floorf(w) * dY_46_u), 2.0f) + powf(t_1, 2.0f);
	float t_4 = powf(t_2, 2.0f);
	float t_5 = powf(fmaxf((t_0 + t_4), t_3), 0.5f);
	float t_6 = t_1 / t_5;
	float tmp_1;
	if (dX_46_u <= 40.0f) {
		float tmp_2;
		if (t_4 >= t_3) {
			tmp_2 = t_2 / t_5;
		} else {
			tmp_2 = t_6;
		}
		tmp_1 = tmp_2;
	} else if (t_0 >= t_3) {
		tmp_1 = floorf(h) * (dX_46_v / t_5);
	} else {
		tmp_1 = t_6;
	}
	return tmp_1;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(floor(w) * dX_46_u) ^ Float32(2.0)
	t_1 = Float32(floor(h) * dY_46_v)
	t_2 = Float32(floor(h) * dX_46_v)
	t_3 = Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (t_1 ^ Float32(2.0)))
	t_4 = t_2 ^ Float32(2.0)
	t_5 = ((Float32(t_0 + t_4) != Float32(t_0 + t_4)) ? t_3 : ((t_3 != t_3) ? Float32(t_0 + t_4) : max(Float32(t_0 + t_4), t_3))) ^ Float32(0.5)
	t_6 = Float32(t_1 / t_5)
	tmp_1 = Float32(0.0)
	if (dX_46_u <= Float32(40.0))
		tmp_2 = Float32(0.0)
		if (t_4 >= t_3)
			tmp_2 = Float32(t_2 / t_5);
		else
			tmp_2 = t_6;
		end
		tmp_1 = tmp_2;
	elseif (t_0 >= t_3)
		tmp_1 = Float32(floor(h) * Float32(dX_46_v / t_5));
	else
		tmp_1 = t_6;
	end
	return tmp_1
end
function tmp_4 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = (floor(w) * dX_46_u) ^ single(2.0);
	t_1 = floor(h) * dY_46_v;
	t_2 = floor(h) * dX_46_v;
	t_3 = ((floor(w) * dY_46_u) ^ single(2.0)) + (t_1 ^ single(2.0));
	t_4 = t_2 ^ single(2.0);
	t_5 = max((t_0 + t_4), t_3) ^ single(0.5);
	t_6 = t_1 / t_5;
	tmp_2 = single(0.0);
	if (dX_46_u <= single(40.0))
		tmp_3 = single(0.0);
		if (t_4 >= t_3)
			tmp_3 = t_2 / t_5;
		else
			tmp_3 = t_6;
		end
		tmp_2 = tmp_3;
	elseif (t_0 >= t_3)
		tmp_2 = floor(h) * (dX_46_v / t_5);
	else
		tmp_2 = t_6;
	end
	tmp_4 = tmp_2;
end
\begin{array}{l}

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

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


\end{array}\\

\mathbf{elif}\;t\_0 \geq t\_3:\\
\;\;\;\;\left\lfloorh\right\rfloor \cdot \frac{dX.v}{t\_5}\\

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


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

    1. Initial program 77.8%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified78.0%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Applied egg-rr78.3%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ } \end{array}} \]
    5. Taylor expanded in dX.u around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    6. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.v \cdot dX.v\right) \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3271.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    7. Simplified71.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
    8. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \cdot \left\lfloorh\right\rfloor \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. >=-lowering->=.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\color{blue}{\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)}, \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      9. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      10. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      11. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \left(\left\lfloorh\right\rfloor\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      12. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      13. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      14. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    9. Applied egg-rr71.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]

    if 40 < dX.u

    1. Initial program 69.8%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified69.9%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Taylor expanded in dX.u around inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.u \cdot dX.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3267.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    6. Simplified67.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)} \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \end{array} \]
    7. Applied egg-rr67.2%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ } \end{array}} \]
    8. Step-by-step derivation
      1. unpow-prod-downN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. pow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \left(dX.u \cdot dX.u\right)\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\left(\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right) \cdot dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\left(\left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \cdot dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3267.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right), dX.u\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    9. Applied egg-rr67.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left(\color{blue}{\left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \cdot dX.u} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left(\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right) \cdot dX.u + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{\frac{1}{2}}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \left(dX.u \cdot dX.u\right) + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{\frac{1}{2}}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. pow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{\frac{1}{2}}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. unpow-prod-downN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{\frac{1}{2}}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. associate-/l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \color{blue}{\frac{dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{\frac{1}{2}}}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\frac{dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{\frac{1}{2}}} \cdot \color{blue}{\left\lfloorh\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    11. Applied egg-rr67.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\color{blue}{\frac{dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}} \cdot \left\lfloorh\right\rfloor}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \leq 40:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array}\\ \mathbf{elif}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\left\lfloorh\right\rfloor \cdot \frac{dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 68.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_1 := {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {t\_0}^{2}\\ t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_3 := {t\_2}^{2}\\ t_4 := \mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + t\_3, t\_1\right)\\ t_5 := {t\_4}^{0.5}\\ \mathbf{if}\;dX.u \leq 800:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;t\_3 \geq t\_1:\\ \;\;\;\;\frac{t\_2}{t\_5}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_0}{t\_5}\\ \end{array}\\ \mathbf{elif}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \left(dY.v \cdot dY.v\right):\\ \;\;\;\;\frac{-1}{\frac{t\_5}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\ \mathbf{else}:\\ \;\;\;\;{t\_4}^{-0.5} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0 (* (floor h) dY.v))
        (t_1 (+ (pow (* (floor w) dY.u) 2.0) (pow t_0 2.0)))
        (t_2 (* (floor h) dX.v))
        (t_3 (pow t_2 2.0))
        (t_4 (fmax (+ (pow (* (floor w) dX.u) 2.0) t_3) t_1))
        (t_5 (pow t_4 0.5)))
   (if (<= dX.u 800.0)
     (if (>= t_3 t_1) (/ t_2 t_5) (/ t_0 t_5))
     (if (>=
          (* dX.u (* dX.u (pow (floor w) 2.0)))
          (* (pow (floor h) 2.0) (* dY.v dY.v)))
       (/ -1.0 (* (/ t_5 dX.v) (/ -1.0 (floor h))))
       (* (pow t_4 -0.5) (/ dY.v (/ 1.0 (floor h))))))))
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) * dY_46_v;
	float t_1 = powf((floorf(w) * dY_46_u), 2.0f) + powf(t_0, 2.0f);
	float t_2 = floorf(h) * dX_46_v;
	float t_3 = powf(t_2, 2.0f);
	float t_4 = fmaxf((powf((floorf(w) * dX_46_u), 2.0f) + t_3), t_1);
	float t_5 = powf(t_4, 0.5f);
	float tmp_1;
	if (dX_46_u <= 800.0f) {
		float tmp_2;
		if (t_3 >= t_1) {
			tmp_2 = t_2 / t_5;
		} else {
			tmp_2 = t_0 / t_5;
		}
		tmp_1 = tmp_2;
	} else if ((dX_46_u * (dX_46_u * powf(floorf(w), 2.0f))) >= (powf(floorf(h), 2.0f) * (dY_46_v * dY_46_v))) {
		tmp_1 = -1.0f / ((t_5 / dX_46_v) * (-1.0f / floorf(h)));
	} else {
		tmp_1 = powf(t_4, -0.5f) * (dY_46_v / (1.0f / floorf(h)));
	}
	return tmp_1;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = Float32(floor(h) * dY_46_v)
	t_1 = Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (t_0 ^ Float32(2.0)))
	t_2 = Float32(floor(h) * dX_46_v)
	t_3 = t_2 ^ Float32(2.0)
	t_4 = (Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + t_3) != Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + t_3)) ? t_1 : ((t_1 != t_1) ? Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + t_3) : max(Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + t_3), t_1))
	t_5 = t_4 ^ Float32(0.5)
	tmp_1 = Float32(0.0)
	if (dX_46_u <= Float32(800.0))
		tmp_2 = Float32(0.0)
		if (t_3 >= t_1)
			tmp_2 = Float32(t_2 / t_5);
		else
			tmp_2 = Float32(t_0 / t_5);
		end
		tmp_1 = tmp_2;
	elseif (Float32(dX_46_u * Float32(dX_46_u * (floor(w) ^ Float32(2.0)))) >= Float32((floor(h) ^ Float32(2.0)) * Float32(dY_46_v * dY_46_v)))
		tmp_1 = Float32(Float32(-1.0) / Float32(Float32(t_5 / dX_46_v) * Float32(Float32(-1.0) / floor(h))));
	else
		tmp_1 = Float32((t_4 ^ Float32(-0.5)) * Float32(dY_46_v / Float32(Float32(1.0) / floor(h))));
	end
	return tmp_1
end
function tmp_4 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = floor(h) * dY_46_v;
	t_1 = ((floor(w) * dY_46_u) ^ single(2.0)) + (t_0 ^ single(2.0));
	t_2 = floor(h) * dX_46_v;
	t_3 = t_2 ^ single(2.0);
	t_4 = max((((floor(w) * dX_46_u) ^ single(2.0)) + t_3), t_1);
	t_5 = t_4 ^ single(0.5);
	tmp_2 = single(0.0);
	if (dX_46_u <= single(800.0))
		tmp_3 = single(0.0);
		if (t_3 >= t_1)
			tmp_3 = t_2 / t_5;
		else
			tmp_3 = t_0 / t_5;
		end
		tmp_2 = tmp_3;
	elseif ((dX_46_u * (dX_46_u * (floor(w) ^ single(2.0)))) >= ((floor(h) ^ single(2.0)) * (dY_46_v * dY_46_v)))
		tmp_2 = single(-1.0) / ((t_5 / dX_46_v) * (single(-1.0) / floor(h)));
	else
		tmp_2 = (t_4 ^ single(-0.5)) * (dY_46_v / (single(1.0) / floor(h)));
	end
	tmp_4 = tmp_2;
end
\begin{array}{l}

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

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


\end{array}\\

\mathbf{elif}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \left(dY.v \cdot dY.v\right):\\
\;\;\;\;\frac{-1}{\frac{t\_5}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\

\mathbf{else}:\\
\;\;\;\;{t\_4}^{-0.5} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\


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

    1. Initial program 77.9%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified78.1%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Applied egg-rr78.3%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ } \end{array}} \]
    5. Taylor expanded in dX.u around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    6. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.v \cdot dX.v\right) \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3271.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    7. Simplified71.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
    8. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \cdot \left\lfloorh\right\rfloor \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. >=-lowering->=.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\color{blue}{\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)}, \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      9. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      10. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      11. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \left(\left\lfloorh\right\rfloor\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      12. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      13. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      14. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    9. Applied egg-rr71.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]

    if 800 < dX.u

    1. Initial program 69.0%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified69.1%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Taylor expanded in dX.u around inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.u \cdot dX.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3266.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    6. Simplified66.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)} \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \end{array} \]
    7. Applied egg-rr66.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
    8. Applied egg-rr65.6%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \color{blue}{\left({dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      2. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      3. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      4. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      5. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \left(dY.v \cdot dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f3264.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \mathsf{*.f32}\left(dY.v, dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    11. Simplified64.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \left(dY.v \cdot dY.v\right)}:\\ \;\;\;\;\frac{-1}{\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.3%

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

Alternative 6: 68.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := {\left(\left\lfloorh\right\rfloor\right)}^{2}\\
t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_2 := {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {t\_1}^{2}\\
t_3 := \left\lfloorh\right\rfloor \cdot dX.v\\
t_4 := {t\_3}^{2}\\
t_5 := \mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + t\_4, t\_2\right)\\
t_6 := {t\_5}^{0.5}\\
\mathbf{if}\;dX.u \leq 800:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;t\_4 \geq t\_2:\\
\;\;\;\;\frac{t\_3}{t\_6}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{{\left(\mathsf{max}\left(dX.v \cdot \left(dX.v \cdot t\_0\right), t\_2\right)\right)}^{0.5}}\\


\end{array}\\

\mathbf{elif}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq t\_0 \cdot \left(dY.v \cdot dY.v\right):\\
\;\;\;\;\frac{-1}{\frac{t\_6}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\

\mathbf{else}:\\
\;\;\;\;{t\_5}^{-0.5} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\


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

    1. Initial program 77.9%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified78.1%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Applied egg-rr78.3%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ } \end{array}} \]
    5. Taylor expanded in dX.u around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    6. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.v \cdot dX.v\right) \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3271.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    7. Simplified71.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
    8. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \cdot \left\lfloorh\right\rfloor \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. >=-lowering->=.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\color{blue}{\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)}, \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      9. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      10. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      11. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \left(\left\lfloorh\right\rfloor\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      12. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      13. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      14. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    9. Applied egg-rr71.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
    10. Taylor expanded in dX.u around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\left({dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    11. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\left(\left(dX.v \cdot dX.v\right) \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\left(dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\left(dX.v \cdot \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(dX.v, \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3270.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    12. Simplified70.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{\left\lfloorh\right\rfloor} \cdot dY.v}{{\left(\mathsf{max}\left(dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]

    if 800 < dX.u

    1. Initial program 69.0%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified69.1%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Taylor expanded in dX.u around inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.u \cdot dX.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3266.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    6. Simplified66.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)} \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \end{array} \]
    7. Applied egg-rr66.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
    8. Applied egg-rr65.6%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \color{blue}{\left({dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      2. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      3. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      4. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      5. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \left(dY.v \cdot dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f3264.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \mathsf{*.f32}\left(dY.v, dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    11. Simplified64.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \left(dY.v \cdot dY.v\right)}:\\ \;\;\;\;\frac{-1}{\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.1%

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

Alternative 7: 64.9% accurate, 1.1× speedup?

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

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

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


\end{array}\\

\mathbf{elif}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq t\_0 \cdot \left(dY.v \cdot dY.v\right):\\
\;\;\;\;\frac{-1}{\frac{t\_6}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\

\mathbf{else}:\\
\;\;\;\;{t\_5}^{-0.5} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\


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

    1. Initial program 77.8%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified78.0%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Applied egg-rr78.2%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ } \end{array}} \]
    5. Taylor expanded in dX.u around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    6. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.v \cdot dX.v\right) \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.v \cdot \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3270.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    7. Simplified70.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
    8. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \cdot \left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left\lfloorh\right\rfloor\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \cdot \left\lfloorh\right\rfloor \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. >=-lowering->=.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\color{blue}{\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)}, \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      9. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor \cdot dX.v\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      10. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\left(dX.v \cdot \left\lfloorh\right\rfloor\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      11. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \left(\left\lfloorh\right\rfloor\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      12. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      13. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      14. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \left({\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    9. Applied egg-rr70.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]
    10. Taylor expanded in dX.u around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\color{blue}{\left({dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    11. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\left(\left(dX.v \cdot dX.v\right) \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      2. associate-*r*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\left(dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\left(dX.v \cdot \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot dX.v\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(dX.v, \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3266.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(dX.v, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right)\right)\\ \end{array} \]
    12. Simplified66.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} \geq {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{{\left(\mathsf{max}\left(\color{blue}{dX.v \cdot \left(dX.v \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}\\ \end{array} \]

    if 450 < dX.u

    1. Initial program 69.5%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified69.6%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Taylor expanded in dX.u around inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.u \cdot dX.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3266.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    6. Simplified66.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)} \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \end{array} \]
    7. Applied egg-rr66.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
    8. Applied egg-rr66.1%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \color{blue}{\left({dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      2. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      3. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      4. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      5. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \left(dY.v \cdot dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f3264.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \mathsf{*.f32}\left(dY.v, dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    11. Simplified64.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \left(dY.v \cdot dY.v\right)}:\\ \;\;\;\;\frac{-1}{\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.2%

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

Alternative 8: 62.5% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\ t_1 := \mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\\ t_2 := \frac{-1}{\frac{{t\_1}^{0.5}}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\ t_3 := dX.u \cdot \left(dX.u \cdot t\_0\right)\\ t_4 := {t\_1}^{-0.5} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \mathbf{if}\;dY.u \leq 180000:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;t\_3 \geq {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \left(dY.v \cdot dY.v\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array}\\ \mathbf{elif}\;t\_3 \geq dY.u \cdot \left(dY.u \cdot t\_0\right):\\ \;\;\;\;t\_2\\ \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 (floor w) 2.0))
        (t_1
         (fmax
          (+ (pow (* (floor w) dX.u) 2.0) (pow (* (floor h) dX.v) 2.0))
          (+ (pow (* (floor w) dY.u) 2.0) (pow (* (floor h) dY.v) 2.0))))
        (t_2 (/ -1.0 (* (/ (pow t_1 0.5) dX.v) (/ -1.0 (floor h)))))
        (t_3 (* dX.u (* dX.u t_0)))
        (t_4 (* (pow t_1 -0.5) (/ dY.v (/ 1.0 (floor h))))))
   (if (<= dY.u 180000.0)
     (if (>= t_3 (* (pow (floor h) 2.0) (* dY.v dY.v))) t_2 t_4)
     (if (>= t_3 (* dY.u (* dY.u t_0))) t_2 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(floorf(w), 2.0f);
	float t_1 = fmaxf((powf((floorf(w) * dX_46_u), 2.0f) + powf((floorf(h) * dX_46_v), 2.0f)), (powf((floorf(w) * dY_46_u), 2.0f) + powf((floorf(h) * dY_46_v), 2.0f)));
	float t_2 = -1.0f / ((powf(t_1, 0.5f) / dX_46_v) * (-1.0f / floorf(h)));
	float t_3 = dX_46_u * (dX_46_u * t_0);
	float t_4 = powf(t_1, -0.5f) * (dY_46_v / (1.0f / floorf(h)));
	float tmp_1;
	if (dY_46_u <= 180000.0f) {
		float tmp_2;
		if (t_3 >= (powf(floorf(h), 2.0f) * (dY_46_v * dY_46_v))) {
			tmp_2 = t_2;
		} else {
			tmp_2 = t_4;
		}
		tmp_1 = tmp_2;
	} else if (t_3 >= (dY_46_u * (dY_46_u * t_0))) {
		tmp_1 = t_2;
	} else {
		tmp_1 = t_4;
	}
	return tmp_1;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = floor(w) ^ Float32(2.0)
	t_1 = (Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dX_46_v) ^ Float32(2.0))) != Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dX_46_v) ^ Float32(2.0)))) ? Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dY_46_v) ^ Float32(2.0))) : ((Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dY_46_v) ^ Float32(2.0))) != Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dY_46_v) ^ Float32(2.0)))) ? Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dX_46_v) ^ Float32(2.0))) : max(Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dX_46_v) ^ Float32(2.0))), Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dY_46_v) ^ Float32(2.0)))))
	t_2 = Float32(Float32(-1.0) / Float32(Float32((t_1 ^ Float32(0.5)) / dX_46_v) * Float32(Float32(-1.0) / floor(h))))
	t_3 = Float32(dX_46_u * Float32(dX_46_u * t_0))
	t_4 = Float32((t_1 ^ Float32(-0.5)) * Float32(dY_46_v / Float32(Float32(1.0) / floor(h))))
	tmp_1 = Float32(0.0)
	if (dY_46_u <= Float32(180000.0))
		tmp_2 = Float32(0.0)
		if (t_3 >= Float32((floor(h) ^ Float32(2.0)) * Float32(dY_46_v * dY_46_v)))
			tmp_2 = t_2;
		else
			tmp_2 = t_4;
		end
		tmp_1 = tmp_2;
	elseif (t_3 >= Float32(dY_46_u * Float32(dY_46_u * t_0)))
		tmp_1 = t_2;
	else
		tmp_1 = t_4;
	end
	return tmp_1
end
function tmp_4 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = floor(w) ^ single(2.0);
	t_1 = max((((floor(w) * dX_46_u) ^ single(2.0)) + ((floor(h) * dX_46_v) ^ single(2.0))), (((floor(w) * dY_46_u) ^ single(2.0)) + ((floor(h) * dY_46_v) ^ single(2.0))));
	t_2 = single(-1.0) / (((t_1 ^ single(0.5)) / dX_46_v) * (single(-1.0) / floor(h)));
	t_3 = dX_46_u * (dX_46_u * t_0);
	t_4 = (t_1 ^ single(-0.5)) * (dY_46_v / (single(1.0) / floor(h)));
	tmp_2 = single(0.0);
	if (dY_46_u <= single(180000.0))
		tmp_3 = single(0.0);
		if (t_3 >= ((floor(h) ^ single(2.0)) * (dY_46_v * dY_46_v)))
			tmp_3 = t_2;
		else
			tmp_3 = t_4;
		end
		tmp_2 = tmp_3;
	elseif (t_3 >= (dY_46_u * (dY_46_u * t_0)))
		tmp_2 = t_2;
	else
		tmp_2 = t_4;
	end
	tmp_4 = tmp_2;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\
t_1 := \mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\\
t_2 := \frac{-1}{\frac{{t\_1}^{0.5}}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\
t_3 := dX.u \cdot \left(dX.u \cdot t\_0\right)\\
t_4 := {t\_1}^{-0.5} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\
\mathbf{if}\;dY.u \leq 180000:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;t\_3 \geq {\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \left(dY.v \cdot dY.v\right):\\
\;\;\;\;t\_2\\

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


\end{array}\\

\mathbf{elif}\;t\_3 \geq dY.u \cdot \left(dY.u \cdot t\_0\right):\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 77.0%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified77.2%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Taylor expanded in dX.u around inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.u \cdot dX.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3263.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    6. Simplified63.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)} \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \end{array} \]
    7. Applied egg-rr63.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
    8. Applied egg-rr63.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \color{blue}{\left({dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}\right)}\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      2. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\left({\left(\left\lfloorh\right\rfloor\right)}^{2}\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      3. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\left(\left\lfloorh\right\rfloor\right), 2\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      4. floor-lowering-floor.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \left({dY.v}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      5. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \left(dY.v \cdot dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f3261.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(\mathsf{pow.f32}\left(\mathsf{floor.f32}\left(h\right), 2\right), \mathsf{*.f32}\left(dY.v, dY.v\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    11. Simplified61.8%

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

    if 1.8e5 < dY.u

    1. Initial program 70.0%

      \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
    2. Simplified70.3%

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
    3. Add Preprocessing
    4. Taylor expanded in dX.u around inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    5. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.u \cdot dX.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3260.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    6. Simplified60.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)} \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \end{array} \]
    7. Applied egg-rr60.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
    8. Applied egg-rr60.3%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \color{blue}{\left({dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \left(\left(dY.u \cdot dY.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      2. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \left(dY.u \cdot \left(dY.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      3. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \left(dY.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dY.u\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      4. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(dY.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dY.u\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      5. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(dY.u, \left(dY.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      6. *-lowering-*.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(dY.u, \mathsf{*.f32}\left(dY.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      7. pow-lowering-pow.f32N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(dY.u, \mathsf{*.f32}\left(dY.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
      8. floor-lowering-floor.f3260.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(dY.u, \mathsf{*.f32}\left(dY.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    11. Simplified60.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \color{blue}{dY.u \cdot \left(dY.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}:\\ \;\;\;\;\frac{-1}{\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.5%

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

Alternative 9: 59.5% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\\ t_1 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\ \mathbf{if}\;dX.u \cdot \left(dX.u \cdot t\_1\right) \geq dY.u \cdot \left(dY.u \cdot t\_1\right):\\ \;\;\;\;\frac{-1}{\frac{{t\_0}^{0.5}}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\ \mathbf{else}:\\ \;\;\;\;{t\_0}^{-0.5} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \end{array} \]
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
 :precision binary32
 (let* ((t_0
         (fmax
          (+ (pow (* (floor w) dX.u) 2.0) (pow (* (floor h) dX.v) 2.0))
          (+ (pow (* (floor w) dY.u) 2.0) (pow (* (floor h) dY.v) 2.0))))
        (t_1 (pow (floor w) 2.0)))
   (if (>= (* dX.u (* dX.u t_1)) (* dY.u (* dY.u t_1)))
     (/ -1.0 (* (/ (pow t_0 0.5) dX.v) (/ -1.0 (floor h))))
     (* (pow t_0 -0.5) (/ dY.v (/ 1.0 (floor h)))))))
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 = fmaxf((powf((floorf(w) * dX_46_u), 2.0f) + powf((floorf(h) * dX_46_v), 2.0f)), (powf((floorf(w) * dY_46_u), 2.0f) + powf((floorf(h) * dY_46_v), 2.0f)));
	float t_1 = powf(floorf(w), 2.0f);
	float tmp;
	if ((dX_46_u * (dX_46_u * t_1)) >= (dY_46_u * (dY_46_u * t_1))) {
		tmp = -1.0f / ((powf(t_0, 0.5f) / dX_46_v) * (-1.0f / floorf(h)));
	} else {
		tmp = powf(t_0, -0.5f) * (dY_46_v / (1.0f / floorf(h)));
	}
	return tmp;
}
function code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = (Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dX_46_v) ^ Float32(2.0))) != Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dX_46_v) ^ Float32(2.0)))) ? Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dY_46_v) ^ Float32(2.0))) : ((Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dY_46_v) ^ Float32(2.0))) != Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dY_46_v) ^ Float32(2.0)))) ? Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dX_46_v) ^ Float32(2.0))) : max(Float32((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dX_46_v) ^ Float32(2.0))), Float32((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) + (Float32(floor(h) * dY_46_v) ^ Float32(2.0)))))
	t_1 = floor(w) ^ Float32(2.0)
	tmp = Float32(0.0)
	if (Float32(dX_46_u * Float32(dX_46_u * t_1)) >= Float32(dY_46_u * Float32(dY_46_u * t_1)))
		tmp = Float32(Float32(-1.0) / Float32(Float32((t_0 ^ Float32(0.5)) / dX_46_v) * Float32(Float32(-1.0) / floor(h))));
	else
		tmp = Float32((t_0 ^ Float32(-0.5)) * Float32(dY_46_v / Float32(Float32(1.0) / floor(h))));
	end
	return tmp
end
function tmp_2 = code(w, h, dX_46_u, dX_46_v, dY_46_u, dY_46_v, maxAniso)
	t_0 = max((((floor(w) * dX_46_u) ^ single(2.0)) + ((floor(h) * dX_46_v) ^ single(2.0))), (((floor(w) * dY_46_u) ^ single(2.0)) + ((floor(h) * dY_46_v) ^ single(2.0))));
	t_1 = floor(w) ^ single(2.0);
	tmp = single(0.0);
	if ((dX_46_u * (dX_46_u * t_1)) >= (dY_46_u * (dY_46_u * t_1)))
		tmp = single(-1.0) / (((t_0 ^ single(0.5)) / dX_46_v) * (single(-1.0) / floor(h)));
	else
		tmp = (t_0 ^ single(-0.5)) * (dY_46_v / (single(1.0) / floor(h)));
	end
	tmp_2 = tmp;
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\\
t_1 := {\left(\left\lfloorw\right\rfloor\right)}^{2}\\
\mathbf{if}\;dX.u \cdot \left(dX.u \cdot t\_1\right) \geq dY.u \cdot \left(dY.u \cdot t\_1\right):\\
\;\;\;\;\frac{-1}{\frac{{t\_0}^{0.5}}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\

\mathbf{else}:\\
\;\;\;\;{t\_0}^{-0.5} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\


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

    \[\begin{array}{l} \mathbf{if}\;\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \geq \left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right):\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\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)}} \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\\ \end{array} \]
  2. Simplified75.9%

    \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ } \end{array}} \]
  3. Add Preprocessing
  4. Taylor expanded in dX.u around inf

    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\color{blue}{\left({dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}, \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
  5. Step-by-step derivation
    1. unpow2N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(\left(dX.u \cdot dX.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(\color{blue}{h}\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    2. associate-*l*N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    3. *-commutativeN/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\left(dX.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    4. *-lowering-*.f32N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dX.u\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\color{blue}{\mathsf{floor.f32}\left(h\right)}, dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    5. *-commutativeN/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    6. *-lowering-*.f32N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    7. pow-lowering-pow.f32N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
    8. floor-lowering-floor.f3263.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), \mathsf{sqrt.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dX.u, dX.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dX.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right)\right)\right)\right), \mathsf{+.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), \mathsf{*.f32}\left(dY.u, dY.u\right)\right)\right), \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), \mathsf{*.f32}\left(dY.v, \mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
  6. Simplified63.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)} \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dY.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \end{array} \]
  7. Applied egg-rr63.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right):\\ \;\;\;\;\frac{\left\lfloorh\right\rfloor \cdot dX.v}{\sqrt{\mathsf{max}\left(\left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dX.u \cdot dX.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dX.v \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right), \left\lfloorw\right\rfloor \cdot \left(\left\lfloorw\right\rfloor \cdot \left(dY.u \cdot dY.u\right)\right) + \left\lfloorh\right\rfloor \cdot \left(dY.v \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
  8. Applied egg-rr62.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \color{blue}{\left({dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
  10. Step-by-step derivation
    1. unpow2N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \left(\left(dY.u \cdot dY.u\right) \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    2. associate-*l*N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \left(dY.u \cdot \left(dY.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    3. *-commutativeN/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \left(dY.u \cdot \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dY.u\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    4. *-lowering-*.f32N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(dY.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot dY.u\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    5. *-commutativeN/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(dY.u, \left(dY.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    6. *-lowering-*.f32N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(dY.u, \mathsf{*.f32}\left(dY.u, \left({\left(\left\lfloorw\right\rfloor\right)}^{2}\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    7. pow-lowering-pow.f32N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(dY.u, \mathsf{*.f32}\left(dY.u, \mathsf{pow.f32}\left(\left(\left\lfloorw\right\rfloor\right), 2\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
    8. floor-lowering-floor.f3256.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f32}\left(\mathsf{*.f32}\left(dX.u, \mathsf{*.f32}\left(dX.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right), \mathsf{*.f32}\left(dY.u, \mathsf{*.f32}\left(dY.u, \mathsf{pow.f32}\left(\mathsf{floor.f32}\left(w\right), 2\right)\right)\right)\right):\\ \;\;\;\;\mathsf{/.f32}\left(-1, \mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(dX.v, \mathsf{floor.f32}\left(h\right)\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{1}{2}\right), dX.v\right), \mathsf{/.f32}\left(-1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f32}\left(\mathsf{/.f32}\left(\mathsf{pow.f32}\left(\mathsf{fmax.f32}\left(\mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dX.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dX.v\right), 2\right)\right), \mathsf{+.f32}\left(\mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(w\right), dY.u\right), 2\right), \mathsf{pow.f32}\left(\mathsf{*.f32}\left(\mathsf{floor.f32}\left(h\right), dY.v\right), 2\right)\right)\right), \frac{-1}{2}\right), 1\right), \mathsf{/.f32}\left(dY.v, \mathsf{/.f32}\left(1, \mathsf{floor.f32}\left(h\right)\right)\right)\right)\\ \end{array} \]
  11. Simplified56.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \cdot \left(dX.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right) \geq \color{blue}{dY.u \cdot \left(dY.u \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}\right)}:\\ \;\;\;\;\frac{-1}{\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{0.5}}{dX.v} \cdot \frac{-1}{\left\lfloorh\right\rfloor}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)\right)}^{-0.5}}{1} \cdot \frac{dY.v}{\frac{1}{\left\lfloorh\right\rfloor}}\\ \end{array} \]
  12. Final simplification56.9%

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

Reproduce

?
herbie shell --seed 2024150 
(FPCore (w h dX.u dX.v dY.u dY.v maxAniso)
  :name "Anisotropic x16 LOD (line direction, v)"
  :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 (>= (+ (* (* (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 (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 h) dX.v)) (* (/ 1.0 (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 h) dY.v))))