Isotropic LOD (LOD)

Percentage Accurate: 68.2% → 68.1%
Time: 39.1s
Alternatives: 16
Speedup: 0.5×

Specification

?
\[\left(\left(\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(1 \leq d \land d \leq 4096\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|dX.w\right| \land \left|dX.w\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 \left(10^{-20} \leq \left|dY.w\right| \land \left|dY.w\right| \leq 10^{+20}\right)\]
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_3 := \left\lfloord\right\rfloor \cdot dY.w\\ t_4 := \left\lfloord\right\rfloor \cdot dX.w\\ t_5 := \left\lfloorw\right\rfloor \cdot dX.u\\ \log_{2} \left(\sqrt{\mathsf{max}\left(\left(t\_5 \cdot t\_5 + t\_2 \cdot t\_2\right) + t\_4 \cdot t\_4, \left(t\_0 \cdot t\_0 + t\_1 \cdot t\_1\right) + t\_3 \cdot t\_3\right)}\right) \end{array} \end{array} \]
(FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
 :precision binary32
 (let* ((t_0 (* (floor w) dY.u))
        (t_1 (* (floor h) dY.v))
        (t_2 (* (floor h) dX.v))
        (t_3 (* (floor d) dY.w))
        (t_4 (* (floor d) dX.w))
        (t_5 (* (floor w) dX.u)))
   (log2
    (sqrt
     (fmax
      (+ (+ (* t_5 t_5) (* t_2 t_2)) (* t_4 t_4))
      (+ (+ (* t_0 t_0) (* t_1 t_1)) (* t_3 t_3)))))))
float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
	float t_0 = floorf(w) * dY_46_u;
	float t_1 = floorf(h) * dY_46_v;
	float t_2 = floorf(h) * dX_46_v;
	float t_3 = floorf(d) * dY_46_w;
	float t_4 = floorf(d) * dX_46_w;
	float t_5 = floorf(w) * dX_46_u;
	return log2f(sqrtf(fmaxf((((t_5 * t_5) + (t_2 * t_2)) + (t_4 * t_4)), (((t_0 * t_0) + (t_1 * t_1)) + (t_3 * t_3)))));
}
function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
	t_0 = Float32(floor(w) * dY_46_u)
	t_1 = Float32(floor(h) * dY_46_v)
	t_2 = Float32(floor(h) * dX_46_v)
	t_3 = Float32(floor(d) * dY_46_w)
	t_4 = Float32(floor(d) * dX_46_w)
	t_5 = Float32(floor(w) * dX_46_u)
	return log2(sqrt(((Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)) != Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4))) ? Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3)) : ((Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3)) != Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3))) ? Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)) : max(Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)), Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3)))))))
end
function tmp = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
	t_0 = floor(w) * dY_46_u;
	t_1 = floor(h) * dY_46_v;
	t_2 = floor(h) * dX_46_v;
	t_3 = floor(d) * dY_46_w;
	t_4 = floor(d) * dX_46_w;
	t_5 = floor(w) * dX_46_u;
	tmp = log2(sqrt(max((((t_5 * t_5) + (t_2 * t_2)) + (t_4 * t_4)), (((t_0 * t_0) + (t_1 * t_1)) + (t_3 * t_3)))));
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\
t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\
t_3 := \left\lfloord\right\rfloor \cdot dY.w\\
t_4 := \left\lfloord\right\rfloor \cdot dX.w\\
t_5 := \left\lfloorw\right\rfloor \cdot dX.u\\
\log_{2} \left(\sqrt{\mathsf{max}\left(\left(t\_5 \cdot t\_5 + t\_2 \cdot t\_2\right) + t\_4 \cdot t\_4, \left(t\_0 \cdot t\_0 + t\_1 \cdot t\_1\right) + t\_3 \cdot t\_3\right)}\right)
\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 16 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: 68.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_3 := \left\lfloord\right\rfloor \cdot dY.w\\ t_4 := \left\lfloord\right\rfloor \cdot dX.w\\ t_5 := \left\lfloorw\right\rfloor \cdot dX.u\\ \log_{2} \left(\sqrt{\mathsf{max}\left(\left(t\_5 \cdot t\_5 + t\_2 \cdot t\_2\right) + t\_4 \cdot t\_4, \left(t\_0 \cdot t\_0 + t\_1 \cdot t\_1\right) + t\_3 \cdot t\_3\right)}\right) \end{array} \end{array} \]
(FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
 :precision binary32
 (let* ((t_0 (* (floor w) dY.u))
        (t_1 (* (floor h) dY.v))
        (t_2 (* (floor h) dX.v))
        (t_3 (* (floor d) dY.w))
        (t_4 (* (floor d) dX.w))
        (t_5 (* (floor w) dX.u)))
   (log2
    (sqrt
     (fmax
      (+ (+ (* t_5 t_5) (* t_2 t_2)) (* t_4 t_4))
      (+ (+ (* t_0 t_0) (* t_1 t_1)) (* t_3 t_3)))))))
float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
	float t_0 = floorf(w) * dY_46_u;
	float t_1 = floorf(h) * dY_46_v;
	float t_2 = floorf(h) * dX_46_v;
	float t_3 = floorf(d) * dY_46_w;
	float t_4 = floorf(d) * dX_46_w;
	float t_5 = floorf(w) * dX_46_u;
	return log2f(sqrtf(fmaxf((((t_5 * t_5) + (t_2 * t_2)) + (t_4 * t_4)), (((t_0 * t_0) + (t_1 * t_1)) + (t_3 * t_3)))));
}
function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
	t_0 = Float32(floor(w) * dY_46_u)
	t_1 = Float32(floor(h) * dY_46_v)
	t_2 = Float32(floor(h) * dX_46_v)
	t_3 = Float32(floor(d) * dY_46_w)
	t_4 = Float32(floor(d) * dX_46_w)
	t_5 = Float32(floor(w) * dX_46_u)
	return log2(sqrt(((Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)) != Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4))) ? Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3)) : ((Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3)) != Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3))) ? Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)) : max(Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)), Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3)))))))
end
function tmp = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
	t_0 = floor(w) * dY_46_u;
	t_1 = floor(h) * dY_46_v;
	t_2 = floor(h) * dX_46_v;
	t_3 = floor(d) * dY_46_w;
	t_4 = floor(d) * dX_46_w;
	t_5 = floor(w) * dX_46_u;
	tmp = log2(sqrt(max((((t_5 * t_5) + (t_2 * t_2)) + (t_4 * t_4)), (((t_0 * t_0) + (t_1 * t_1)) + (t_3 * t_3)))));
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\
t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\
t_3 := \left\lfloord\right\rfloor \cdot dY.w\\
t_4 := \left\lfloord\right\rfloor \cdot dX.w\\
t_5 := \left\lfloorw\right\rfloor \cdot dX.u\\
\log_{2} \left(\sqrt{\mathsf{max}\left(\left(t\_5 \cdot t\_5 + t\_2 \cdot t\_2\right) + t\_4 \cdot t\_4, \left(t\_0 \cdot t\_0 + t\_1 \cdot t\_1\right) + t\_3 \cdot t\_3\right)}\right)
\end{array}
\end{array}

Alternative 1: 68.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_3 := \left\lfloord\right\rfloor \cdot dY.w\\ t_4 := \left\lfloord\right\rfloor \cdot dX.w\\ t_5 := \left\lfloorw\right\rfloor \cdot dX.u\\ \mathbf{if}\;\mathsf{max}\left(\left(t\_5 \cdot t\_5 + t\_2 \cdot t\_2\right) + t\_4 \cdot t\_4, \left(t\_0 \cdot t\_0 + t\_1 \cdot t\_1\right) + t\_3 \cdot t\_3\right) \leq \infty:\\ \;\;\;\;\log_{2} \left({\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(t\_4, \mathsf{hypot}\left(t\_5, t\_2\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(t\_3, \mathsf{hypot}\left(t\_0, t\_1\right)\right)\right)}^{2}\right)}\right)}^{1.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_2}^{2} + {t\_4}^{2}, {t\_1}^{2}\right)}\right)\\ \end{array} \end{array} \]
(FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
 :precision binary32
 (let* ((t_0 (* (floor w) dY.u))
        (t_1 (* (floor h) dY.v))
        (t_2 (* (floor h) dX.v))
        (t_3 (* (floor d) dY.w))
        (t_4 (* (floor d) dX.w))
        (t_5 (* (floor w) dX.u)))
   (if (<=
        (fmax
         (+ (+ (* t_5 t_5) (* t_2 t_2)) (* t_4 t_4))
         (+ (+ (* t_0 t_0) (* t_1 t_1)) (* t_3 t_3)))
        INFINITY)
     (log2
      (pow
       (cbrt
        (fmax
         (pow (hypot t_4 (hypot t_5 t_2)) 2.0)
         (pow (hypot t_3 (hypot t_0 t_1)) 2.0)))
       1.5))
     (log2 (sqrt (fmax (+ (pow t_2 2.0) (pow t_4 2.0)) (pow t_1 2.0)))))))
float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
	float t_0 = floorf(w) * dY_46_u;
	float t_1 = floorf(h) * dY_46_v;
	float t_2 = floorf(h) * dX_46_v;
	float t_3 = floorf(d) * dY_46_w;
	float t_4 = floorf(d) * dX_46_w;
	float t_5 = floorf(w) * dX_46_u;
	float tmp;
	if (fmaxf((((t_5 * t_5) + (t_2 * t_2)) + (t_4 * t_4)), (((t_0 * t_0) + (t_1 * t_1)) + (t_3 * t_3))) <= ((float) INFINITY)) {
		tmp = log2f(powf(cbrtf(fmaxf(powf(hypotf(t_4, hypotf(t_5, t_2)), 2.0f), powf(hypotf(t_3, hypotf(t_0, t_1)), 2.0f))), 1.5f));
	} else {
		tmp = log2f(sqrtf(fmaxf((powf(t_2, 2.0f) + powf(t_4, 2.0f)), powf(t_1, 2.0f))));
	}
	return tmp;
}
function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
	t_0 = Float32(floor(w) * dY_46_u)
	t_1 = Float32(floor(h) * dY_46_v)
	t_2 = Float32(floor(h) * dX_46_v)
	t_3 = Float32(floor(d) * dY_46_w)
	t_4 = Float32(floor(d) * dX_46_w)
	t_5 = Float32(floor(w) * dX_46_u)
	tmp = Float32(0.0)
	if (((Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)) != Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4))) ? Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3)) : ((Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3)) != Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3))) ? Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)) : max(Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)), Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3))))) <= Float32(Inf))
		tmp = log2((cbrt((((hypot(t_4, hypot(t_5, t_2)) ^ Float32(2.0)) != (hypot(t_4, hypot(t_5, t_2)) ^ Float32(2.0))) ? (hypot(t_3, hypot(t_0, t_1)) ^ Float32(2.0)) : (((hypot(t_3, hypot(t_0, t_1)) ^ Float32(2.0)) != (hypot(t_3, hypot(t_0, t_1)) ^ Float32(2.0))) ? (hypot(t_4, hypot(t_5, t_2)) ^ Float32(2.0)) : max((hypot(t_4, hypot(t_5, t_2)) ^ Float32(2.0)), (hypot(t_3, hypot(t_0, t_1)) ^ Float32(2.0)))))) ^ Float32(1.5)));
	else
		tmp = log2(sqrt(((Float32((t_2 ^ Float32(2.0)) + (t_4 ^ Float32(2.0))) != Float32((t_2 ^ Float32(2.0)) + (t_4 ^ Float32(2.0)))) ? (t_1 ^ Float32(2.0)) : (((t_1 ^ Float32(2.0)) != (t_1 ^ Float32(2.0))) ? Float32((t_2 ^ Float32(2.0)) + (t_4 ^ Float32(2.0))) : max(Float32((t_2 ^ Float32(2.0)) + (t_4 ^ Float32(2.0))), (t_1 ^ Float32(2.0)))))));
	end
	return tmp
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\
t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\
t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\
t_3 := \left\lfloord\right\rfloor \cdot dY.w\\
t_4 := \left\lfloord\right\rfloor \cdot dX.w\\
t_5 := \left\lfloorw\right\rfloor \cdot dX.u\\
\mathbf{if}\;\mathsf{max}\left(\left(t\_5 \cdot t\_5 + t\_2 \cdot t\_2\right) + t\_4 \cdot t\_4, \left(t\_0 \cdot t\_0 + t\_1 \cdot t\_1\right) + t\_3 \cdot t\_3\right) \leq \infty:\\
\;\;\;\;\log_{2} \left({\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(t\_4, \mathsf{hypot}\left(t\_5, t\_2\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(t\_3, \mathsf{hypot}\left(t\_0, t\_1\right)\right)\right)}^{2}\right)}\right)}^{1.5}\right)\\

\mathbf{else}:\\
\;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_2}^{2} + {t\_4}^{2}, {t\_1}^{2}\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (fmax.f32 (+.f32 (+.f32 (*.f32 (*.f32 (floor.f32 w) dX.u) (*.f32 (floor.f32 w) dX.u)) (*.f32 (*.f32 (floor.f32 h) dX.v) (*.f32 (floor.f32 h) dX.v))) (*.f32 (*.f32 (floor.f32 d) dX.w) (*.f32 (floor.f32 d) dX.w))) (+.f32 (+.f32 (*.f32 (*.f32 (floor.f32 w) dY.u) (*.f32 (floor.f32 w) dY.u)) (*.f32 (*.f32 (floor.f32 h) dY.v) (*.f32 (floor.f32 h) dY.v))) (*.f32 (*.f32 (floor.f32 d) dY.w) (*.f32 (floor.f32 d) dY.w)))) < +inf.0

    1. Initial program 65.2%

      \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in w around 0 65.2%

      \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative65.2%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
    5. Simplified65.2%

      \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
    6. Applied egg-rr65.2%

      \[\leadsto \log_{2} \color{blue}{\left({\left({\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)}^{2}\right)}^{0.5} \cdot {\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)}^{0.5}\right)} \]
    7. Step-by-step derivation
      1. Simplified65.2%

        \[\leadsto \log_{2} \color{blue}{\left(\left|\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right| \cdot \sqrt{\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}}\right)} \]
      2. Taylor expanded in dX.w around 0 64.5%

        \[\leadsto \log_{2} \color{blue}{\left({\left(1 \cdot \mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(dY.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dY.u \cdot \left\lfloorw\right\rfloor, dY.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}\right)\right)}^{0.16666666666666666} \cdot \left|{\left(\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(dY.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dY.u \cdot \left\lfloorw\right\rfloor, dY.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}\right)\right)}^{0.3333333333333333}\right|\right)} \]
      3. Simplified65.2%

        \[\leadsto \log_{2} \color{blue}{\left({\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)}^{1.5}\right)} \]

      if +inf.0 < (fmax.f32 (+.f32 (+.f32 (*.f32 (*.f32 (floor.f32 w) dX.u) (*.f32 (floor.f32 w) dX.u)) (*.f32 (*.f32 (floor.f32 h) dX.v) (*.f32 (floor.f32 h) dX.v))) (*.f32 (*.f32 (floor.f32 d) dX.w) (*.f32 (floor.f32 d) dX.w))) (+.f32 (+.f32 (*.f32 (*.f32 (floor.f32 w) dY.u) (*.f32 (floor.f32 w) dY.u)) (*.f32 (*.f32 (floor.f32 h) dY.v) (*.f32 (floor.f32 h) dY.v))) (*.f32 (*.f32 (floor.f32 d) dY.w) (*.f32 (floor.f32 d) dY.w))))

      1. Initial program 65.2%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u64.5%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef64.1%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr64.1%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def64.5%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p65.2%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified65.2%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
      7. Taylor expanded in dX.u around 0 57.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutative57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dX.v}^{2}} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        2. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.v \cdot dX.v\right)} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        3. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.v \cdot dX.v\right) + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. swap-sqr57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. *-commutative57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}}^{2} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        7. *-commutative57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dX.w}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dX.w}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dX.w \cdot dX.w\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. swap-sqr57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        11. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dX.w\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        12. *-commutative57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\color{blue}{\left(dX.w \cdot \left\lfloord\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      9. Simplified57.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      10. Taylor expanded in dY.v around inf 41.8%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{{dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}\right)}\right) \]
      11. Step-by-step derivation
        1. *-commutative41.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)}\right) \]
        2. unpow241.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot {dY.v}^{2}\right)}\right) \]
        3. unpow241.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \color{blue}{\left(dY.v \cdot dY.v\right)}\right)}\right) \]
        4. swap-sqr41.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)}\right)}\right) \]
        5. unpow241.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}\right) \]
      12. Simplified41.8%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}\right) \]
    8. Recombined 2 regimes into one program.
    9. Final simplification65.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right) \leq \infty:\\ \;\;\;\;\log_{2} \left({\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)}^{1.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dX.w\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 2: 68.2% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\ t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\ t_3 := \left\lfloord\right\rfloor \cdot dY.w\\ t_4 := \left\lfloord\right\rfloor \cdot dX.w\\ t_5 := \left\lfloorw\right\rfloor \cdot dX.u\\ \mathbf{if}\;\mathsf{max}\left(\left(t\_5 \cdot t\_5 + t\_2 \cdot t\_2\right) + t\_4 \cdot t\_4, \left(t\_0 \cdot t\_0 + t\_1 \cdot t\_1\right) + t\_3 \cdot t\_3\right) \leq \infty:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(t\_4, \mathsf{hypot}\left(t\_5, t\_2\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(t\_3, \mathsf{hypot}\left(t\_0, t\_1\right)\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_2}^{2} + {t\_4}^{2}, {t\_1}^{2}\right)}\right)\\ \end{array} \end{array} \]
    (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
     :precision binary32
     (let* ((t_0 (* (floor w) dY.u))
            (t_1 (* (floor h) dY.v))
            (t_2 (* (floor h) dX.v))
            (t_3 (* (floor d) dY.w))
            (t_4 (* (floor d) dX.w))
            (t_5 (* (floor w) dX.u)))
       (if (<=
            (fmax
             (+ (+ (* t_5 t_5) (* t_2 t_2)) (* t_4 t_4))
             (+ (+ (* t_0 t_0) (* t_1 t_1)) (* t_3 t_3)))
            INFINITY)
         (log2
          (sqrt
           (fmax
            (pow (hypot t_4 (hypot t_5 t_2)) 2.0)
            (pow (hypot t_3 (hypot t_0 t_1)) 2.0))))
         (log2 (sqrt (fmax (+ (pow t_2 2.0) (pow t_4 2.0)) (pow t_1 2.0)))))))
    float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
    	float t_0 = floorf(w) * dY_46_u;
    	float t_1 = floorf(h) * dY_46_v;
    	float t_2 = floorf(h) * dX_46_v;
    	float t_3 = floorf(d) * dY_46_w;
    	float t_4 = floorf(d) * dX_46_w;
    	float t_5 = floorf(w) * dX_46_u;
    	float tmp;
    	if (fmaxf((((t_5 * t_5) + (t_2 * t_2)) + (t_4 * t_4)), (((t_0 * t_0) + (t_1 * t_1)) + (t_3 * t_3))) <= ((float) INFINITY)) {
    		tmp = log2f(sqrtf(fmaxf(powf(hypotf(t_4, hypotf(t_5, t_2)), 2.0f), powf(hypotf(t_3, hypotf(t_0, t_1)), 2.0f))));
    	} else {
    		tmp = log2f(sqrtf(fmaxf((powf(t_2, 2.0f) + powf(t_4, 2.0f)), powf(t_1, 2.0f))));
    	}
    	return tmp;
    }
    
    function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
    	t_0 = Float32(floor(w) * dY_46_u)
    	t_1 = Float32(floor(h) * dY_46_v)
    	t_2 = Float32(floor(h) * dX_46_v)
    	t_3 = Float32(floor(d) * dY_46_w)
    	t_4 = Float32(floor(d) * dX_46_w)
    	t_5 = Float32(floor(w) * dX_46_u)
    	tmp = Float32(0.0)
    	if (((Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)) != Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4))) ? Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3)) : ((Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3)) != Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3))) ? Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)) : max(Float32(Float32(Float32(t_5 * t_5) + Float32(t_2 * t_2)) + Float32(t_4 * t_4)), Float32(Float32(Float32(t_0 * t_0) + Float32(t_1 * t_1)) + Float32(t_3 * t_3))))) <= Float32(Inf))
    		tmp = log2(sqrt((((hypot(t_4, hypot(t_5, t_2)) ^ Float32(2.0)) != (hypot(t_4, hypot(t_5, t_2)) ^ Float32(2.0))) ? (hypot(t_3, hypot(t_0, t_1)) ^ Float32(2.0)) : (((hypot(t_3, hypot(t_0, t_1)) ^ Float32(2.0)) != (hypot(t_3, hypot(t_0, t_1)) ^ Float32(2.0))) ? (hypot(t_4, hypot(t_5, t_2)) ^ Float32(2.0)) : max((hypot(t_4, hypot(t_5, t_2)) ^ Float32(2.0)), (hypot(t_3, hypot(t_0, t_1)) ^ Float32(2.0)))))));
    	else
    		tmp = log2(sqrt(((Float32((t_2 ^ Float32(2.0)) + (t_4 ^ Float32(2.0))) != Float32((t_2 ^ Float32(2.0)) + (t_4 ^ Float32(2.0)))) ? (t_1 ^ Float32(2.0)) : (((t_1 ^ Float32(2.0)) != (t_1 ^ Float32(2.0))) ? Float32((t_2 ^ Float32(2.0)) + (t_4 ^ Float32(2.0))) : max(Float32((t_2 ^ Float32(2.0)) + (t_4 ^ Float32(2.0))), (t_1 ^ Float32(2.0)))))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
    	t_0 = floor(w) * dY_46_u;
    	t_1 = floor(h) * dY_46_v;
    	t_2 = floor(h) * dX_46_v;
    	t_3 = floor(d) * dY_46_w;
    	t_4 = floor(d) * dX_46_w;
    	t_5 = floor(w) * dX_46_u;
    	tmp = single(0.0);
    	if (max((((t_5 * t_5) + (t_2 * t_2)) + (t_4 * t_4)), (((t_0 * t_0) + (t_1 * t_1)) + (t_3 * t_3))) <= single(Inf))
    		tmp = log2(sqrt(max((hypot(t_4, hypot(t_5, t_2)) ^ single(2.0)), (hypot(t_3, hypot(t_0, t_1)) ^ single(2.0)))));
    	else
    		tmp = log2(sqrt(max(((t_2 ^ single(2.0)) + (t_4 ^ single(2.0))), (t_1 ^ single(2.0)))));
    	end
    	tmp_2 = tmp;
    end
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\
    t_1 := \left\lfloorh\right\rfloor \cdot dY.v\\
    t_2 := \left\lfloorh\right\rfloor \cdot dX.v\\
    t_3 := \left\lfloord\right\rfloor \cdot dY.w\\
    t_4 := \left\lfloord\right\rfloor \cdot dX.w\\
    t_5 := \left\lfloorw\right\rfloor \cdot dX.u\\
    \mathbf{if}\;\mathsf{max}\left(\left(t\_5 \cdot t\_5 + t\_2 \cdot t\_2\right) + t\_4 \cdot t\_4, \left(t\_0 \cdot t\_0 + t\_1 \cdot t\_1\right) + t\_3 \cdot t\_3\right) \leq \infty:\\
    \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(t\_4, \mathsf{hypot}\left(t\_5, t\_2\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(t\_3, \mathsf{hypot}\left(t\_0, t\_1\right)\right)\right)}^{2}\right)}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_2}^{2} + {t\_4}^{2}, {t\_1}^{2}\right)}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (fmax.f32 (+.f32 (+.f32 (*.f32 (*.f32 (floor.f32 w) dX.u) (*.f32 (floor.f32 w) dX.u)) (*.f32 (*.f32 (floor.f32 h) dX.v) (*.f32 (floor.f32 h) dX.v))) (*.f32 (*.f32 (floor.f32 d) dX.w) (*.f32 (floor.f32 d) dX.w))) (+.f32 (+.f32 (*.f32 (*.f32 (floor.f32 w) dY.u) (*.f32 (floor.f32 w) dY.u)) (*.f32 (*.f32 (floor.f32 h) dY.v) (*.f32 (floor.f32 h) dY.v))) (*.f32 (*.f32 (floor.f32 d) dY.w) (*.f32 (floor.f32 d) dY.w)))) < +inf.0

      1. Initial program 65.2%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u64.5%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef64.1%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr64.1%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def64.5%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p65.2%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified65.2%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]

      if +inf.0 < (fmax.f32 (+.f32 (+.f32 (*.f32 (*.f32 (floor.f32 w) dX.u) (*.f32 (floor.f32 w) dX.u)) (*.f32 (*.f32 (floor.f32 h) dX.v) (*.f32 (floor.f32 h) dX.v))) (*.f32 (*.f32 (floor.f32 d) dX.w) (*.f32 (floor.f32 d) dX.w))) (+.f32 (+.f32 (*.f32 (*.f32 (floor.f32 w) dY.u) (*.f32 (floor.f32 w) dY.u)) (*.f32 (*.f32 (floor.f32 h) dY.v) (*.f32 (floor.f32 h) dY.v))) (*.f32 (*.f32 (floor.f32 d) dY.w) (*.f32 (floor.f32 d) dY.w))))

      1. Initial program 65.2%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u64.5%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef64.1%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr64.1%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def64.5%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p65.2%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified65.2%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
      7. Taylor expanded in dX.u around 0 57.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutative57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dX.v}^{2}} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        2. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.v \cdot dX.v\right)} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        3. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.v \cdot dX.v\right) + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. swap-sqr57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. *-commutative57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}}^{2} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        7. *-commutative57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dX.w}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dX.w}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dX.w \cdot dX.w\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. swap-sqr57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        11. unpow257.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dX.w\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        12. *-commutative57.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\color{blue}{\left(dX.w \cdot \left\lfloord\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      9. Simplified57.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      10. Taylor expanded in dY.v around inf 41.8%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{{dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}\right)}\right) \]
      11. Step-by-step derivation
        1. *-commutative41.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)}\right) \]
        2. unpow241.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot {dY.v}^{2}\right)}\right) \]
        3. unpow241.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \color{blue}{\left(dY.v \cdot dY.v\right)}\right)}\right) \]
        4. swap-sqr41.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)}\right)}\right) \]
        5. unpow241.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}\right) \]
      12. Simplified41.8%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification65.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right) \leq \infty:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dX.w\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 3: 63.1% accurate, 1.2× 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\\ \mathbf{if}\;dX.w \leq 100000000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_0}^{2} + {t\_2}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(t\_1, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(t\_2, t\_0\right)\right)\right)}^{2}, {t\_1}^{2}\right)}\right)\\ \end{array} \end{array} \]
    (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
     :precision binary32
     (let* ((t_0 (* (floor h) dX.v))
            (t_1 (* (floor w) dY.u))
            (t_2 (* (floor w) dX.u)))
       (if (<= dX.w 100000000.0)
         (log2
          (sqrt
           (fmax
            (+ (pow t_0 2.0) (pow t_2 2.0))
            (pow (hypot (* (floor d) dY.w) (hypot t_1 (* (floor h) dY.v))) 2.0))))
         (log2
          (sqrt
           (fmax
            (pow (hypot (* (floor d) dX.w) (hypot t_2 t_0)) 2.0)
            (pow t_1 2.0)))))))
    float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
    	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 tmp;
    	if (dX_46_w <= 100000000.0f) {
    		tmp = log2f(sqrtf(fmaxf((powf(t_0, 2.0f) + powf(t_2, 2.0f)), powf(hypotf((floorf(d) * dY_46_w), hypotf(t_1, (floorf(h) * dY_46_v))), 2.0f))));
    	} else {
    		tmp = log2f(sqrtf(fmaxf(powf(hypotf((floorf(d) * dX_46_w), hypotf(t_2, t_0)), 2.0f), powf(t_1, 2.0f))));
    	}
    	return tmp;
    }
    
    function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
    	t_0 = Float32(floor(h) * dX_46_v)
    	t_1 = Float32(floor(w) * dY_46_u)
    	t_2 = Float32(floor(w) * dX_46_u)
    	tmp = Float32(0.0)
    	if (dX_46_w <= Float32(100000000.0))
    		tmp = log2(sqrt(((Float32((t_0 ^ Float32(2.0)) + (t_2 ^ Float32(2.0))) != Float32((t_0 ^ Float32(2.0)) + (t_2 ^ Float32(2.0)))) ? (hypot(Float32(floor(d) * dY_46_w), hypot(t_1, Float32(floor(h) * dY_46_v))) ^ Float32(2.0)) : (((hypot(Float32(floor(d) * dY_46_w), hypot(t_1, Float32(floor(h) * dY_46_v))) ^ Float32(2.0)) != (hypot(Float32(floor(d) * dY_46_w), hypot(t_1, Float32(floor(h) * dY_46_v))) ^ Float32(2.0))) ? Float32((t_0 ^ Float32(2.0)) + (t_2 ^ Float32(2.0))) : max(Float32((t_0 ^ Float32(2.0)) + (t_2 ^ Float32(2.0))), (hypot(Float32(floor(d) * dY_46_w), hypot(t_1, Float32(floor(h) * dY_46_v))) ^ Float32(2.0)))))));
    	else
    		tmp = log2(sqrt((((hypot(Float32(floor(d) * dX_46_w), hypot(t_2, t_0)) ^ Float32(2.0)) != (hypot(Float32(floor(d) * dX_46_w), hypot(t_2, t_0)) ^ Float32(2.0))) ? (t_1 ^ Float32(2.0)) : (((t_1 ^ Float32(2.0)) != (t_1 ^ Float32(2.0))) ? (hypot(Float32(floor(d) * dX_46_w), hypot(t_2, t_0)) ^ Float32(2.0)) : max((hypot(Float32(floor(d) * dX_46_w), hypot(t_2, t_0)) ^ Float32(2.0)), (t_1 ^ Float32(2.0)))))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
    	t_0 = floor(h) * dX_46_v;
    	t_1 = floor(w) * dY_46_u;
    	t_2 = floor(w) * dX_46_u;
    	tmp = single(0.0);
    	if (dX_46_w <= single(100000000.0))
    		tmp = log2(sqrt(max(((t_0 ^ single(2.0)) + (t_2 ^ single(2.0))), (hypot((floor(d) * dY_46_w), hypot(t_1, (floor(h) * dY_46_v))) ^ single(2.0)))));
    	else
    		tmp = log2(sqrt(max((hypot((floor(d) * dX_46_w), hypot(t_2, t_0)) ^ single(2.0)), (t_1 ^ single(2.0)))));
    	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\\
    \mathbf{if}\;dX.w \leq 100000000:\\
    \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_0}^{2} + {t\_2}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(t\_1, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(t\_2, t\_0\right)\right)\right)}^{2}, {t\_1}^{2}\right)}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if dX.w < 1e8

      1. Initial program 65.3%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u64.6%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef64.2%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr64.2%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def64.6%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p65.3%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative65.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative65.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative65.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified65.3%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
      7. Taylor expanded in dX.w around 0 60.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutative47.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        2. unpow247.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        3. unpow247.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right) + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        4. swap-sqr47.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        5. *-commutative47.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dX.v}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        6. unpow247.5%

          \[\leadsto \log_{2} \left(\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\right)}^{2} \cdot \color{blue}{\left(dX.v \cdot dX.v\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        7. unpow247.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.v \cdot dX.v\right), {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        8. swap-sqr47.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        9. unpow247.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        10. unpow247.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\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}\right)}\right) \]
        11. *-commutative47.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        12. *-commutative47.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + {\color{blue}{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
      9. Simplified60.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + {\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]

      if 1e8 < dX.w

      1. Initial program 64.6%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u63.6%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef63.6%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr63.6%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def63.6%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p64.6%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative64.6%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative64.6%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative64.6%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified64.6%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
      7. Taylor expanded in dY.u around inf 63.1%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutative63.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}}\right)}\right) \]
        2. unpow263.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2}\right)}\right) \]
        3. unpow263.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)}\right)}\right) \]
        4. swap-sqr63.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)}\right)}\right) \]
        5. unpow263.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
      9. Simplified63.1%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification61.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.w \leq 100000000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} + {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 63.6% accurate, 1.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}\\ t_1 := {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\\ \mathbf{if}\;dX.u \leq 100000000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0 + {\left(\left\lfloord\right\rfloor \cdot dX.w\right)}^{2}, t\_1\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0 + {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, t\_1\right)}\right)\\ \end{array} \end{array} \]
    (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
     :precision binary32
     (let* ((t_0 (pow (* (floor h) dX.v) 2.0))
            (t_1
             (pow
              (hypot
               (* (floor d) dY.w)
               (hypot (* (floor w) dY.u) (* (floor h) dY.v)))
              2.0)))
       (if (<= dX.u 100000000.0)
         (log2 (sqrt (fmax (+ t_0 (pow (* (floor d) dX.w) 2.0)) t_1)))
         (log2 (sqrt (fmax (+ t_0 (pow (* (floor w) dX.u) 2.0)) t_1))))))
    float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
    	float t_0 = powf((floorf(h) * dX_46_v), 2.0f);
    	float t_1 = powf(hypotf((floorf(d) * dY_46_w), hypotf((floorf(w) * dY_46_u), (floorf(h) * dY_46_v))), 2.0f);
    	float tmp;
    	if (dX_46_u <= 100000000.0f) {
    		tmp = log2f(sqrtf(fmaxf((t_0 + powf((floorf(d) * dX_46_w), 2.0f)), t_1)));
    	} else {
    		tmp = log2f(sqrtf(fmaxf((t_0 + powf((floorf(w) * dX_46_u), 2.0f)), t_1)));
    	}
    	return tmp;
    }
    
    function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
    	t_0 = Float32(floor(h) * dX_46_v) ^ Float32(2.0)
    	t_1 = hypot(Float32(floor(d) * dY_46_w), hypot(Float32(floor(w) * dY_46_u), Float32(floor(h) * dY_46_v))) ^ Float32(2.0)
    	tmp = Float32(0.0)
    	if (dX_46_u <= Float32(100000000.0))
    		tmp = log2(sqrt(((Float32(t_0 + (Float32(floor(d) * dX_46_w) ^ Float32(2.0))) != Float32(t_0 + (Float32(floor(d) * dX_46_w) ^ Float32(2.0)))) ? t_1 : ((t_1 != t_1) ? Float32(t_0 + (Float32(floor(d) * dX_46_w) ^ Float32(2.0))) : max(Float32(t_0 + (Float32(floor(d) * dX_46_w) ^ Float32(2.0))), t_1)))));
    	else
    		tmp = log2(sqrt(((Float32(t_0 + (Float32(floor(w) * dX_46_u) ^ Float32(2.0))) != Float32(t_0 + (Float32(floor(w) * dX_46_u) ^ Float32(2.0)))) ? t_1 : ((t_1 != t_1) ? Float32(t_0 + (Float32(floor(w) * dX_46_u) ^ Float32(2.0))) : max(Float32(t_0 + (Float32(floor(w) * dX_46_u) ^ Float32(2.0))), t_1)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
    	t_0 = (floor(h) * dX_46_v) ^ single(2.0);
    	t_1 = hypot((floor(d) * dY_46_w), hypot((floor(w) * dY_46_u), (floor(h) * dY_46_v))) ^ single(2.0);
    	tmp = single(0.0);
    	if (dX_46_u <= single(100000000.0))
    		tmp = log2(sqrt(max((t_0 + ((floor(d) * dX_46_w) ^ single(2.0))), t_1)));
    	else
    		tmp = log2(sqrt(max((t_0 + ((floor(w) * dX_46_u) ^ single(2.0))), t_1)));
    	end
    	tmp_2 = tmp;
    end
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}\\
    t_1 := {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\\
    \mathbf{if}\;dX.u \leq 100000000:\\
    \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0 + {\left(\left\lfloord\right\rfloor \cdot dX.w\right)}^{2}, t\_1\right)}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0 + {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, t\_1\right)}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if dX.u < 1e8

      1. Initial program 69.9%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u69.1%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef68.6%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr68.6%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def69.1%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p69.9%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative69.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative69.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative69.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified69.9%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
      7. Taylor expanded in dX.u around 0 64.5%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutative64.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dX.v}^{2}} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        2. unpow264.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.v \cdot dX.v\right)} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        3. unpow264.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.v \cdot dX.v\right) + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. swap-sqr64.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. unpow264.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. *-commutative64.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}}^{2} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        7. *-commutative64.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dX.w}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. unpow264.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dX.w}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. unpow264.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dX.w \cdot dX.w\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. swap-sqr64.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        11. unpow264.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dX.w\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        12. *-commutative64.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\color{blue}{\left(dX.w \cdot \left\lfloord\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      9. Simplified64.5%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]

      if 1e8 < dX.u

      1. Initial program 44.3%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u43.7%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef43.7%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr43.7%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def43.7%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p44.3%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative44.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative44.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative44.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified44.3%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
      7. Taylor expanded in dX.w around 0 44.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutative42.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        2. unpow242.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        3. unpow242.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right) + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        4. swap-sqr42.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        5. *-commutative42.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dX.v}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        6. unpow242.9%

          \[\leadsto \log_{2} \left(\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\right)}^{2} \cdot \color{blue}{\left(dX.v \cdot dX.v\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        7. unpow242.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.v \cdot dX.v\right), {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        8. swap-sqr42.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        9. unpow242.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        10. unpow242.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\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}\right)}\right) \]
        11. *-commutative42.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        12. *-commutative42.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + {\color{blue}{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
      9. Simplified44.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + {\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification60.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.u \leq 100000000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dX.w\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} + {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 63.9% accurate, 1.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\ t_1 := \left\lfloord\right\rfloor \cdot dX.w\\ t_2 := \left\lfloorw\right\rfloor \cdot dX.u\\ t_3 := \left\lfloord\right\rfloor \cdot dY.w\\ \mathbf{if}\;dX.v \leq 5000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_1}^{2} + {t\_2}^{2}, {\left(\mathsf{hypot}\left(t\_3, \mathsf{hypot}\left(t\_0, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(t\_1, \mathsf{hypot}\left(t\_2, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {t\_0}^{2} + {t\_3}^{2}\right)}\right)\\ \end{array} \end{array} \]
    (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
     :precision binary32
     (let* ((t_0 (* (floor w) dY.u))
            (t_1 (* (floor d) dX.w))
            (t_2 (* (floor w) dX.u))
            (t_3 (* (floor d) dY.w)))
       (if (<= dX.v 5000.0)
         (log2
          (sqrt
           (fmax
            (+ (pow t_1 2.0) (pow t_2 2.0))
            (pow (hypot t_3 (hypot t_0 (* (floor h) dY.v))) 2.0))))
         (log2
          (sqrt
           (fmax
            (pow (hypot t_1 (hypot t_2 (* (floor h) dX.v))) 2.0)
            (+ (pow t_0 2.0) (pow t_3 2.0))))))))
    float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
    	float t_0 = floorf(w) * dY_46_u;
    	float t_1 = floorf(d) * dX_46_w;
    	float t_2 = floorf(w) * dX_46_u;
    	float t_3 = floorf(d) * dY_46_w;
    	float tmp;
    	if (dX_46_v <= 5000.0f) {
    		tmp = log2f(sqrtf(fmaxf((powf(t_1, 2.0f) + powf(t_2, 2.0f)), powf(hypotf(t_3, hypotf(t_0, (floorf(h) * dY_46_v))), 2.0f))));
    	} else {
    		tmp = log2f(sqrtf(fmaxf(powf(hypotf(t_1, hypotf(t_2, (floorf(h) * dX_46_v))), 2.0f), (powf(t_0, 2.0f) + powf(t_3, 2.0f)))));
    	}
    	return tmp;
    }
    
    function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
    	t_0 = Float32(floor(w) * dY_46_u)
    	t_1 = Float32(floor(d) * dX_46_w)
    	t_2 = Float32(floor(w) * dX_46_u)
    	t_3 = Float32(floor(d) * dY_46_w)
    	tmp = Float32(0.0)
    	if (dX_46_v <= Float32(5000.0))
    		tmp = log2(sqrt(((Float32((t_1 ^ Float32(2.0)) + (t_2 ^ Float32(2.0))) != Float32((t_1 ^ Float32(2.0)) + (t_2 ^ Float32(2.0)))) ? (hypot(t_3, hypot(t_0, Float32(floor(h) * dY_46_v))) ^ Float32(2.0)) : (((hypot(t_3, hypot(t_0, Float32(floor(h) * dY_46_v))) ^ Float32(2.0)) != (hypot(t_3, hypot(t_0, Float32(floor(h) * dY_46_v))) ^ Float32(2.0))) ? Float32((t_1 ^ Float32(2.0)) + (t_2 ^ Float32(2.0))) : max(Float32((t_1 ^ Float32(2.0)) + (t_2 ^ Float32(2.0))), (hypot(t_3, hypot(t_0, Float32(floor(h) * dY_46_v))) ^ Float32(2.0)))))));
    	else
    		tmp = log2(sqrt((((hypot(t_1, hypot(t_2, Float32(floor(h) * dX_46_v))) ^ Float32(2.0)) != (hypot(t_1, hypot(t_2, Float32(floor(h) * dX_46_v))) ^ Float32(2.0))) ? Float32((t_0 ^ Float32(2.0)) + (t_3 ^ Float32(2.0))) : ((Float32((t_0 ^ Float32(2.0)) + (t_3 ^ Float32(2.0))) != Float32((t_0 ^ Float32(2.0)) + (t_3 ^ Float32(2.0)))) ? (hypot(t_1, hypot(t_2, Float32(floor(h) * dX_46_v))) ^ Float32(2.0)) : max((hypot(t_1, hypot(t_2, Float32(floor(h) * dX_46_v))) ^ Float32(2.0)), Float32((t_0 ^ Float32(2.0)) + (t_3 ^ Float32(2.0))))))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
    	t_0 = floor(w) * dY_46_u;
    	t_1 = floor(d) * dX_46_w;
    	t_2 = floor(w) * dX_46_u;
    	t_3 = floor(d) * dY_46_w;
    	tmp = single(0.0);
    	if (dX_46_v <= single(5000.0))
    		tmp = log2(sqrt(max(((t_1 ^ single(2.0)) + (t_2 ^ single(2.0))), (hypot(t_3, hypot(t_0, (floor(h) * dY_46_v))) ^ single(2.0)))));
    	else
    		tmp = log2(sqrt(max((hypot(t_1, hypot(t_2, (floor(h) * dX_46_v))) ^ single(2.0)), ((t_0 ^ single(2.0)) + (t_3 ^ single(2.0))))));
    	end
    	tmp_2 = tmp;
    end
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\
    t_1 := \left\lfloord\right\rfloor \cdot dX.w\\
    t_2 := \left\lfloorw\right\rfloor \cdot dX.u\\
    t_3 := \left\lfloord\right\rfloor \cdot dY.w\\
    \mathbf{if}\;dX.v \leq 5000:\\
    \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_1}^{2} + {t\_2}^{2}, {\left(\mathsf{hypot}\left(t\_3, \mathsf{hypot}\left(t\_0, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(t\_1, \mathsf{hypot}\left(t\_2, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {t\_0}^{2} + {t\_3}^{2}\right)}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if dX.v < 5e3

      1. Initial program 68.7%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u67.9%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef67.4%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr67.4%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def67.9%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p68.7%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative68.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative68.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative68.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified68.7%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
      7. Taylor expanded in dX.v around 0 65.0%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutative65.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        2. unpow265.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        3. unpow265.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right) + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. swap-sqr65.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. unpow265.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. *-commutative65.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2} + {dX.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        7. *-commutative65.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dX.w}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. unpow265.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dX.w}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. unpow265.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dX.w \cdot dX.w\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. swap-sqr65.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        11. unpow265.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dX.w\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        12. *-commutative65.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + {\color{blue}{\left(dX.w \cdot \left\lfloord\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      9. Simplified65.0%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]

      if 5e3 < dX.v

      1. Initial program 53.2%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u52.7%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef52.7%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr52.7%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def52.7%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p53.2%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative53.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative53.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative53.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified53.2%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
      7. Taylor expanded in dY.v around 0 53.6%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutative33.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
        2. unpow233.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
        3. unpow233.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
        4. swap-sqr33.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
        5. unpow233.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
        6. *-commutative33.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
        7. unpow233.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
        8. unpow233.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
        9. swap-sqr33.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
        10. unpow233.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
      9. Simplified53.6%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification62.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \leq 5000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloord\right\rfloor \cdot dX.w\right)}^{2} + {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 55.8% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}\\ \mathbf{if}\;dY.u \leq 0.009999999776482582:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left({\left(\sqrt[3]{\mathsf{max}\left(t\_0, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)}^{1.5}\right)\\ \end{array} \end{array} \]
    (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
     :precision binary32
     (let* ((t_0
             (pow
              (hypot
               (* (floor d) dX.w)
               (hypot (* (floor w) dX.u) (* (floor h) dX.v)))
              2.0)))
       (if (<= dY.u 0.009999999776482582)
         (log2 (sqrt (fmax t_0 (pow (* (floor d) dY.w) 2.0))))
         (log2 (pow (cbrt (fmax t_0 (pow (* (floor w) dY.u) 2.0))) 1.5)))))
    float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
    	float t_0 = powf(hypotf((floorf(d) * dX_46_w), hypotf((floorf(w) * dX_46_u), (floorf(h) * dX_46_v))), 2.0f);
    	float tmp;
    	if (dY_46_u <= 0.009999999776482582f) {
    		tmp = log2f(sqrtf(fmaxf(t_0, powf((floorf(d) * dY_46_w), 2.0f))));
    	} else {
    		tmp = log2f(powf(cbrtf(fmaxf(t_0, powf((floorf(w) * dY_46_u), 2.0f))), 1.5f));
    	}
    	return tmp;
    }
    
    function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
    	t_0 = hypot(Float32(floor(d) * dX_46_w), hypot(Float32(floor(w) * dX_46_u), Float32(floor(h) * dX_46_v))) ^ Float32(2.0)
    	tmp = Float32(0.0)
    	if (dY_46_u <= Float32(0.009999999776482582))
    		tmp = log2(sqrt(((t_0 != t_0) ? (Float32(floor(d) * dY_46_w) ^ Float32(2.0)) : (((Float32(floor(d) * dY_46_w) ^ Float32(2.0)) != (Float32(floor(d) * dY_46_w) ^ Float32(2.0))) ? t_0 : max(t_0, (Float32(floor(d) * dY_46_w) ^ Float32(2.0)))))));
    	else
    		tmp = log2((cbrt(((t_0 != t_0) ? (Float32(floor(w) * dY_46_u) ^ Float32(2.0)) : (((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) != (Float32(floor(w) * dY_46_u) ^ Float32(2.0))) ? t_0 : max(t_0, (Float32(floor(w) * dY_46_u) ^ Float32(2.0)))))) ^ Float32(1.5)));
    	end
    	return tmp
    end
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}\\
    \mathbf{if}\;dY.u \leq 0.009999999776482582:\\
    \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\log_{2} \left({\left(\sqrt[3]{\mathsf{max}\left(t\_0, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)}^{1.5}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if dY.u < 0.00999999978

      1. Initial program 68.9%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u68.1%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef67.6%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr67.6%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def68.1%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p68.9%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative68.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative68.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative68.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified68.9%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
      7. Taylor expanded in dY.w around inf 56.6%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutative38.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
        2. unpow238.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
        3. unpow238.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
        4. swap-sqr38.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
        5. unpow238.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
      9. Simplified56.6%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]

      if 0.00999999978 < dY.u

      1. Initial program 55.7%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in w around 0 55.7%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      4. Step-by-step derivation
        1. *-commutative55.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      5. Simplified55.7%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}} + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      6. Applied egg-rr55.8%

        \[\leadsto \log_{2} \color{blue}{\left({\left({\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)}^{2}\right)}^{0.5} \cdot {\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)}^{0.5}\right)} \]
      7. Step-by-step derivation
        1. Simplified55.8%

          \[\leadsto \log_{2} \color{blue}{\left(\left|\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right| \cdot \sqrt{\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}}\right)} \]
        2. Taylor expanded in dX.w around 0 55.1%

          \[\leadsto \log_{2} \color{blue}{\left({\left(1 \cdot \mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(dY.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dY.u \cdot \left\lfloorw\right\rfloor, dY.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}\right)\right)}^{0.16666666666666666} \cdot \left|{\left(\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(dY.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dY.u \cdot \left\lfloorw\right\rfloor, dY.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}\right)\right)}^{0.3333333333333333}\right|\right)} \]
        3. Simplified55.8%

          \[\leadsto \log_{2} \color{blue}{\left({\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)}^{1.5}\right)} \]
        4. Taylor expanded in dY.u around inf 55.4%

          \[\leadsto \log_{2} \left({\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}\right)}\right)}^{1.5}\right) \]
        5. Step-by-step derivation
          1. *-commutative55.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}}\right)}\right) \]
          2. unpow255.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2}\right)}\right) \]
          3. unpow255.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)}\right)}\right) \]
          4. swap-sqr55.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)}\right)}\right) \]
          5. unpow255.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        6. Simplified55.4%

          \[\leadsto \log_{2} \left({\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right)}^{1.5}\right) \]
      8. Recombined 2 regimes into one program.
      9. Final simplification56.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;dY.u \leq 0.009999999776482582:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left({\left(\sqrt[3]{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)}^{1.5}\right)\\ \end{array} \]
      10. Add Preprocessing

      Alternative 7: 56.3% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\ \mathbf{if}\;dX.w \leq 100000000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(t\_0, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {t\_0}^{2}\right)}\right)\\ \end{array} \end{array} \]
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
       :precision binary32
       (let* ((t_0 (* (floor w) dY.u)))
         (if (<= dX.w 100000000.0)
           (log2
            (sqrt
             (fmax
              (pow (* (floor w) dX.u) 2.0)
              (pow (hypot (* (floor d) dY.w) (hypot t_0 (* (floor h) dY.v))) 2.0))))
           (log2
            (sqrt
             (fmax
              (pow (hypot (* (floor d) dX.w) (* (floor h) dX.v)) 2.0)
              (pow t_0 2.0)))))))
      float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
      	float t_0 = floorf(w) * dY_46_u;
      	float tmp;
      	if (dX_46_w <= 100000000.0f) {
      		tmp = log2f(sqrtf(fmaxf(powf((floorf(w) * dX_46_u), 2.0f), powf(hypotf((floorf(d) * dY_46_w), hypotf(t_0, (floorf(h) * dY_46_v))), 2.0f))));
      	} else {
      		tmp = log2f(sqrtf(fmaxf(powf(hypotf((floorf(d) * dX_46_w), (floorf(h) * dX_46_v)), 2.0f), powf(t_0, 2.0f))));
      	}
      	return tmp;
      }
      
      function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = Float32(floor(w) * dY_46_u)
      	tmp = Float32(0.0)
      	if (dX_46_w <= Float32(100000000.0))
      		tmp = log2(sqrt((((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) != (Float32(floor(w) * dX_46_u) ^ Float32(2.0))) ? (hypot(Float32(floor(d) * dY_46_w), hypot(t_0, Float32(floor(h) * dY_46_v))) ^ Float32(2.0)) : (((hypot(Float32(floor(d) * dY_46_w), hypot(t_0, Float32(floor(h) * dY_46_v))) ^ Float32(2.0)) != (hypot(Float32(floor(d) * dY_46_w), hypot(t_0, Float32(floor(h) * dY_46_v))) ^ Float32(2.0))) ? (Float32(floor(w) * dX_46_u) ^ Float32(2.0)) : max((Float32(floor(w) * dX_46_u) ^ Float32(2.0)), (hypot(Float32(floor(d) * dY_46_w), hypot(t_0, Float32(floor(h) * dY_46_v))) ^ Float32(2.0)))))));
      	else
      		tmp = log2(sqrt((((hypot(Float32(floor(d) * dX_46_w), Float32(floor(h) * dX_46_v)) ^ Float32(2.0)) != (hypot(Float32(floor(d) * dX_46_w), Float32(floor(h) * dX_46_v)) ^ Float32(2.0))) ? (t_0 ^ Float32(2.0)) : (((t_0 ^ Float32(2.0)) != (t_0 ^ Float32(2.0))) ? (hypot(Float32(floor(d) * dX_46_w), Float32(floor(h) * dX_46_v)) ^ Float32(2.0)) : max((hypot(Float32(floor(d) * dX_46_w), Float32(floor(h) * dX_46_v)) ^ Float32(2.0)), (t_0 ^ Float32(2.0)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = floor(w) * dY_46_u;
      	tmp = single(0.0);
      	if (dX_46_w <= single(100000000.0))
      		tmp = log2(sqrt(max(((floor(w) * dX_46_u) ^ single(2.0)), (hypot((floor(d) * dY_46_w), hypot(t_0, (floor(h) * dY_46_v))) ^ single(2.0)))));
      	else
      		tmp = log2(sqrt(max((hypot((floor(d) * dX_46_w), (floor(h) * dX_46_v)) ^ single(2.0)), (t_0 ^ single(2.0)))));
      	end
      	tmp_2 = tmp;
      end
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\
      \mathbf{if}\;dX.w \leq 100000000:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(t\_0, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {t\_0}^{2}\right)}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if dX.w < 1e8

        1. Initial program 65.3%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u64.6%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef64.2%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr64.2%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def64.6%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p65.3%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative65.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative65.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative65.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified65.3%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dX.u around inf 54.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative54.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          2. unpow254.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          3. unpow254.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right), {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. swap-sqr54.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. unpow254.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          6. *-commutative54.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. Simplified54.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]

        if 1e8 < dX.w

        1. Initial program 64.6%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u63.6%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef63.6%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr63.6%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def63.6%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p64.6%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative64.6%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative64.6%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative64.6%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified64.6%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dY.u around inf 63.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative63.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}}\right)}\right) \]
          2. unpow263.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2}\right)}\right) \]
          3. unpow263.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)}\right)}\right) \]
          4. swap-sqr63.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)}\right)}\right) \]
          5. unpow263.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        9. Simplified63.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        10. Taylor expanded in dX.u around 0 62.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification55.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.w \leq 100000000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 8: 55.2% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dX.u\\ t_1 := \left\lfloorh\right\rfloor \cdot dX.v\\ \mathbf{if}\;dY.u \leq 3100:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(t\_0, t\_1\right)\right)\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_1}^{2} + {t\_0}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \end{array} \]
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
       :precision binary32
       (let* ((t_0 (* (floor w) dX.u)) (t_1 (* (floor h) dX.v)))
         (if (<= dY.u 3100.0)
           (log2
            (sqrt
             (fmax
              (pow (hypot (* (floor d) dX.w) (hypot t_0 t_1)) 2.0)
              (pow (* (floor d) dY.w) 2.0))))
           (log2
            (sqrt
             (fmax (+ (pow t_1 2.0) (pow t_0 2.0)) (pow (* (floor w) dY.u) 2.0)))))))
      float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
      	float t_0 = floorf(w) * dX_46_u;
      	float t_1 = floorf(h) * dX_46_v;
      	float tmp;
      	if (dY_46_u <= 3100.0f) {
      		tmp = log2f(sqrtf(fmaxf(powf(hypotf((floorf(d) * dX_46_w), hypotf(t_0, t_1)), 2.0f), powf((floorf(d) * dY_46_w), 2.0f))));
      	} else {
      		tmp = log2f(sqrtf(fmaxf((powf(t_1, 2.0f) + powf(t_0, 2.0f)), powf((floorf(w) * dY_46_u), 2.0f))));
      	}
      	return tmp;
      }
      
      function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = Float32(floor(w) * dX_46_u)
      	t_1 = Float32(floor(h) * dX_46_v)
      	tmp = Float32(0.0)
      	if (dY_46_u <= Float32(3100.0))
      		tmp = log2(sqrt((((hypot(Float32(floor(d) * dX_46_w), hypot(t_0, t_1)) ^ Float32(2.0)) != (hypot(Float32(floor(d) * dX_46_w), hypot(t_0, t_1)) ^ Float32(2.0))) ? (Float32(floor(d) * dY_46_w) ^ Float32(2.0)) : (((Float32(floor(d) * dY_46_w) ^ Float32(2.0)) != (Float32(floor(d) * dY_46_w) ^ Float32(2.0))) ? (hypot(Float32(floor(d) * dX_46_w), hypot(t_0, t_1)) ^ Float32(2.0)) : max((hypot(Float32(floor(d) * dX_46_w), hypot(t_0, t_1)) ^ Float32(2.0)), (Float32(floor(d) * dY_46_w) ^ Float32(2.0)))))));
      	else
      		tmp = log2(sqrt(((Float32((t_1 ^ Float32(2.0)) + (t_0 ^ Float32(2.0))) != Float32((t_1 ^ Float32(2.0)) + (t_0 ^ Float32(2.0)))) ? (Float32(floor(w) * dY_46_u) ^ Float32(2.0)) : (((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) != (Float32(floor(w) * dY_46_u) ^ Float32(2.0))) ? Float32((t_1 ^ Float32(2.0)) + (t_0 ^ Float32(2.0))) : max(Float32((t_1 ^ Float32(2.0)) + (t_0 ^ Float32(2.0))), (Float32(floor(w) * dY_46_u) ^ Float32(2.0)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = floor(w) * dX_46_u;
      	t_1 = floor(h) * dX_46_v;
      	tmp = single(0.0);
      	if (dY_46_u <= single(3100.0))
      		tmp = log2(sqrt(max((hypot((floor(d) * dX_46_w), hypot(t_0, t_1)) ^ single(2.0)), ((floor(d) * dY_46_w) ^ single(2.0)))));
      	else
      		tmp = log2(sqrt(max(((t_1 ^ single(2.0)) + (t_0 ^ single(2.0))), ((floor(w) * dY_46_u) ^ single(2.0)))));
      	end
      	tmp_2 = tmp;
      end
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \left\lfloorw\right\rfloor \cdot dX.u\\
      t_1 := \left\lfloorh\right\rfloor \cdot dX.v\\
      \mathbf{if}\;dY.u \leq 3100:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(t\_0, t\_1\right)\right)\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_1}^{2} + {t\_0}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if dY.u < 3100

        1. Initial program 68.4%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u67.7%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef67.2%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr67.2%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def67.7%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p68.4%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative68.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative68.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative68.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified68.4%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dY.w around inf 56.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative37.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
          2. unpow237.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
          3. unpow237.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
          4. swap-sqr37.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
          5. unpow237.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        9. Simplified56.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]

        if 3100 < dY.u

        1. Initial program 53.1%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u52.5%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef52.5%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr52.5%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def52.5%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p53.1%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative53.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative53.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative53.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified53.1%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dY.u around inf 53.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative53.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}}\right)}\right) \]
          2. unpow253.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2}\right)}\right) \]
          3. unpow253.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)}\right)}\right) \]
          4. swap-sqr53.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)}\right)}\right) \]
          5. unpow253.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        9. Simplified53.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        10. Taylor expanded in dX.w around 0 53.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative53.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          2. unpow253.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          3. unpow253.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right) + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          4. swap-sqr53.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)} + {dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          5. *-commutative53.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dX.v}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          6. unpow253.9%

            \[\leadsto \log_{2} \left(\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\right)}^{2} \cdot \color{blue}{\left(dX.v \cdot dX.v\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          7. unpow253.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.v \cdot dX.v\right), {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          8. swap-sqr53.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          9. unpow253.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          10. unpow253.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\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}\right)}\right) \]
          11. *-commutative53.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2} + {\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          12. *-commutative53.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + {\color{blue}{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        12. Simplified53.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2} + {\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification55.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;dY.u \leq 3100:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2} + {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 9: 55.8% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}\\ \mathbf{if}\;dY.u \leq 0.009999999776482582:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \end{array} \]
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
       :precision binary32
       (let* ((t_0
               (pow
                (hypot
                 (* (floor d) dX.w)
                 (hypot (* (floor w) dX.u) (* (floor h) dX.v)))
                2.0)))
         (if (<= dY.u 0.009999999776482582)
           (log2 (sqrt (fmax t_0 (pow (* (floor d) dY.w) 2.0))))
           (log2 (sqrt (fmax t_0 (pow (* (floor w) dY.u) 2.0)))))))
      float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
      	float t_0 = powf(hypotf((floorf(d) * dX_46_w), hypotf((floorf(w) * dX_46_u), (floorf(h) * dX_46_v))), 2.0f);
      	float tmp;
      	if (dY_46_u <= 0.009999999776482582f) {
      		tmp = log2f(sqrtf(fmaxf(t_0, powf((floorf(d) * dY_46_w), 2.0f))));
      	} else {
      		tmp = log2f(sqrtf(fmaxf(t_0, powf((floorf(w) * dY_46_u), 2.0f))));
      	}
      	return tmp;
      }
      
      function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = hypot(Float32(floor(d) * dX_46_w), hypot(Float32(floor(w) * dX_46_u), Float32(floor(h) * dX_46_v))) ^ Float32(2.0)
      	tmp = Float32(0.0)
      	if (dY_46_u <= Float32(0.009999999776482582))
      		tmp = log2(sqrt(((t_0 != t_0) ? (Float32(floor(d) * dY_46_w) ^ Float32(2.0)) : (((Float32(floor(d) * dY_46_w) ^ Float32(2.0)) != (Float32(floor(d) * dY_46_w) ^ Float32(2.0))) ? t_0 : max(t_0, (Float32(floor(d) * dY_46_w) ^ Float32(2.0)))))));
      	else
      		tmp = log2(sqrt(((t_0 != t_0) ? (Float32(floor(w) * dY_46_u) ^ Float32(2.0)) : (((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) != (Float32(floor(w) * dY_46_u) ^ Float32(2.0))) ? t_0 : max(t_0, (Float32(floor(w) * dY_46_u) ^ Float32(2.0)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = hypot((floor(d) * dX_46_w), hypot((floor(w) * dX_46_u), (floor(h) * dX_46_v))) ^ single(2.0);
      	tmp = single(0.0);
      	if (dY_46_u <= single(0.009999999776482582))
      		tmp = log2(sqrt(max(t_0, ((floor(d) * dY_46_w) ^ single(2.0)))));
      	else
      		tmp = log2(sqrt(max(t_0, ((floor(w) * dY_46_u) ^ single(2.0)))));
      	end
      	tmp_2 = tmp;
      end
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}\\
      \mathbf{if}\;dY.u \leq 0.009999999776482582:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if dY.u < 0.00999999978

        1. Initial program 68.9%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u68.1%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef67.6%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr67.6%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def68.1%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p68.9%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative68.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative68.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative68.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified68.9%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dY.w around inf 56.6%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative38.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
          2. unpow238.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
          3. unpow238.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
          4. swap-sqr38.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
          5. unpow238.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        9. Simplified56.6%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]

        if 0.00999999978 < dY.u

        1. Initial program 55.7%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u55.1%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef55.1%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr55.1%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def55.1%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p55.7%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative55.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative55.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative55.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified55.7%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dY.u around inf 55.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative55.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}}\right)}\right) \]
          2. unpow255.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2}\right)}\right) \]
          3. unpow255.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)}\right)}\right) \]
          4. swap-sqr55.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)}\right)}\right) \]
          5. unpow255.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        9. Simplified55.4%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification56.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;dY.u \leq 0.009999999776482582:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 10: 48.1% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\ \mathbf{if}\;dX.v \leq 300000000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, t\_0\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {t\_0}^{2}\right)}\right)\\ \end{array} \end{array} \]
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
       :precision binary32
       (let* ((t_0 (* (floor w) dY.u)))
         (if (<= dX.v 300000000.0)
           (log2
            (sqrt
             (fmax
              (pow (* (floor w) dX.u) 2.0)
              (pow (hypot (* (floor d) dY.w) t_0) 2.0))))
           (log2 (sqrt (fmax (pow (* (floor h) dX.v) 2.0) (pow t_0 2.0)))))))
      float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
      	float t_0 = floorf(w) * dY_46_u;
      	float tmp;
      	if (dX_46_v <= 300000000.0f) {
      		tmp = log2f(sqrtf(fmaxf(powf((floorf(w) * dX_46_u), 2.0f), powf(hypotf((floorf(d) * dY_46_w), t_0), 2.0f))));
      	} else {
      		tmp = log2f(sqrtf(fmaxf(powf((floorf(h) * dX_46_v), 2.0f), powf(t_0, 2.0f))));
      	}
      	return tmp;
      }
      
      function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = Float32(floor(w) * dY_46_u)
      	tmp = Float32(0.0)
      	if (dX_46_v <= Float32(300000000.0))
      		tmp = log2(sqrt((((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) != (Float32(floor(w) * dX_46_u) ^ Float32(2.0))) ? (hypot(Float32(floor(d) * dY_46_w), t_0) ^ Float32(2.0)) : (((hypot(Float32(floor(d) * dY_46_w), t_0) ^ Float32(2.0)) != (hypot(Float32(floor(d) * dY_46_w), t_0) ^ Float32(2.0))) ? (Float32(floor(w) * dX_46_u) ^ Float32(2.0)) : max((Float32(floor(w) * dX_46_u) ^ Float32(2.0)), (hypot(Float32(floor(d) * dY_46_w), t_0) ^ Float32(2.0)))))));
      	else
      		tmp = log2(sqrt((((Float32(floor(h) * dX_46_v) ^ Float32(2.0)) != (Float32(floor(h) * dX_46_v) ^ Float32(2.0))) ? (t_0 ^ Float32(2.0)) : (((t_0 ^ Float32(2.0)) != (t_0 ^ Float32(2.0))) ? (Float32(floor(h) * dX_46_v) ^ Float32(2.0)) : max((Float32(floor(h) * dX_46_v) ^ Float32(2.0)), (t_0 ^ Float32(2.0)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = floor(w) * dY_46_u;
      	tmp = single(0.0);
      	if (dX_46_v <= single(300000000.0))
      		tmp = log2(sqrt(max(((floor(w) * dX_46_u) ^ single(2.0)), (hypot((floor(d) * dY_46_w), t_0) ^ single(2.0)))));
      	else
      		tmp = log2(sqrt(max(((floor(h) * dX_46_v) ^ single(2.0)), (t_0 ^ single(2.0)))));
      	end
      	tmp_2 = tmp;
      end
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\
      \mathbf{if}\;dX.v \leq 300000000:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, t\_0\right)\right)}^{2}\right)}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {t\_0}^{2}\right)}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if dX.v < 3e8

        1. Initial program 68.4%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u67.6%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef67.1%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr67.1%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def67.6%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p68.4%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative68.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative68.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative68.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified68.4%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dX.u around inf 56.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative56.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          2. unpow256.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          3. unpow256.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right), {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. swap-sqr56.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. unpow256.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          6. *-commutative56.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. Simplified56.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. Taylor expanded in dY.v around 0 49.6%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative49.6%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          2. unpow249.6%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          3. unpow249.6%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          4. swap-sqr49.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          5. unpow249.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          6. *-commutative49.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
          7. unpow249.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
          8. unpow249.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
          9. swap-sqr49.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
          10. unpow249.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        12. Simplified49.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        13. Step-by-step derivation
          1. expm1-log1p-u49.3%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-udef49.0%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)} - 1\right)} \]
        14. Applied egg-rr49.0%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        15. Step-by-step derivation
          1. expm1-def49.3%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p49.7%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)} \]
        16. Simplified49.7%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)} \]

        if 3e8 < dX.v

        1. Initial program 48.7%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u48.4%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef48.4%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr48.4%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def48.4%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p48.7%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative48.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative48.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative48.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified48.7%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dY.u around inf 47.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative47.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}}\right)}\right) \]
          2. unpow247.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2}\right)}\right) \]
          3. unpow247.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)}\right)}\right) \]
          4. swap-sqr47.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)}\right)}\right) \]
          5. unpow247.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        9. Simplified47.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        10. Taylor expanded in dX.v around inf 42.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative42.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dX.v}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          2. unpow242.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.v \cdot dX.v\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          3. unpow242.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.v \cdot dX.v\right), {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          4. swap-sqr42.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          5. unpow242.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          6. *-commutative42.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        12. Simplified42.7%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification48.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.v \leq 300000000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 11: 48.4% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dX.u\\ t_1 := \left\lfloorw\right\rfloor \cdot dY.u\\ \mathbf{if}\;dX.w \leq 650000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_0}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, t\_1\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, t\_0\right)\right)}^{2}, {t\_1}^{2}\right)}\right)\\ \end{array} \end{array} \]
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
       :precision binary32
       (let* ((t_0 (* (floor w) dX.u)) (t_1 (* (floor w) dY.u)))
         (if (<= dX.w 650000.0)
           (log2
            (sqrt (fmax (pow t_0 2.0) (pow (hypot (* (floor d) dY.w) t_1) 2.0))))
           (log2
            (sqrt (fmax (pow (hypot (* (floor d) dX.w) t_0) 2.0) (pow t_1 2.0)))))))
      float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
      	float t_0 = floorf(w) * dX_46_u;
      	float t_1 = floorf(w) * dY_46_u;
      	float tmp;
      	if (dX_46_w <= 650000.0f) {
      		tmp = log2f(sqrtf(fmaxf(powf(t_0, 2.0f), powf(hypotf((floorf(d) * dY_46_w), t_1), 2.0f))));
      	} else {
      		tmp = log2f(sqrtf(fmaxf(powf(hypotf((floorf(d) * dX_46_w), t_0), 2.0f), powf(t_1, 2.0f))));
      	}
      	return tmp;
      }
      
      function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = Float32(floor(w) * dX_46_u)
      	t_1 = Float32(floor(w) * dY_46_u)
      	tmp = Float32(0.0)
      	if (dX_46_w <= Float32(650000.0))
      		tmp = log2(sqrt((((t_0 ^ Float32(2.0)) != (t_0 ^ Float32(2.0))) ? (hypot(Float32(floor(d) * dY_46_w), t_1) ^ Float32(2.0)) : (((hypot(Float32(floor(d) * dY_46_w), t_1) ^ Float32(2.0)) != (hypot(Float32(floor(d) * dY_46_w), t_1) ^ Float32(2.0))) ? (t_0 ^ Float32(2.0)) : max((t_0 ^ Float32(2.0)), (hypot(Float32(floor(d) * dY_46_w), t_1) ^ Float32(2.0)))))));
      	else
      		tmp = log2(sqrt((((hypot(Float32(floor(d) * dX_46_w), t_0) ^ Float32(2.0)) != (hypot(Float32(floor(d) * dX_46_w), t_0) ^ Float32(2.0))) ? (t_1 ^ Float32(2.0)) : (((t_1 ^ Float32(2.0)) != (t_1 ^ Float32(2.0))) ? (hypot(Float32(floor(d) * dX_46_w), t_0) ^ Float32(2.0)) : max((hypot(Float32(floor(d) * dX_46_w), t_0) ^ Float32(2.0)), (t_1 ^ Float32(2.0)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = floor(w) * dX_46_u;
      	t_1 = floor(w) * dY_46_u;
      	tmp = single(0.0);
      	if (dX_46_w <= single(650000.0))
      		tmp = log2(sqrt(max((t_0 ^ single(2.0)), (hypot((floor(d) * dY_46_w), t_1) ^ single(2.0)))));
      	else
      		tmp = log2(sqrt(max((hypot((floor(d) * dX_46_w), t_0) ^ single(2.0)), (t_1 ^ single(2.0)))));
      	end
      	tmp_2 = tmp;
      end
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \left\lfloorw\right\rfloor \cdot dX.u\\
      t_1 := \left\lfloorw\right\rfloor \cdot dY.u\\
      \mathbf{if}\;dX.w \leq 650000:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({t\_0}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, t\_1\right)\right)}^{2}\right)}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, t\_0\right)\right)}^{2}, {t\_1}^{2}\right)}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if dX.w < 6.5e5

        1. Initial program 65.8%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u65.1%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef64.6%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr64.6%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def65.1%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p65.8%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative65.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative65.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative65.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified65.8%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dX.u around inf 54.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative54.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          2. unpow254.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          3. unpow254.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right), {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. swap-sqr54.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. unpow254.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          6. *-commutative54.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. Simplified54.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. Taylor expanded in dY.v around 0 47.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative47.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          2. unpow247.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          3. unpow247.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          4. swap-sqr47.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          5. unpow247.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          6. *-commutative47.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
          7. unpow247.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
          8. unpow247.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
          9. swap-sqr47.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
          10. unpow247.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        12. Simplified47.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        13. Step-by-step derivation
          1. expm1-log1p-u47.5%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-udef47.2%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)} - 1\right)} \]
        14. Applied egg-rr47.2%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        15. Step-by-step derivation
          1. expm1-def47.5%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p47.8%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)} \]
        16. Simplified47.8%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)} \]

        if 6.5e5 < dX.w

        1. Initial program 62.1%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u61.2%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef61.2%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr61.2%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def61.2%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p62.1%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative62.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative62.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative62.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified62.1%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dY.u around inf 59.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative59.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}}\right)}\right) \]
          2. unpow259.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2}\right)}\right) \]
          3. unpow259.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)}\right)}\right) \]
          4. swap-sqr59.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)}\right)}\right) \]
          5. unpow259.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        9. Simplified59.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        10. Taylor expanded in dX.u around inf 60.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification50.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.w \leq 650000:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \left\lfloorw\right\rfloor \cdot dX.u\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 12: 47.6% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\ \mathbf{if}\;dX.w \leq 4.999999873689376 \cdot 10^{-6}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, t\_0\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {t\_0}^{2}\right)}\right)\\ \end{array} \end{array} \]
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
       :precision binary32
       (let* ((t_0 (* (floor w) dY.u)))
         (if (<= dX.w 4.999999873689376e-6)
           (log2
            (sqrt
             (fmax
              (pow (* (floor w) dX.u) 2.0)
              (pow (hypot (* (floor d) dY.w) t_0) 2.0))))
           (log2
            (sqrt
             (fmax
              (pow (hypot (* (floor d) dX.w) (* (floor h) dX.v)) 2.0)
              (pow t_0 2.0)))))))
      float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
      	float t_0 = floorf(w) * dY_46_u;
      	float tmp;
      	if (dX_46_w <= 4.999999873689376e-6f) {
      		tmp = log2f(sqrtf(fmaxf(powf((floorf(w) * dX_46_u), 2.0f), powf(hypotf((floorf(d) * dY_46_w), t_0), 2.0f))));
      	} else {
      		tmp = log2f(sqrtf(fmaxf(powf(hypotf((floorf(d) * dX_46_w), (floorf(h) * dX_46_v)), 2.0f), powf(t_0, 2.0f))));
      	}
      	return tmp;
      }
      
      function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = Float32(floor(w) * dY_46_u)
      	tmp = Float32(0.0)
      	if (dX_46_w <= Float32(4.999999873689376e-6))
      		tmp = log2(sqrt((((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) != (Float32(floor(w) * dX_46_u) ^ Float32(2.0))) ? (hypot(Float32(floor(d) * dY_46_w), t_0) ^ Float32(2.0)) : (((hypot(Float32(floor(d) * dY_46_w), t_0) ^ Float32(2.0)) != (hypot(Float32(floor(d) * dY_46_w), t_0) ^ Float32(2.0))) ? (Float32(floor(w) * dX_46_u) ^ Float32(2.0)) : max((Float32(floor(w) * dX_46_u) ^ Float32(2.0)), (hypot(Float32(floor(d) * dY_46_w), t_0) ^ Float32(2.0)))))));
      	else
      		tmp = log2(sqrt((((hypot(Float32(floor(d) * dX_46_w), Float32(floor(h) * dX_46_v)) ^ Float32(2.0)) != (hypot(Float32(floor(d) * dX_46_w), Float32(floor(h) * dX_46_v)) ^ Float32(2.0))) ? (t_0 ^ Float32(2.0)) : (((t_0 ^ Float32(2.0)) != (t_0 ^ Float32(2.0))) ? (hypot(Float32(floor(d) * dX_46_w), Float32(floor(h) * dX_46_v)) ^ Float32(2.0)) : max((hypot(Float32(floor(d) * dX_46_w), Float32(floor(h) * dX_46_v)) ^ Float32(2.0)), (t_0 ^ Float32(2.0)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = floor(w) * dY_46_u;
      	tmp = single(0.0);
      	if (dX_46_w <= single(4.999999873689376e-6))
      		tmp = log2(sqrt(max(((floor(w) * dX_46_u) ^ single(2.0)), (hypot((floor(d) * dY_46_w), t_0) ^ single(2.0)))));
      	else
      		tmp = log2(sqrt(max((hypot((floor(d) * dX_46_w), (floor(h) * dX_46_v)) ^ single(2.0)), (t_0 ^ single(2.0)))));
      	end
      	tmp_2 = tmp;
      end
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \left\lfloorw\right\rfloor \cdot dY.u\\
      \mathbf{if}\;dX.w \leq 4.999999873689376 \cdot 10^{-6}:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, t\_0\right)\right)}^{2}\right)}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {t\_0}^{2}\right)}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if dX.w < 4.99999987e-6

        1. Initial program 65.6%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u65.0%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef64.5%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr64.5%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def65.0%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p65.6%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative65.6%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative65.6%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative65.6%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified65.6%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dX.u around inf 54.4%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative54.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          2. unpow254.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          3. unpow254.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right), {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. swap-sqr54.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. unpow254.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          6. *-commutative54.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. Simplified54.4%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. Taylor expanded in dY.v around 0 49.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative49.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          2. unpow249.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          3. unpow249.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          4. swap-sqr49.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          5. unpow249.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}} + {dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}\right)}\right) \]
          6. *-commutative49.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
          7. unpow249.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
          8. unpow249.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
          9. swap-sqr49.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
          10. unpow249.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        12. Simplified49.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        13. Step-by-step derivation
          1. expm1-log1p-u48.8%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-udef48.5%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2} + {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)} - 1\right)} \]
        14. Applied egg-rr48.5%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        15. Step-by-step derivation
          1. expm1-def48.8%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p49.2%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)} \]
        16. Simplified49.2%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)} \]

        if 4.99999987e-6 < dX.w

        1. Initial program 64.1%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u63.3%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef63.1%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr63.1%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def63.3%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p64.1%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative64.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative64.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative64.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified64.1%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dY.u around inf 55.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative55.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}}\right)}\right) \]
          2. unpow255.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2}\right)}\right) \]
          3. unpow255.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)}\right)}\right) \]
          4. swap-sqr55.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)}\right)}\right) \]
          5. unpow255.3%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        9. Simplified55.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        10. Taylor expanded in dX.u around 0 52.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification50.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;dX.w \leq 4.999999873689376 \cdot 10^{-6}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \left\lfloorw\right\rfloor \cdot dY.u\right)\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 13: 38.8% accurate, 2.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}\\ \mathbf{if}\;dY.w \leq 15:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \end{array} \end{array} \]
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
       :precision binary32
       (let* ((t_0 (pow (* (floor w) dX.u) 2.0)))
         (if (<= dY.w 15.0)
           (log2 (sqrt (fmax t_0 (pow (* (floor h) dY.v) 2.0))))
           (log2 (sqrt (fmax t_0 (pow (* (floor d) dY.w) 2.0)))))))
      float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
      	float t_0 = powf((floorf(w) * dX_46_u), 2.0f);
      	float tmp;
      	if (dY_46_w <= 15.0f) {
      		tmp = log2f(sqrtf(fmaxf(t_0, powf((floorf(h) * dY_46_v), 2.0f))));
      	} else {
      		tmp = log2f(sqrtf(fmaxf(t_0, powf((floorf(d) * dY_46_w), 2.0f))));
      	}
      	return tmp;
      }
      
      function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = Float32(floor(w) * dX_46_u) ^ Float32(2.0)
      	tmp = Float32(0.0)
      	if (dY_46_w <= Float32(15.0))
      		tmp = log2(sqrt(((t_0 != t_0) ? (Float32(floor(h) * dY_46_v) ^ Float32(2.0)) : (((Float32(floor(h) * dY_46_v) ^ Float32(2.0)) != (Float32(floor(h) * dY_46_v) ^ Float32(2.0))) ? t_0 : max(t_0, (Float32(floor(h) * dY_46_v) ^ Float32(2.0)))))));
      	else
      		tmp = log2(sqrt(((t_0 != t_0) ? (Float32(floor(d) * dY_46_w) ^ Float32(2.0)) : (((Float32(floor(d) * dY_46_w) ^ Float32(2.0)) != (Float32(floor(d) * dY_46_w) ^ Float32(2.0))) ? t_0 : max(t_0, (Float32(floor(d) * dY_46_w) ^ Float32(2.0)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = (floor(w) * dX_46_u) ^ single(2.0);
      	tmp = single(0.0);
      	if (dY_46_w <= single(15.0))
      		tmp = log2(sqrt(max(t_0, ((floor(h) * dY_46_v) ^ single(2.0)))));
      	else
      		tmp = log2(sqrt(max(t_0, ((floor(d) * dY_46_w) ^ single(2.0)))));
      	end
      	tmp_2 = tmp;
      end
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}\\
      \mathbf{if}\;dY.w \leq 15:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if dY.w < 15

        1. Initial program 68.4%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u67.7%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef67.1%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr67.1%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def67.7%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p68.4%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative68.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative68.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative68.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified68.4%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dX.u around inf 53.4%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative53.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          2. unpow253.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          3. unpow253.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right), {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. swap-sqr53.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. unpow253.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          6. *-commutative53.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. Simplified53.4%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. Taylor expanded in dY.v around inf 34.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{dY.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative45.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dY.v}^{2}}\right)}\right) \]
          2. unpow245.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot {dY.v}^{2}\right)}\right) \]
          3. unpow245.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right) \cdot \color{blue}{\left(dY.v \cdot dY.v\right)}\right)}\right) \]
          4. swap-sqr45.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)}\right)}\right) \]
          5. unpow245.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2} + {\left(dX.w \cdot \left\lfloord\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}\right) \]
        12. Simplified34.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}}\right)}\right) \]

        if 15 < dY.w

        1. Initial program 55.5%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u54.7%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef54.7%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr54.7%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def54.7%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p55.5%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative55.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative55.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative55.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified55.5%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dX.u around inf 48.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative48.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          2. unpow248.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          3. unpow248.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right), {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. swap-sqr48.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. unpow248.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          6. *-commutative48.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. Simplified48.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. Taylor expanded in dY.w around inf 42.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative42.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
          2. unpow242.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
          3. unpow242.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
          4. swap-sqr42.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
          5. unpow242.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        12. Simplified42.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification36.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;dY.w \leq 15:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloorh\right\rfloor \cdot dY.v\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 14: 39.2% accurate, 2.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}\\ \mathbf{if}\;dY.u \leq 0.11999999731779099:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \end{array} \]
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
       :precision binary32
       (let* ((t_0 (pow (* (floor w) dX.u) 2.0)))
         (if (<= dY.u 0.11999999731779099)
           (log2 (sqrt (fmax t_0 (pow (* (floor d) dY.w) 2.0))))
           (log2 (sqrt (fmax t_0 (pow (* (floor w) dY.u) 2.0)))))))
      float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
      	float t_0 = powf((floorf(w) * dX_46_u), 2.0f);
      	float tmp;
      	if (dY_46_u <= 0.11999999731779099f) {
      		tmp = log2f(sqrtf(fmaxf(t_0, powf((floorf(d) * dY_46_w), 2.0f))));
      	} else {
      		tmp = log2f(sqrtf(fmaxf(t_0, powf((floorf(w) * dY_46_u), 2.0f))));
      	}
      	return tmp;
      }
      
      function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = Float32(floor(w) * dX_46_u) ^ Float32(2.0)
      	tmp = Float32(0.0)
      	if (dY_46_u <= Float32(0.11999999731779099))
      		tmp = log2(sqrt(((t_0 != t_0) ? (Float32(floor(d) * dY_46_w) ^ Float32(2.0)) : (((Float32(floor(d) * dY_46_w) ^ Float32(2.0)) != (Float32(floor(d) * dY_46_w) ^ Float32(2.0))) ? t_0 : max(t_0, (Float32(floor(d) * dY_46_w) ^ Float32(2.0)))))));
      	else
      		tmp = log2(sqrt(((t_0 != t_0) ? (Float32(floor(w) * dY_46_u) ^ Float32(2.0)) : (((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) != (Float32(floor(w) * dY_46_u) ^ Float32(2.0))) ? t_0 : max(t_0, (Float32(floor(w) * dY_46_u) ^ Float32(2.0)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	t_0 = (floor(w) * dX_46_u) ^ single(2.0);
      	tmp = single(0.0);
      	if (dY_46_u <= single(0.11999999731779099))
      		tmp = log2(sqrt(max(t_0, ((floor(d) * dY_46_w) ^ single(2.0)))));
      	else
      		tmp = log2(sqrt(max(t_0, ((floor(w) * dY_46_u) ^ single(2.0)))));
      	end
      	tmp_2 = tmp;
      end
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := {\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}\\
      \mathbf{if}\;dY.u \leq 0.11999999731779099:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left(t\_0, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if dY.u < 0.119999997

        1. Initial program 69.4%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u68.6%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef68.1%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr68.1%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def68.6%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p69.4%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative69.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative69.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative69.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified69.4%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dX.u around inf 54.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative54.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          2. unpow254.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          3. unpow254.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right), {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. swap-sqr54.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. unpow254.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          6. *-commutative54.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. Simplified54.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. Taylor expanded in dY.w around inf 38.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative38.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
          2. unpow238.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
          3. unpow238.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
          4. swap-sqr38.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
          5. unpow238.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        12. Simplified38.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]

        if 0.119999997 < dY.u

        1. Initial program 53.8%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u53.2%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef53.2%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr53.2%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def53.2%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p53.8%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative53.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative53.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative53.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified53.8%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dY.u around inf 54.4%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative54.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}}\right)}\right) \]
          2. unpow254.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2}\right)}\right) \]
          3. unpow254.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)}\right)}\right) \]
          4. swap-sqr54.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)}\right)}\right) \]
          5. unpow254.5%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        9. Simplified54.5%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        10. Taylor expanded in dX.u around inf 47.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative47.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          2. unpow247.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          3. unpow247.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right), {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. swap-sqr47.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. unpow247.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          6. *-commutative47.1%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        12. Simplified47.3%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification40.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;dY.u \leq 0.11999999731779099:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 15: 39.1% accurate, 2.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;dY.u \leq 0.006800000090152025:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \end{array} \]
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
       :precision binary32
       (if (<= dY.u 0.006800000090152025)
         (log2
          (sqrt (fmax (pow (* (floor w) dX.u) 2.0) (pow (* (floor d) dY.w) 2.0))))
         (log2
          (sqrt (fmax (pow (* (floor h) dX.v) 2.0) (pow (* (floor w) dY.u) 2.0))))))
      float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
      	float tmp;
      	if (dY_46_u <= 0.006800000090152025f) {
      		tmp = log2f(sqrtf(fmaxf(powf((floorf(w) * dX_46_u), 2.0f), powf((floorf(d) * dY_46_w), 2.0f))));
      	} else {
      		tmp = log2f(sqrtf(fmaxf(powf((floorf(h) * dX_46_v), 2.0f), powf((floorf(w) * dY_46_u), 2.0f))));
      	}
      	return tmp;
      }
      
      function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	tmp = Float32(0.0)
      	if (dY_46_u <= Float32(0.006800000090152025))
      		tmp = log2(sqrt((((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) != (Float32(floor(w) * dX_46_u) ^ Float32(2.0))) ? (Float32(floor(d) * dY_46_w) ^ Float32(2.0)) : (((Float32(floor(d) * dY_46_w) ^ Float32(2.0)) != (Float32(floor(d) * dY_46_w) ^ Float32(2.0))) ? (Float32(floor(w) * dX_46_u) ^ Float32(2.0)) : max((Float32(floor(w) * dX_46_u) ^ Float32(2.0)), (Float32(floor(d) * dY_46_w) ^ Float32(2.0)))))));
      	else
      		tmp = log2(sqrt((((Float32(floor(h) * dX_46_v) ^ Float32(2.0)) != (Float32(floor(h) * dX_46_v) ^ Float32(2.0))) ? (Float32(floor(w) * dY_46_u) ^ Float32(2.0)) : (((Float32(floor(w) * dY_46_u) ^ Float32(2.0)) != (Float32(floor(w) * dY_46_u) ^ Float32(2.0))) ? (Float32(floor(h) * dX_46_v) ^ Float32(2.0)) : max((Float32(floor(h) * dX_46_v) ^ Float32(2.0)), (Float32(floor(w) * dY_46_u) ^ Float32(2.0)))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	tmp = single(0.0);
      	if (dY_46_u <= single(0.006800000090152025))
      		tmp = log2(sqrt(max(((floor(w) * dX_46_u) ^ single(2.0)), ((floor(d) * dY_46_w) ^ single(2.0)))));
      	else
      		tmp = log2(sqrt(max(((floor(h) * dX_46_v) ^ single(2.0)), ((floor(w) * dY_46_u) ^ single(2.0)))));
      	end
      	tmp_2 = tmp;
      end
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;dY.u \leq 0.006800000090152025:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if dY.u < 0.00680000009

        1. Initial program 68.7%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u68.0%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef67.4%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr67.4%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def68.0%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p68.7%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative68.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative68.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative68.7%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified68.7%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dX.u around inf 54.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative54.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          2. unpow254.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          3. unpow254.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right), {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. swap-sqr54.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. unpow254.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          6. *-commutative54.2%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        9. Simplified54.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        10. Taylor expanded in dY.w around inf 38.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative38.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
          2. unpow238.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
          3. unpow238.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
          4. swap-sqr38.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
          5. unpow238.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
        12. Simplified38.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]

        if 0.00680000009 < dY.u

        1. Initial program 56.4%

          \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. expm1-log1p-u55.7%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
          2. expm1-udef55.7%

            \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
        4. Applied egg-rr55.7%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
        5. Step-by-step derivation
          1. expm1-def55.7%

            \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
          2. expm1-log1p56.4%

            \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
          3. *-commutative56.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          4. *-commutative56.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
          5. *-commutative56.4%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. Simplified56.4%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        7. Taylor expanded in dY.u around inf 55.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{dY.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}\right)}\right) \]
        8. Step-by-step derivation
          1. *-commutative55.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dY.u}^{2}}\right)}\right) \]
          2. unpow255.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot {dY.u}^{2}\right)}\right) \]
          3. unpow255.9%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right) \cdot \color{blue}{\left(dY.u \cdot dY.u\right)}\right)}\right) \]
          4. swap-sqr56.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right)}\right)}\right) \]
          5. unpow256.0%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        9. Simplified56.0%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, \color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}}\right)}\right) \]
        10. Taylor expanded in dX.v around inf 48.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.v}^{2} \cdot {\left(\left\lfloorh\right\rfloor\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        11. Step-by-step derivation
          1. *-commutative48.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot {dX.v}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          2. unpow248.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.v \cdot dX.v\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          3. unpow248.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorh\right\rfloor \cdot \left\lfloorh\right\rfloor\right)} \cdot \left(dX.v \cdot dX.v\right), {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          4. swap-sqr48.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          5. unpow248.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
          6. *-commutative48.8%

            \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
        12. Simplified48.8%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.v \cdot \left\lfloorh\right\rfloor\right)}^{2}}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification41.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;dY.u \leq 0.006800000090152025:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorh\right\rfloor \cdot dX.v\right)}^{2}, {\left(\left\lfloorw\right\rfloor \cdot dY.u\right)}^{2}\right)}\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 16: 35.5% accurate, 2.2× speedup?

      \[\begin{array}{l} \\ \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right) \end{array} \]
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
       :precision binary32
       (log2
        (sqrt (fmax (pow (* (floor w) dX.u) 2.0) (pow (* (floor d) dY.w) 2.0)))))
      float code(float w, float h, float d, float dX_46_u, float dX_46_v, float dX_46_w, float dY_46_u, float dY_46_v, float dY_46_w) {
      	return log2f(sqrtf(fmaxf(powf((floorf(w) * dX_46_u), 2.0f), powf((floorf(d) * dY_46_w), 2.0f))));
      }
      
      function code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	return log2(sqrt((((Float32(floor(w) * dX_46_u) ^ Float32(2.0)) != (Float32(floor(w) * dX_46_u) ^ Float32(2.0))) ? (Float32(floor(d) * dY_46_w) ^ Float32(2.0)) : (((Float32(floor(d) * dY_46_w) ^ Float32(2.0)) != (Float32(floor(d) * dY_46_w) ^ Float32(2.0))) ? (Float32(floor(w) * dX_46_u) ^ Float32(2.0)) : max((Float32(floor(w) * dX_46_u) ^ Float32(2.0)), (Float32(floor(d) * dY_46_w) ^ Float32(2.0)))))))
      end
      
      function tmp = code(w, h, d, dX_46_u, dX_46_v, dX_46_w, dY_46_u, dY_46_v, dY_46_w)
      	tmp = log2(sqrt(max(((floor(w) * dX_46_u) ^ single(2.0)), ((floor(d) * dY_46_w) ^ single(2.0)))));
      end
      
      \begin{array}{l}
      
      \\
      \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right)
      \end{array}
      
      Derivation
      1. Initial program 65.2%

        \[\log_{2} \left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. expm1-log1p-u64.5%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)\right)\right)} \]
        2. expm1-udef64.1%

          \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left(\left(\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right) + \left(\left\lfloorh\right\rfloor \cdot dX.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dX.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dX.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dX.w\right), \left(\left(\left\lfloorw\right\rfloor \cdot dY.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dY.u\right) + \left(\left\lfloorh\right\rfloor \cdot dY.v\right) \cdot \left(\left\lfloorh\right\rfloor \cdot dY.v\right)\right) + \left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)\right)}\right)} - 1\right)} \]
      4. Applied egg-rr64.1%

        \[\leadsto \log_{2} \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} - 1\right)} \]
      5. Step-by-step derivation
        1. expm1-def64.5%

          \[\leadsto \log_{2} \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)\right)\right)} \]
        2. expm1-log1p65.2%

          \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dX.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
        3. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(\color{blue}{dX.w \cdot \left\lfloord\right\rfloor}, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dX.u, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(\color{blue}{dX.u \cdot \left\lfloorw\right\rfloor}, \left\lfloorh\right\rfloor \cdot dX.v\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. *-commutative65.2%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, \color{blue}{dX.v \cdot \left\lfloorh\right\rfloor}\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      6. Simplified65.2%

        \[\leadsto \log_{2} \color{blue}{\left(\sqrt{\mathsf{max}\left({\left(\mathsf{hypot}\left(dX.w \cdot \left\lfloord\right\rfloor, \mathsf{hypot}\left(dX.u \cdot \left\lfloorw\right\rfloor, dX.v \cdot \left\lfloorh\right\rfloor\right)\right)\right)}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right)} \]
      7. Taylor expanded in dX.u around inf 52.1%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{dX.u}^{2} \cdot {\left(\left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      8. Step-by-step derivation
        1. *-commutative52.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot {dX.u}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        2. unpow252.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor\right)}^{2} \cdot \color{blue}{\left(dX.u \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        3. unpow252.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot \left\lfloorw\right\rfloor\right)} \cdot \left(dX.u \cdot dX.u\right), {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        4. swap-sqr52.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{\left(\left\lfloorw\right\rfloor \cdot dX.u\right) \cdot \left(\left\lfloorw\right\rfloor \cdot dX.u\right)}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        5. unpow252.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
        6. *-commutative52.1%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\color{blue}{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}}^{2}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      9. Simplified52.1%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left(\color{blue}{{\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}}, {\left(\mathsf{hypot}\left(\left\lfloord\right\rfloor \cdot dY.w, \mathsf{hypot}\left(\left\lfloorw\right\rfloor \cdot dY.u, \left\lfloorh\right\rfloor \cdot dY.v\right)\right)\right)}^{2}\right)}\right) \]
      10. Taylor expanded in dY.w around inf 34.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{dY.w}^{2} \cdot {\left(\left\lfloord\right\rfloor\right)}^{2}}\right)}\right) \]
      11. Step-by-step derivation
        1. *-commutative34.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor\right)}^{2} \cdot {dY.w}^{2}}\right)}\right) \]
        2. unpow234.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right)} \cdot {dY.w}^{2}\right)}\right) \]
        3. unpow234.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \left(\left\lfloord\right\rfloor \cdot \left\lfloord\right\rfloor\right) \cdot \color{blue}{\left(dY.w \cdot dY.w\right)}\right)}\right) \]
        4. swap-sqr34.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{\left(\left\lfloord\right\rfloor \cdot dY.w\right) \cdot \left(\left\lfloord\right\rfloor \cdot dY.w\right)}\right)}\right) \]
        5. unpow234.9%

          \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
      12. Simplified34.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(dX.u \cdot \left\lfloorw\right\rfloor\right)}^{2}, \color{blue}{{\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}}\right)}\right) \]
      13. Final simplification34.9%

        \[\leadsto \log_{2} \left(\sqrt{\mathsf{max}\left({\left(\left\lfloorw\right\rfloor \cdot dX.u\right)}^{2}, {\left(\left\lfloord\right\rfloor \cdot dY.w\right)}^{2}\right)}\right) \]
      14. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2024026 
      (FPCore (w h d dX.u dX.v dX.w dY.u dY.v dY.w)
        :name "Isotropic LOD (LOD)"
        :precision binary32
        :pre (and (and (and (and (and (and (and (and (and (<= 1.0 w) (<= w 16384.0)) (and (<= 1.0 h) (<= h 16384.0))) (and (<= 1.0 d) (<= d 4096.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 dX.w)) (<= (fabs dX.w) 1e+20))) (and (<= 1e-20 (fabs dY.u)) (<= (fabs dY.u) 1e+20))) (and (<= 1e-20 (fabs dY.v)) (<= (fabs dY.v) 1e+20))) (and (<= 1e-20 (fabs dY.w)) (<= (fabs dY.w) 1e+20)))
        (log2 (sqrt (fmax (+ (+ (* (* (floor w) dX.u) (* (floor w) dX.u)) (* (* (floor h) dX.v) (* (floor h) dX.v))) (* (* (floor d) dX.w) (* (floor d) dX.w))) (+ (+ (* (* (floor w) dY.u) (* (floor w) dY.u)) (* (* (floor h) dY.v) (* (floor h) dY.v))) (* (* (floor d) dY.w) (* (floor d) dY.w)))))))