Henrywood and Agarwal, Equation (13)

Percentage Accurate: 24.3% → 67.2%
Time: 23.5s
Alternatives: 13
Speedup: 151.0×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ \frac{c0}{2 \cdot w} \cdot \left(t\_0 + \sqrt{t\_0 \cdot t\_0 - M \cdot M}\right) \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (* c0 (* d d)) (* (* w h) (* D D)))))
   (* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	return (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    t_0 = (c0 * (d_1 * d_1)) / ((w * h) * (d * d))
    code = (c0 / (2.0d0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (m * m))))
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	return (c0 / (2.0 * w)) * (t_0 + Math.sqrt(((t_0 * t_0) - (M * M))));
}
def code(c0, w, h, D, d, M):
	t_0 = (c0 * (d * d)) / ((w * h) * (D * D))
	return (c0 / (2.0 * w)) * (t_0 + math.sqrt(((t_0 * t_0) - (M * M))))
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))
	return Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M)))))
end
function tmp = code(c0, w, h, D, d, M)
	t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	tmp = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + N[Sqrt[N[(N[(t$95$0 * t$95$0), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
\frac{c0}{2 \cdot w} \cdot \left(t\_0 + \sqrt{t\_0 \cdot t\_0 - M \cdot M}\right)
\end{array}
\end{array}

Sampling outcomes in binary64 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 13 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: 24.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ \frac{c0}{2 \cdot w} \cdot \left(t\_0 + \sqrt{t\_0 \cdot t\_0 - M \cdot M}\right) \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (* c0 (* d d)) (* (* w h) (* D D)))))
   (* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	return (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    t_0 = (c0 * (d_1 * d_1)) / ((w * h) * (d * d))
    code = (c0 / (2.0d0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (m * m))))
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	return (c0 / (2.0 * w)) * (t_0 + Math.sqrt(((t_0 * t_0) - (M * M))));
}
def code(c0, w, h, D, d, M):
	t_0 = (c0 * (d * d)) / ((w * h) * (D * D))
	return (c0 / (2.0 * w)) * (t_0 + math.sqrt(((t_0 * t_0) - (M * M))))
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))
	return Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M)))))
end
function tmp = code(c0, w, h, D, d, M)
	t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	tmp = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + N[Sqrt[N[(N[(t$95$0 * t$95$0), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
\frac{c0}{2 \cdot w} \cdot \left(t\_0 + \sqrt{t\_0 \cdot t\_0 - M \cdot M}\right)
\end{array}
\end{array}

Alternative 1: 67.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c0}{2 \cdot w}\\ t_1 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ \mathbf{if}\;t\_0 \cdot \left(t\_1 + \sqrt{t\_1 \cdot t\_1 - M \cdot M}\right) \leq \infty:\\ \;\;\;\;\frac{t\_0 \cdot \left(d \cdot \left(2 \cdot \left(c0 \cdot d\right)\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ c0 (* 2.0 w))) (t_1 (/ (* c0 (* d d)) (* (* w h) (* D D)))))
   (if (<= (* t_0 (+ t_1 (sqrt (- (* t_1 t_1) (* M M))))) INFINITY)
     (/ (* t_0 (* d (* 2.0 (* c0 d)))) (* h (* w (* D D))))
     (/ (/ (* h (* (* M (* D M)) (* D 0.25))) d) d))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = c0 / (2.0 * w);
	double t_1 = (c0 * (d * d)) / ((w * h) * (D * D));
	double tmp;
	if ((t_0 * (t_1 + sqrt(((t_1 * t_1) - (M * M))))) <= ((double) INFINITY)) {
		tmp = (t_0 * (d * (2.0 * (c0 * d)))) / (h * (w * (D * D)));
	} else {
		tmp = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	}
	return tmp;
}
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = c0 / (2.0 * w);
	double t_1 = (c0 * (d * d)) / ((w * h) * (D * D));
	double tmp;
	if ((t_0 * (t_1 + Math.sqrt(((t_1 * t_1) - (M * M))))) <= Double.POSITIVE_INFINITY) {
		tmp = (t_0 * (d * (2.0 * (c0 * d)))) / (h * (w * (D * D)));
	} else {
		tmp = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = c0 / (2.0 * w)
	t_1 = (c0 * (d * d)) / ((w * h) * (D * D))
	tmp = 0
	if (t_0 * (t_1 + math.sqrt(((t_1 * t_1) - (M * M))))) <= math.inf:
		tmp = (t_0 * (d * (2.0 * (c0 * d)))) / (h * (w * (D * D)))
	else:
		tmp = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(c0 / Float64(2.0 * w))
	t_1 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))
	tmp = 0.0
	if (Float64(t_0 * Float64(t_1 + sqrt(Float64(Float64(t_1 * t_1) - Float64(M * M))))) <= Inf)
		tmp = Float64(Float64(t_0 * Float64(d * Float64(2.0 * Float64(c0 * d)))) / Float64(h * Float64(w * Float64(D * D))));
	else
		tmp = Float64(Float64(Float64(h * Float64(Float64(M * Float64(D * M)) * Float64(D * 0.25))) / d) / d);
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = c0 / (2.0 * w);
	t_1 = (c0 * (d * d)) / ((w * h) * (D * D));
	tmp = 0.0;
	if ((t_0 * (t_1 + sqrt(((t_1 * t_1) - (M * M))))) <= Inf)
		tmp = (t_0 * (d * (2.0 * (c0 * d)))) / (h * (w * (D * D)));
	else
		tmp = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 * N[(t$95$1 + N[Sqrt[N[(N[(t$95$1 * t$95$1), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(t$95$0 * N[(d * N[(2.0 * N[(c0 * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(h * N[(w * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(h * N[(N[(M * N[(D * M), $MachinePrecision]), $MachinePrecision] * N[(D * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{c0}{2 \cdot w}\\
t_1 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
\mathbf{if}\;t\_0 \cdot \left(t\_1 + \sqrt{t\_1 \cdot t\_1 - M \cdot M}\right) \leq \infty:\\
\;\;\;\;\frac{t\_0 \cdot \left(d \cdot \left(2 \cdot \left(c0 \cdot d\right)\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (/.f64 c0 (*.f64 #s(literal 2 binary64) w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M))))) < +inf.0

    1. Initial program 74.4%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified69.7%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \color{blue}{\left(\frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0}{{D}^{2}} \cdot \color{blue}{\frac{{d}^{2}}{h \cdot w}}\right)\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0 \cdot \frac{{d}^{2}}{h \cdot w}}{\color{blue}{{D}^{2}}}\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{\frac{c0 \cdot {d}^{2}}{h \cdot w}}{{\color{blue}{D}}^{2}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h \cdot w}\right), \color{blue}{\left({D}^{2}\right)}\right)\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot {d}^{2}}{h}}{w}\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h}\right), w\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot {d}^{2}\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left(D \cdot \color{blue}{D}\right)\right)\right)\right) \]
      12. *-lowering-*.f6467.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Simplified67.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \color{blue}{\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{D \cdot D}}\right) \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      3. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\right)}\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{\color{blue}{D \cdot D}}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}\right), \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot w}\right), \left(D \cdot D\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(w \cdot h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      15. *-lowering-*.f6468.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    9. Applied egg-rr68.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}}{D \cdot D}\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{D \cdot D} \cdot \color{blue}{\frac{d}{w \cdot h}}\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{c0 \cdot d}{D \cdot D}\right), \color{blue}{\left(\frac{d}{w \cdot h}\right)}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot d\right), \left(D \cdot D\right)\right), \left(\frac{\color{blue}{d}}{w \cdot h}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \left(D \cdot D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(w \cdot h\right)}\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \left(h \cdot \color{blue}{w}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6472.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, \color{blue}{w}\right)\right)\right)\right)\right) \]
    11. Applied egg-rr72.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)}\right) \]
    12. Step-by-step derivation
      1. frac-timesN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}}\right) \]
      2. associate-*r*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(D \cdot D\right)} \cdot \left(h \cdot w\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(h \cdot w\right) \cdot \color{blue}{\left(D \cdot D\right)}}\right) \]
      4. associate-/l*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\color{blue}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}} \]
      5. associate-*r/N/A

        \[\leadsto \frac{\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)\right)}{\color{blue}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}} \]
      6. *-commutativeN/A

        \[\leadsto \frac{\left(2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)\right) \cdot \frac{c0}{2 \cdot w}}{\color{blue}{\left(h \cdot w\right)} \cdot \left(D \cdot D\right)} \]
      7. clear-numN/A

        \[\leadsto \frac{\left(2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)\right) \cdot \frac{1}{\frac{2 \cdot w}{c0}}}{\left(h \cdot \color{blue}{w}\right) \cdot \left(D \cdot D\right)} \]
      8. associate-*r/N/A

        \[\leadsto \frac{\left(2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)\right) \cdot \frac{1}{2 \cdot \frac{w}{c0}}}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)} \]
      9. div-invN/A

        \[\leadsto \frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{2 \cdot \frac{w}{c0}}}{\color{blue}{\left(h \cdot w\right)} \cdot \left(D \cdot D\right)} \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{2 \cdot \frac{w}{c0}}\right), \color{blue}{\left(\left(h \cdot w\right) \cdot \left(D \cdot D\right)\right)}\right) \]
    13. Applied egg-rr78.9%

      \[\leadsto \color{blue}{\frac{\frac{c0}{2 \cdot w} \cdot \left(d \cdot \left(2 \cdot \left(d \cdot c0\right)\right)\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}} \]

    if +inf.0 < (*.f64 (/.f64 c0 (*.f64 #s(literal 2 binary64) w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M)))))

    1. Initial program 0.0%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified0.7%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified16.8%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr44.8%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6459.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified59.5%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(\left(D \cdot \left(M \cdot M\right)\right) \cdot h\right)\right), d\right), d\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(M \cdot M\right)\right)\right) \cdot h\right), d\right), d\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(M \cdot M\right)\right)\right), h\right), d\right), d\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(D \cdot \left(M \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot M\right) \cdot M\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(D \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      11. *-lowering-*.f6462.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, D\right)\right), h\right), d\right), d\right) \]
    14. Applied egg-rr62.8%

      \[\leadsto \frac{\frac{\color{blue}{\left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(0.25 \cdot D\right)\right) \cdot h}}{d}}{d} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \leq \infty:\\ \;\;\;\;\frac{\frac{c0}{2 \cdot w} \cdot \left(d \cdot \left(2 \cdot \left(c0 \cdot d\right)\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 48.0% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{if}\;D \leq 5.6 \cdot 10^{-275}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;D \leq 1.95 \cdot 10^{-241}:\\ \;\;\;\;c0 \cdot \frac{\frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}}{w}\\ \mathbf{elif}\;D \leq 3.8 \cdot 10^{-23}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\ \mathbf{elif}\;D \leq 1.04 \cdot 10^{+96}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{d}{h} \cdot \left(d \cdot \frac{c0}{w}\right)}{D \cdot D}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (/ (* h (* (* M (* D M)) (* D 0.25))) d) d)))
   (if (<= D 5.6e-275)
     t_0
     (if (<= D 1.95e-241)
       (* c0 (/ (/ (* c0 d) (/ (* D D) (/ d (* w h)))) w))
       (if (<= D 3.8e-23)
         (/ (/ (* D (* M (* 0.25 (* D (* h M))))) d) d)
         (if (<= D 1.04e+96)
           (* (/ c0 (* 2.0 w)) (* 2.0 (/ (* (/ d h) (* d (/ c0 w))) (* D D))))
           t_0))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	double tmp;
	if (D <= 5.6e-275) {
		tmp = t_0;
	} else if (D <= 1.95e-241) {
		tmp = c0 * (((c0 * d) / ((D * D) / (d / (w * h)))) / w);
	} else if (D <= 3.8e-23) {
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	} else if (D <= 1.04e+96) {
		tmp = (c0 / (2.0 * w)) * (2.0 * (((d / h) * (d * (c0 / w))) / (D * D)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = ((h * ((m * (d * m)) * (d * 0.25d0))) / d_1) / d_1
    if (d <= 5.6d-275) then
        tmp = t_0
    else if (d <= 1.95d-241) then
        tmp = c0 * (((c0 * d_1) / ((d * d) / (d_1 / (w * h)))) / w)
    else if (d <= 3.8d-23) then
        tmp = ((d * (m * (0.25d0 * (d * (h * m))))) / d_1) / d_1
    else if (d <= 1.04d+96) then
        tmp = (c0 / (2.0d0 * w)) * (2.0d0 * (((d_1 / h) * (d_1 * (c0 / w))) / (d * d)))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	double tmp;
	if (D <= 5.6e-275) {
		tmp = t_0;
	} else if (D <= 1.95e-241) {
		tmp = c0 * (((c0 * d) / ((D * D) / (d / (w * h)))) / w);
	} else if (D <= 3.8e-23) {
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	} else if (D <= 1.04e+96) {
		tmp = (c0 / (2.0 * w)) * (2.0 * (((d / h) * (d * (c0 / w))) / (D * D)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d
	tmp = 0
	if D <= 5.6e-275:
		tmp = t_0
	elif D <= 1.95e-241:
		tmp = c0 * (((c0 * d) / ((D * D) / (d / (w * h)))) / w)
	elif D <= 3.8e-23:
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d
	elif D <= 1.04e+96:
		tmp = (c0 / (2.0 * w)) * (2.0 * (((d / h) * (d * (c0 / w))) / (D * D)))
	else:
		tmp = t_0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(Float64(h * Float64(Float64(M * Float64(D * M)) * Float64(D * 0.25))) / d) / d)
	tmp = 0.0
	if (D <= 5.6e-275)
		tmp = t_0;
	elseif (D <= 1.95e-241)
		tmp = Float64(c0 * Float64(Float64(Float64(c0 * d) / Float64(Float64(D * D) / Float64(d / Float64(w * h)))) / w));
	elseif (D <= 3.8e-23)
		tmp = Float64(Float64(Float64(D * Float64(M * Float64(0.25 * Float64(D * Float64(h * M))))) / d) / d);
	elseif (D <= 1.04e+96)
		tmp = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(2.0 * Float64(Float64(Float64(d / h) * Float64(d * Float64(c0 / w))) / Float64(D * D))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	tmp = 0.0;
	if (D <= 5.6e-275)
		tmp = t_0;
	elseif (D <= 1.95e-241)
		tmp = c0 * (((c0 * d) / ((D * D) / (d / (w * h)))) / w);
	elseif (D <= 3.8e-23)
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	elseif (D <= 1.04e+96)
		tmp = (c0 / (2.0 * w)) * (2.0 * (((d / h) * (d * (c0 / w))) / (D * D)));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(N[(h * N[(N[(M * N[(D * M), $MachinePrecision]), $MachinePrecision] * N[(D * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]}, If[LessEqual[D, 5.6e-275], t$95$0, If[LessEqual[D, 1.95e-241], N[(c0 * N[(N[(N[(c0 * d), $MachinePrecision] / N[(N[(D * D), $MachinePrecision] / N[(d / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 3.8e-23], N[(N[(N[(D * N[(M * N[(0.25 * N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[D, 1.04e+96], N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(N[(d / h), $MachinePrecision] * N[(d * N[(c0 / w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\
\mathbf{if}\;D \leq 5.6 \cdot 10^{-275}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;D \leq 1.95 \cdot 10^{-241}:\\
\;\;\;\;c0 \cdot \frac{\frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}}{w}\\

\mathbf{elif}\;D \leq 3.8 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\

\mathbf{elif}\;D \leq 1.04 \cdot 10^{+96}:\\
\;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{d}{h} \cdot \left(d \cdot \frac{c0}{w}\right)}{D \cdot D}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if D < 5.59999999999999989e-275 or 1.03999999999999996e96 < D

    1. Initial program 20.6%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified19.2%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified13.4%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr33.4%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6449.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified49.2%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(\left(D \cdot \left(M \cdot M\right)\right) \cdot h\right)\right), d\right), d\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(M \cdot M\right)\right)\right) \cdot h\right), d\right), d\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(M \cdot M\right)\right)\right), h\right), d\right), d\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(D \cdot \left(M \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot M\right) \cdot M\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(D \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      11. *-lowering-*.f6452.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, D\right)\right), h\right), d\right), d\right) \]
    14. Applied egg-rr52.1%

      \[\leadsto \frac{\frac{\color{blue}{\left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(0.25 \cdot D\right)\right) \cdot h}}{d}}{d} \]

    if 5.59999999999999989e-275 < D < 1.9499999999999999e-241

    1. Initial program 37.5%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified38.0%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \color{blue}{\left(\frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0}{{D}^{2}} \cdot \color{blue}{\frac{{d}^{2}}{h \cdot w}}\right)\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0 \cdot \frac{{d}^{2}}{h \cdot w}}{\color{blue}{{D}^{2}}}\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{\frac{c0 \cdot {d}^{2}}{h \cdot w}}{{\color{blue}{D}}^{2}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h \cdot w}\right), \color{blue}{\left({D}^{2}\right)}\right)\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot {d}^{2}}{h}}{w}\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h}\right), w\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot {d}^{2}\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left(D \cdot \color{blue}{D}\right)\right)\right)\right) \]
      12. *-lowering-*.f6462.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Simplified62.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \color{blue}{\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{D \cdot D}}\right) \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      3. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\right)}\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{\color{blue}{D \cdot D}}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}\right), \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot w}\right), \left(D \cdot D\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(w \cdot h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      15. *-lowering-*.f6462.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    9. Applied egg-rr62.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}}{D \cdot D}\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{D \cdot D} \cdot \color{blue}{\frac{d}{w \cdot h}}\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{c0 \cdot d}{D \cdot D}\right), \color{blue}{\left(\frac{d}{w \cdot h}\right)}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot d\right), \left(D \cdot D\right)\right), \left(\frac{\color{blue}{d}}{w \cdot h}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \left(D \cdot D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(w \cdot h\right)}\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \left(h \cdot \color{blue}{w}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6475.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, \color{blue}{w}\right)\right)\right)\right)\right) \]
    11. Applied egg-rr75.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)}\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)\right) \cdot \color{blue}{\frac{c0}{2 \cdot w}} \]
      2. frac-timesN/A

        \[\leadsto \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}\right) \cdot \frac{c0}{2 \cdot w} \]
      3. associate-*r*N/A

        \[\leadsto \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}\right) \cdot \frac{c0}{2 \cdot w} \]
      4. *-commutativeN/A

        \[\leadsto \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}\right) \cdot \frac{c0}{2 \cdot w} \]
      5. associate-/l*N/A

        \[\leadsto \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)} \cdot \frac{\color{blue}{c0}}{2 \cdot w} \]
      6. clear-numN/A

        \[\leadsto \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)} \cdot \frac{1}{\color{blue}{\frac{2 \cdot w}{c0}}} \]
      7. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)} \cdot \frac{1}{2 \cdot \color{blue}{\frac{w}{c0}}} \]
      8. div-invN/A

        \[\leadsto \frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{\color{blue}{2 \cdot \frac{w}{c0}}} \]
      9. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{2}}{\color{blue}{\frac{w}{c0}}} \]
      10. associate-/r/N/A

        \[\leadsto \frac{\frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{2}}{w} \cdot \color{blue}{c0} \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{2}}{w}\right), \color{blue}{c0}\right) \]
    13. Applied egg-rr75.3%

      \[\leadsto \color{blue}{\frac{\frac{d \cdot c0}{\frac{D \cdot D}{\frac{d}{h \cdot w}}}}{w} \cdot c0} \]

    if 1.9499999999999999e-241 < D < 3.80000000000000011e-23

    1. Initial program 19.3%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified19.2%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified22.3%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr50.3%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6456.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified56.4%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot D\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right) \cdot D\right), d\right), d\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot D\right), d\right), d\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right) \cdot D\right), d\right), d\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right) \cdot D\right), d\right), d\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right) \cdot D\right), d\right), d\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right), D\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right), D\right), d\right), d\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right) \cdot M\right), D\right), d\right), d\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      13. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(M \cdot h\right)\right)\right)\right), D\right), d\right), d\right) \]
      16. *-lowering-*.f6462.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right)\right)\right), D\right), d\right), d\right) \]
    14. Applied egg-rr62.0%

      \[\leadsto \frac{\frac{\color{blue}{\left(M \cdot \left(0.25 \cdot \left(D \cdot \left(M \cdot h\right)\right)\right)\right) \cdot D}}{d}}{d} \]

    if 3.80000000000000011e-23 < D < 1.03999999999999996e96

    1. Initial program 24.4%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified24.4%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \color{blue}{\left(\frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0}{{D}^{2}} \cdot \color{blue}{\frac{{d}^{2}}{h \cdot w}}\right)\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0 \cdot \frac{{d}^{2}}{h \cdot w}}{\color{blue}{{D}^{2}}}\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{\frac{c0 \cdot {d}^{2}}{h \cdot w}}{{\color{blue}{D}}^{2}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h \cdot w}\right), \color{blue}{\left({D}^{2}\right)}\right)\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot {d}^{2}}{h}}{w}\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h}\right), w\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot {d}^{2}\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left(D \cdot \color{blue}{D}\right)\right)\right)\right) \]
      12. *-lowering-*.f6429.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Simplified29.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \color{blue}{\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{D \cdot D}}\right) \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      3. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\right)}\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{\color{blue}{D \cdot D}}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}\right), \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot w}\right), \left(D \cdot D\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(w \cdot h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      15. *-lowering-*.f6429.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    9. Applied egg-rr29.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}}{D \cdot D}\right)} \]
    10. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0}{w} \cdot \frac{d \cdot d}{h}\right), \mathsf{*.f64}\left(\color{blue}{D}, D\right)\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0}{w} \cdot \left(d \cdot \frac{d}{h}\right)\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\left(\frac{c0}{w} \cdot d\right) \cdot \frac{d}{h}\right), \mathsf{*.f64}\left(\color{blue}{D}, D\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{c0}{w} \cdot d\right), \left(\frac{d}{h}\right)\right), \mathsf{*.f64}\left(\color{blue}{D}, D\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{c0}{w}\right), d\right), \left(\frac{d}{h}\right)\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, w\right), d\right), \left(\frac{d}{h}\right)\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right) \]
      7. /-lowering-/.f6463.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, w\right), d\right), \mathsf{/.f64}\left(d, h\right)\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right) \]
    11. Applied egg-rr63.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{\left(\frac{c0}{w} \cdot d\right) \cdot \frac{d}{h}}}{D \cdot D}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification56.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 5.6 \cdot 10^{-275}:\\ \;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{elif}\;D \leq 1.95 \cdot 10^{-241}:\\ \;\;\;\;c0 \cdot \frac{\frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}}{w}\\ \mathbf{elif}\;D \leq 3.8 \cdot 10^{-23}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\ \mathbf{elif}\;D \leq 1.04 \cdot 10^{+96}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{d}{h} \cdot \left(d \cdot \frac{c0}{w}\right)}{D \cdot D}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 48.1% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ t_1 := \frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}\\ \mathbf{if}\;D \leq 5.25 \cdot 10^{-275}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;D \leq 1.65 \cdot 10^{-241}:\\ \;\;\;\;c0 \cdot \frac{t\_1}{w}\\ \mathbf{elif}\;D \leq 1.72 \cdot 10^{-22}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\ \mathbf{elif}\;D \leq 6.2 \cdot 10^{+36}:\\ \;\;\;\;\frac{t\_1}{\frac{w}{c0}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (/ (* h (* (* M (* D M)) (* D 0.25))) d) d))
        (t_1 (/ (* c0 d) (/ (* D D) (/ d (* w h))))))
   (if (<= D 5.25e-275)
     t_0
     (if (<= D 1.65e-241)
       (* c0 (/ t_1 w))
       (if (<= D 1.72e-22)
         (/ (/ (* D (* M (* 0.25 (* D (* h M))))) d) d)
         (if (<= D 6.2e+36) (/ t_1 (/ w c0)) t_0))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	double t_1 = (c0 * d) / ((D * D) / (d / (w * h)));
	double tmp;
	if (D <= 5.25e-275) {
		tmp = t_0;
	} else if (D <= 1.65e-241) {
		tmp = c0 * (t_1 / w);
	} else if (D <= 1.72e-22) {
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	} else if (D <= 6.2e+36) {
		tmp = t_1 / (w / c0);
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = ((h * ((m * (d * m)) * (d * 0.25d0))) / d_1) / d_1
    t_1 = (c0 * d_1) / ((d * d) / (d_1 / (w * h)))
    if (d <= 5.25d-275) then
        tmp = t_0
    else if (d <= 1.65d-241) then
        tmp = c0 * (t_1 / w)
    else if (d <= 1.72d-22) then
        tmp = ((d * (m * (0.25d0 * (d * (h * m))))) / d_1) / d_1
    else if (d <= 6.2d+36) then
        tmp = t_1 / (w / c0)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	double t_1 = (c0 * d) / ((D * D) / (d / (w * h)));
	double tmp;
	if (D <= 5.25e-275) {
		tmp = t_0;
	} else if (D <= 1.65e-241) {
		tmp = c0 * (t_1 / w);
	} else if (D <= 1.72e-22) {
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	} else if (D <= 6.2e+36) {
		tmp = t_1 / (w / c0);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d
	t_1 = (c0 * d) / ((D * D) / (d / (w * h)))
	tmp = 0
	if D <= 5.25e-275:
		tmp = t_0
	elif D <= 1.65e-241:
		tmp = c0 * (t_1 / w)
	elif D <= 1.72e-22:
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d
	elif D <= 6.2e+36:
		tmp = t_1 / (w / c0)
	else:
		tmp = t_0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(Float64(h * Float64(Float64(M * Float64(D * M)) * Float64(D * 0.25))) / d) / d)
	t_1 = Float64(Float64(c0 * d) / Float64(Float64(D * D) / Float64(d / Float64(w * h))))
	tmp = 0.0
	if (D <= 5.25e-275)
		tmp = t_0;
	elseif (D <= 1.65e-241)
		tmp = Float64(c0 * Float64(t_1 / w));
	elseif (D <= 1.72e-22)
		tmp = Float64(Float64(Float64(D * Float64(M * Float64(0.25 * Float64(D * Float64(h * M))))) / d) / d);
	elseif (D <= 6.2e+36)
		tmp = Float64(t_1 / Float64(w / c0));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	t_1 = (c0 * d) / ((D * D) / (d / (w * h)));
	tmp = 0.0;
	if (D <= 5.25e-275)
		tmp = t_0;
	elseif (D <= 1.65e-241)
		tmp = c0 * (t_1 / w);
	elseif (D <= 1.72e-22)
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	elseif (D <= 6.2e+36)
		tmp = t_1 / (w / c0);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(N[(h * N[(N[(M * N[(D * M), $MachinePrecision]), $MachinePrecision] * N[(D * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[(N[(c0 * d), $MachinePrecision] / N[(N[(D * D), $MachinePrecision] / N[(d / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[D, 5.25e-275], t$95$0, If[LessEqual[D, 1.65e-241], N[(c0 * N[(t$95$1 / w), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 1.72e-22], N[(N[(N[(D * N[(M * N[(0.25 * N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[D, 6.2e+36], N[(t$95$1 / N[(w / c0), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\
t_1 := \frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}\\
\mathbf{if}\;D \leq 5.25 \cdot 10^{-275}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;D \leq 1.65 \cdot 10^{-241}:\\
\;\;\;\;c0 \cdot \frac{t\_1}{w}\\

\mathbf{elif}\;D \leq 1.72 \cdot 10^{-22}:\\
\;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\

\mathbf{elif}\;D \leq 6.2 \cdot 10^{+36}:\\
\;\;\;\;\frac{t\_1}{\frac{w}{c0}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if D < 5.24999999999999985e-275 or 6.1999999999999999e36 < D

    1. Initial program 20.9%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified19.5%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified12.7%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr33.7%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6448.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified48.8%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(\left(D \cdot \left(M \cdot M\right)\right) \cdot h\right)\right), d\right), d\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(M \cdot M\right)\right)\right) \cdot h\right), d\right), d\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(M \cdot M\right)\right)\right), h\right), d\right), d\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(D \cdot \left(M \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot M\right) \cdot M\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(D \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      11. *-lowering-*.f6451.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, D\right)\right), h\right), d\right), d\right) \]
    14. Applied egg-rr51.5%

      \[\leadsto \frac{\frac{\color{blue}{\left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(0.25 \cdot D\right)\right) \cdot h}}{d}}{d} \]

    if 5.24999999999999985e-275 < D < 1.6499999999999999e-241

    1. Initial program 37.5%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified38.0%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \color{blue}{\left(\frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0}{{D}^{2}} \cdot \color{blue}{\frac{{d}^{2}}{h \cdot w}}\right)\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0 \cdot \frac{{d}^{2}}{h \cdot w}}{\color{blue}{{D}^{2}}}\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{\frac{c0 \cdot {d}^{2}}{h \cdot w}}{{\color{blue}{D}}^{2}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h \cdot w}\right), \color{blue}{\left({D}^{2}\right)}\right)\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot {d}^{2}}{h}}{w}\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h}\right), w\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot {d}^{2}\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left(D \cdot \color{blue}{D}\right)\right)\right)\right) \]
      12. *-lowering-*.f6462.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Simplified62.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \color{blue}{\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{D \cdot D}}\right) \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      3. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\right)}\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{\color{blue}{D \cdot D}}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}\right), \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot w}\right), \left(D \cdot D\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(w \cdot h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      15. *-lowering-*.f6462.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    9. Applied egg-rr62.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}}{D \cdot D}\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{D \cdot D} \cdot \color{blue}{\frac{d}{w \cdot h}}\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{c0 \cdot d}{D \cdot D}\right), \color{blue}{\left(\frac{d}{w \cdot h}\right)}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot d\right), \left(D \cdot D\right)\right), \left(\frac{\color{blue}{d}}{w \cdot h}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \left(D \cdot D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(w \cdot h\right)}\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \left(h \cdot \color{blue}{w}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6475.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, \color{blue}{w}\right)\right)\right)\right)\right) \]
    11. Applied egg-rr75.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)}\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)\right) \cdot \color{blue}{\frac{c0}{2 \cdot w}} \]
      2. frac-timesN/A

        \[\leadsto \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}\right) \cdot \frac{c0}{2 \cdot w} \]
      3. associate-*r*N/A

        \[\leadsto \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}\right) \cdot \frac{c0}{2 \cdot w} \]
      4. *-commutativeN/A

        \[\leadsto \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}\right) \cdot \frac{c0}{2 \cdot w} \]
      5. associate-/l*N/A

        \[\leadsto \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)} \cdot \frac{\color{blue}{c0}}{2 \cdot w} \]
      6. clear-numN/A

        \[\leadsto \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)} \cdot \frac{1}{\color{blue}{\frac{2 \cdot w}{c0}}} \]
      7. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)} \cdot \frac{1}{2 \cdot \color{blue}{\frac{w}{c0}}} \]
      8. div-invN/A

        \[\leadsto \frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{\color{blue}{2 \cdot \frac{w}{c0}}} \]
      9. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{2}}{\color{blue}{\frac{w}{c0}}} \]
      10. associate-/r/N/A

        \[\leadsto \frac{\frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{2}}{w} \cdot \color{blue}{c0} \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{2}}{w}\right), \color{blue}{c0}\right) \]
    13. Applied egg-rr75.3%

      \[\leadsto \color{blue}{\frac{\frac{d \cdot c0}{\frac{D \cdot D}{\frac{d}{h \cdot w}}}}{w} \cdot c0} \]

    if 1.6499999999999999e-241 < D < 1.72000000000000001e-22

    1. Initial program 19.3%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified19.2%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified22.3%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr50.3%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6456.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified56.4%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot D\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right) \cdot D\right), d\right), d\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot D\right), d\right), d\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right) \cdot D\right), d\right), d\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right) \cdot D\right), d\right), d\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right) \cdot D\right), d\right), d\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right), D\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right), D\right), d\right), d\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right) \cdot M\right), D\right), d\right), d\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      13. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(M \cdot h\right)\right)\right)\right), D\right), d\right), d\right) \]
      16. *-lowering-*.f6462.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right)\right)\right), D\right), d\right), d\right) \]
    14. Applied egg-rr62.0%

      \[\leadsto \frac{\frac{\color{blue}{\left(M \cdot \left(0.25 \cdot \left(D \cdot \left(M \cdot h\right)\right)\right)\right) \cdot D}}{d}}{d} \]

    if 1.72000000000000001e-22 < D < 6.1999999999999999e36

    1. Initial program 24.1%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified24.2%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \color{blue}{\left(\frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0}{{D}^{2}} \cdot \color{blue}{\frac{{d}^{2}}{h \cdot w}}\right)\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0 \cdot \frac{{d}^{2}}{h \cdot w}}{\color{blue}{{D}^{2}}}\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{\frac{c0 \cdot {d}^{2}}{h \cdot w}}{{\color{blue}{D}}^{2}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h \cdot w}\right), \color{blue}{\left({D}^{2}\right)}\right)\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot {d}^{2}}{h}}{w}\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h}\right), w\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot {d}^{2}\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left(D \cdot \color{blue}{D}\right)\right)\right)\right) \]
      12. *-lowering-*.f6425.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Simplified25.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \color{blue}{\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{D \cdot D}}\right) \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      3. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\right)}\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{\color{blue}{D \cdot D}}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}\right), \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot w}\right), \left(D \cdot D\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(w \cdot h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      15. *-lowering-*.f6425.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    9. Applied egg-rr25.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}}{D \cdot D}\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{D \cdot D} \cdot \color{blue}{\frac{d}{w \cdot h}}\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{c0 \cdot d}{D \cdot D}\right), \color{blue}{\left(\frac{d}{w \cdot h}\right)}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot d\right), \left(D \cdot D\right)\right), \left(\frac{\color{blue}{d}}{w \cdot h}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \left(D \cdot D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(w \cdot h\right)}\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \left(h \cdot \color{blue}{w}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6462.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, \color{blue}{w}\right)\right)\right)\right)\right) \]
    11. Applied egg-rr62.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)}\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)\right) \cdot \color{blue}{\frac{c0}{2 \cdot w}} \]
      2. associate-*l*N/A

        \[\leadsto 2 \cdot \color{blue}{\left(\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right) \cdot \frac{c0}{2 \cdot w}\right)} \]
      3. clear-numN/A

        \[\leadsto 2 \cdot \left(\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right) \cdot \frac{1}{\color{blue}{\frac{2 \cdot w}{c0}}}\right) \]
      4. associate-*r/N/A

        \[\leadsto 2 \cdot \left(\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right) \cdot \frac{1}{2 \cdot \color{blue}{\frac{w}{c0}}}\right) \]
      5. div-invN/A

        \[\leadsto 2 \cdot \frac{\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}}{\color{blue}{2 \cdot \frac{w}{c0}}} \]
      6. associate-/l*N/A

        \[\leadsto \frac{2 \cdot \left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)}{\color{blue}{2 \cdot \frac{w}{c0}}} \]
      7. times-fracN/A

        \[\leadsto \frac{2}{2} \cdot \color{blue}{\frac{\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}}{\frac{w}{c0}}} \]
      8. metadata-evalN/A

        \[\leadsto 1 \cdot \frac{\color{blue}{\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}}}{\frac{w}{c0}} \]
      9. *-lft-identityN/A

        \[\leadsto \frac{\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}}{\color{blue}{\frac{w}{c0}}} \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right), \color{blue}{\left(\frac{w}{c0}\right)}\right) \]
    13. Applied egg-rr62.8%

      \[\leadsto \color{blue}{\frac{\frac{d \cdot c0}{\frac{D \cdot D}{\frac{d}{h \cdot w}}}}{\frac{w}{c0}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification56.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 5.25 \cdot 10^{-275}:\\ \;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{elif}\;D \leq 1.65 \cdot 10^{-241}:\\ \;\;\;\;c0 \cdot \frac{\frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}}{w}\\ \mathbf{elif}\;D \leq 1.72 \cdot 10^{-22}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\ \mathbf{elif}\;D \leq 6.2 \cdot 10^{+36}:\\ \;\;\;\;\frac{\frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}}{\frac{w}{c0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 47.9% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := c0 \cdot \frac{\frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}}{w}\\ t_1 := \frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{if}\;D \leq 1.35 \cdot 10^{-274}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;D \leq 1.75 \cdot 10^{-241}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;D \leq 8.2 \cdot 10^{-23}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\ \mathbf{elif}\;D \leq 6.2 \cdot 10^{+96}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* c0 (/ (/ (* c0 d) (/ (* D D) (/ d (* w h)))) w)))
        (t_1 (/ (/ (* h (* (* M (* D M)) (* D 0.25))) d) d)))
   (if (<= D 1.35e-274)
     t_1
     (if (<= D 1.75e-241)
       t_0
       (if (<= D 8.2e-23)
         (/ (/ (* D (* M (* 0.25 (* D (* h M))))) d) d)
         (if (<= D 6.2e+96) t_0 t_1))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = c0 * (((c0 * d) / ((D * D) / (d / (w * h)))) / w);
	double t_1 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	double tmp;
	if (D <= 1.35e-274) {
		tmp = t_1;
	} else if (D <= 1.75e-241) {
		tmp = t_0;
	} else if (D <= 8.2e-23) {
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	} else if (D <= 6.2e+96) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = c0 * (((c0 * d_1) / ((d * d) / (d_1 / (w * h)))) / w)
    t_1 = ((h * ((m * (d * m)) * (d * 0.25d0))) / d_1) / d_1
    if (d <= 1.35d-274) then
        tmp = t_1
    else if (d <= 1.75d-241) then
        tmp = t_0
    else if (d <= 8.2d-23) then
        tmp = ((d * (m * (0.25d0 * (d * (h * m))))) / d_1) / d_1
    else if (d <= 6.2d+96) then
        tmp = t_0
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = c0 * (((c0 * d) / ((D * D) / (d / (w * h)))) / w);
	double t_1 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	double tmp;
	if (D <= 1.35e-274) {
		tmp = t_1;
	} else if (D <= 1.75e-241) {
		tmp = t_0;
	} else if (D <= 8.2e-23) {
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	} else if (D <= 6.2e+96) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = c0 * (((c0 * d) / ((D * D) / (d / (w * h)))) / w)
	t_1 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d
	tmp = 0
	if D <= 1.35e-274:
		tmp = t_1
	elif D <= 1.75e-241:
		tmp = t_0
	elif D <= 8.2e-23:
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d
	elif D <= 6.2e+96:
		tmp = t_0
	else:
		tmp = t_1
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(c0 * Float64(Float64(Float64(c0 * d) / Float64(Float64(D * D) / Float64(d / Float64(w * h)))) / w))
	t_1 = Float64(Float64(Float64(h * Float64(Float64(M * Float64(D * M)) * Float64(D * 0.25))) / d) / d)
	tmp = 0.0
	if (D <= 1.35e-274)
		tmp = t_1;
	elseif (D <= 1.75e-241)
		tmp = t_0;
	elseif (D <= 8.2e-23)
		tmp = Float64(Float64(Float64(D * Float64(M * Float64(0.25 * Float64(D * Float64(h * M))))) / d) / d);
	elseif (D <= 6.2e+96)
		tmp = t_0;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = c0 * (((c0 * d) / ((D * D) / (d / (w * h)))) / w);
	t_1 = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	tmp = 0.0;
	if (D <= 1.35e-274)
		tmp = t_1;
	elseif (D <= 1.75e-241)
		tmp = t_0;
	elseif (D <= 8.2e-23)
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	elseif (D <= 6.2e+96)
		tmp = t_0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(c0 * N[(N[(N[(c0 * d), $MachinePrecision] / N[(N[(D * D), $MachinePrecision] / N[(d / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(h * N[(N[(M * N[(D * M), $MachinePrecision]), $MachinePrecision] * N[(D * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]}, If[LessEqual[D, 1.35e-274], t$95$1, If[LessEqual[D, 1.75e-241], t$95$0, If[LessEqual[D, 8.2e-23], N[(N[(N[(D * N[(M * N[(0.25 * N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[D, 6.2e+96], t$95$0, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := c0 \cdot \frac{\frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}}{w}\\
t_1 := \frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\
\mathbf{if}\;D \leq 1.35 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;D \leq 1.75 \cdot 10^{-241}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;D \leq 8.2 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\

\mathbf{elif}\;D \leq 6.2 \cdot 10^{+96}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if D < 1.35e-274 or 6.1999999999999996e96 < D

    1. Initial program 20.6%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified19.2%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified13.4%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr33.4%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6449.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified49.2%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(\left(D \cdot \left(M \cdot M\right)\right) \cdot h\right)\right), d\right), d\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(M \cdot M\right)\right)\right) \cdot h\right), d\right), d\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(M \cdot M\right)\right)\right), h\right), d\right), d\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(D \cdot \left(M \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot M\right) \cdot M\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(D \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      11. *-lowering-*.f6452.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, D\right)\right), h\right), d\right), d\right) \]
    14. Applied egg-rr52.1%

      \[\leadsto \frac{\frac{\color{blue}{\left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(0.25 \cdot D\right)\right) \cdot h}}{d}}{d} \]

    if 1.35e-274 < D < 1.7499999999999999e-241 or 8.20000000000000059e-23 < D < 6.1999999999999996e96

    1. Initial program 27.2%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified27.3%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \color{blue}{\left(\frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0}{{D}^{2}} \cdot \color{blue}{\frac{{d}^{2}}{h \cdot w}}\right)\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0 \cdot \frac{{d}^{2}}{h \cdot w}}{\color{blue}{{D}^{2}}}\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{\frac{c0 \cdot {d}^{2}}{h \cdot w}}{{\color{blue}{D}}^{2}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h \cdot w}\right), \color{blue}{\left({D}^{2}\right)}\right)\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot {d}^{2}}{h}}{w}\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h}\right), w\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot {d}^{2}\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left(D \cdot \color{blue}{D}\right)\right)\right)\right) \]
      12. *-lowering-*.f6436.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Simplified36.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \color{blue}{\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{D \cdot D}}\right) \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      3. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\right)}\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{\color{blue}{D \cdot D}}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}\right), \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot w}\right), \left(D \cdot D\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(w \cdot h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      15. *-lowering-*.f6436.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    9. Applied egg-rr36.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}}{D \cdot D}\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{D \cdot D} \cdot \color{blue}{\frac{d}{w \cdot h}}\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{c0 \cdot d}{D \cdot D}\right), \color{blue}{\left(\frac{d}{w \cdot h}\right)}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot d\right), \left(D \cdot D\right)\right), \left(\frac{\color{blue}{d}}{w \cdot h}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \left(D \cdot D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(w \cdot h\right)}\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \left(h \cdot \color{blue}{w}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6465.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, \color{blue}{w}\right)\right)\right)\right)\right) \]
    11. Applied egg-rr65.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)}\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(2 \cdot \left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)\right) \cdot \color{blue}{\frac{c0}{2 \cdot w}} \]
      2. frac-timesN/A

        \[\leadsto \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}\right) \cdot \frac{c0}{2 \cdot w} \]
      3. associate-*r*N/A

        \[\leadsto \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}\right) \cdot \frac{c0}{2 \cdot w} \]
      4. *-commutativeN/A

        \[\leadsto \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}\right) \cdot \frac{c0}{2 \cdot w} \]
      5. associate-/l*N/A

        \[\leadsto \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)} \cdot \frac{\color{blue}{c0}}{2 \cdot w} \]
      6. clear-numN/A

        \[\leadsto \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)} \cdot \frac{1}{\color{blue}{\frac{2 \cdot w}{c0}}} \]
      7. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)} \cdot \frac{1}{2 \cdot \color{blue}{\frac{w}{c0}}} \]
      8. div-invN/A

        \[\leadsto \frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{\color{blue}{2 \cdot \frac{w}{c0}}} \]
      9. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{2}}{\color{blue}{\frac{w}{c0}}} \]
      10. associate-/r/N/A

        \[\leadsto \frac{\frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{2}}{w} \cdot \color{blue}{c0} \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(h \cdot w\right) \cdot \left(D \cdot D\right)}}{2}}{w}\right), \color{blue}{c0}\right) \]
    13. Applied egg-rr63.3%

      \[\leadsto \color{blue}{\frac{\frac{d \cdot c0}{\frac{D \cdot D}{\frac{d}{h \cdot w}}}}{w} \cdot c0} \]

    if 1.7499999999999999e-241 < D < 8.20000000000000059e-23

    1. Initial program 19.3%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified19.2%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified22.3%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr50.3%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6456.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified56.4%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot D\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right) \cdot D\right), d\right), d\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot D\right), d\right), d\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right) \cdot D\right), d\right), d\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right) \cdot D\right), d\right), d\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right) \cdot D\right), d\right), d\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right), D\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right), D\right), d\right), d\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right) \cdot M\right), D\right), d\right), d\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      13. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(M \cdot h\right)\right)\right)\right), D\right), d\right), d\right) \]
      16. *-lowering-*.f6462.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right)\right)\right), D\right), d\right), d\right) \]
    14. Applied egg-rr62.0%

      \[\leadsto \frac{\frac{\color{blue}{\left(M \cdot \left(0.25 \cdot \left(D \cdot \left(M \cdot h\right)\right)\right)\right) \cdot D}}{d}}{d} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 1.35 \cdot 10^{-274}:\\ \;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{elif}\;D \leq 1.75 \cdot 10^{-241}:\\ \;\;\;\;c0 \cdot \frac{\frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}}{w}\\ \mathbf{elif}\;D \leq 8.2 \cdot 10^{-23}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\ \mathbf{elif}\;D \leq 6.2 \cdot 10^{+96}:\\ \;\;\;\;c0 \cdot \frac{\frac{c0 \cdot d}{\frac{D \cdot D}{\frac{d}{w \cdot h}}}}{w}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 48.3% accurate, 4.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := D \cdot \left(h \cdot M\right)\\ \mathbf{if}\;M \leq 3.5 \cdot 10^{-166}:\\ \;\;\;\;\frac{\frac{t\_0 \cdot \left(D \cdot \left(M \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{elif}\;M \leq 6.4 \cdot 10^{+61}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{\frac{d}{h}}{\frac{D}{c0 \cdot d}}}{w \cdot D}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot t\_0\right)\right)}{d}}{d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* D (* h M))))
   (if (<= M 3.5e-166)
     (/ (/ (* t_0 (* D (* M 0.25))) d) d)
     (if (<= M 6.4e+61)
       (* (/ c0 (* 2.0 w)) (* 2.0 (/ (/ (/ d h) (/ D (* c0 d))) (* w D))))
       (/ (/ (* D (* M (* 0.25 t_0))) d) d)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = D * (h * M);
	double tmp;
	if (M <= 3.5e-166) {
		tmp = ((t_0 * (D * (M * 0.25))) / d) / d;
	} else if (M <= 6.4e+61) {
		tmp = (c0 / (2.0 * w)) * (2.0 * (((d / h) / (D / (c0 * d))) / (w * D)));
	} else {
		tmp = ((D * (M * (0.25 * t_0))) / d) / d;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = d * (h * m)
    if (m <= 3.5d-166) then
        tmp = ((t_0 * (d * (m * 0.25d0))) / d_1) / d_1
    else if (m <= 6.4d+61) then
        tmp = (c0 / (2.0d0 * w)) * (2.0d0 * (((d_1 / h) / (d / (c0 * d_1))) / (w * d)))
    else
        tmp = ((d * (m * (0.25d0 * t_0))) / d_1) / d_1
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = D * (h * M);
	double tmp;
	if (M <= 3.5e-166) {
		tmp = ((t_0 * (D * (M * 0.25))) / d) / d;
	} else if (M <= 6.4e+61) {
		tmp = (c0 / (2.0 * w)) * (2.0 * (((d / h) / (D / (c0 * d))) / (w * D)));
	} else {
		tmp = ((D * (M * (0.25 * t_0))) / d) / d;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = D * (h * M)
	tmp = 0
	if M <= 3.5e-166:
		tmp = ((t_0 * (D * (M * 0.25))) / d) / d
	elif M <= 6.4e+61:
		tmp = (c0 / (2.0 * w)) * (2.0 * (((d / h) / (D / (c0 * d))) / (w * D)))
	else:
		tmp = ((D * (M * (0.25 * t_0))) / d) / d
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(D * Float64(h * M))
	tmp = 0.0
	if (M <= 3.5e-166)
		tmp = Float64(Float64(Float64(t_0 * Float64(D * Float64(M * 0.25))) / d) / d);
	elseif (M <= 6.4e+61)
		tmp = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(2.0 * Float64(Float64(Float64(d / h) / Float64(D / Float64(c0 * d))) / Float64(w * D))));
	else
		tmp = Float64(Float64(Float64(D * Float64(M * Float64(0.25 * t_0))) / d) / d);
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = D * (h * M);
	tmp = 0.0;
	if (M <= 3.5e-166)
		tmp = ((t_0 * (D * (M * 0.25))) / d) / d;
	elseif (M <= 6.4e+61)
		tmp = (c0 / (2.0 * w)) * (2.0 * (((d / h) / (D / (c0 * d))) / (w * D)));
	else
		tmp = ((D * (M * (0.25 * t_0))) / d) / d;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M, 3.5e-166], N[(N[(N[(t$95$0 * N[(D * N[(M * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[M, 6.4e+61], N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(N[(d / h), $MachinePrecision] / N[(D / N[(c0 * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(D * N[(M * N[(0.25 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := D \cdot \left(h \cdot M\right)\\
\mathbf{if}\;M \leq 3.5 \cdot 10^{-166}:\\
\;\;\;\;\frac{\frac{t\_0 \cdot \left(D \cdot \left(M \cdot 0.25\right)\right)}{d}}{d}\\

\mathbf{elif}\;M \leq 6.4 \cdot 10^{+61}:\\
\;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{\frac{d}{h}}{\frac{D}{c0 \cdot d}}}{w \cdot D}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot t\_0\right)\right)}{d}}{d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if M < 3.4999999999999999e-166

    1. Initial program 23.0%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified21.6%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified17.8%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr39.5%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6451.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified51.9%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot D\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right) \cdot D\right), d\right), d\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot D\right), d\right), d\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right) \cdot D\right), d\right), d\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right) \cdot D\right), d\right), d\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right) \cdot D\right), d\right), d\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot \left(M \cdot \frac{1}{4}\right)\right) \cdot D\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot h\right) \cdot M\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot \left(h \cdot M\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot M\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(M \cdot h\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \left(D \cdot \left(M \cdot \frac{1}{4}\right)\right)\right), d\right), d\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \mathsf{*.f64}\left(D, \left(M \cdot \frac{1}{4}\right)\right)\right), d\right), d\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \mathsf{*.f64}\left(D, \left(\frac{1}{4} \cdot M\right)\right)\right), d\right), d\right) \]
      17. *-lowering-*.f6452.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, M\right)\right)\right), d\right), d\right) \]
    14. Applied egg-rr52.0%

      \[\leadsto \frac{\frac{\color{blue}{\left(D \cdot \left(M \cdot h\right)\right) \cdot \left(D \cdot \left(0.25 \cdot M\right)\right)}}{d}}{d} \]

    if 3.4999999999999999e-166 < M < 6.3999999999999997e61

    1. Initial program 32.3%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified30.3%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \color{blue}{\left(\frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0}{{D}^{2}} \cdot \color{blue}{\frac{{d}^{2}}{h \cdot w}}\right)\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0 \cdot \frac{{d}^{2}}{h \cdot w}}{\color{blue}{{D}^{2}}}\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{\frac{c0 \cdot {d}^{2}}{h \cdot w}}{{\color{blue}{D}}^{2}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h \cdot w}\right), \color{blue}{\left({D}^{2}\right)}\right)\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot {d}^{2}}{h}}{w}\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h}\right), w\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot {d}^{2}\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left(D \cdot \color{blue}{D}\right)\right)\right)\right) \]
      12. *-lowering-*.f6430.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Simplified30.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \color{blue}{\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{D \cdot D}}\right) \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      3. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\right)}\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{\color{blue}{D \cdot D}}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}\right), \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot w}\right), \left(D \cdot D\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(w \cdot h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      15. *-lowering-*.f6430.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    9. Applied egg-rr30.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}}{D \cdot D}\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{D \cdot D} \cdot \color{blue}{\frac{d}{w \cdot h}}\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{c0 \cdot d}{D \cdot D}\right), \color{blue}{\left(\frac{d}{w \cdot h}\right)}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot d\right), \left(D \cdot D\right)\right), \left(\frac{\color{blue}{d}}{w \cdot h}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \left(D \cdot D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(w \cdot h\right)}\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \left(h \cdot \color{blue}{w}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6439.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, \color{blue}{w}\right)\right)\right)\right)\right) \]
    11. Applied egg-rr39.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)}\right) \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{d}{h \cdot w} \cdot \color{blue}{\frac{c0 \cdot d}{D \cdot D}}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{d}{h}}{w} \cdot \frac{\color{blue}{c0 \cdot d}}{D \cdot D}\right)\right)\right) \]
      3. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{d}{h}}{w} \cdot \frac{\frac{c0 \cdot d}{D}}{\color{blue}{D}}\right)\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{d}{h} \cdot \frac{c0 \cdot d}{D}}{\color{blue}{w \cdot D}}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{d}{h} \cdot \frac{c0 \cdot d}{D}\right), \color{blue}{\left(w \cdot D\right)}\right)\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{d}{h} \cdot \frac{1}{\frac{D}{c0 \cdot d}}\right), \left(w \cdot D\right)\right)\right)\right) \]
      7. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{\frac{d}{h}}{\frac{D}{c0 \cdot d}}\right), \left(\color{blue}{w} \cdot D\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{d}{h}\right), \left(\frac{D}{c0 \cdot d}\right)\right), \left(\color{blue}{w} \cdot D\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, h\right), \left(\frac{D}{c0 \cdot d}\right)\right), \left(w \cdot D\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(D, \left(c0 \cdot d\right)\right)\right), \left(w \cdot D\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(D, \left(d \cdot c0\right)\right)\right), \left(w \cdot D\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(D, \mathsf{*.f64}\left(d, c0\right)\right)\right), \left(w \cdot D\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(D, \mathsf{*.f64}\left(d, c0\right)\right)\right), \left(D \cdot \color{blue}{w}\right)\right)\right)\right) \]
      14. *-lowering-*.f6450.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, h\right), \mathsf{/.f64}\left(D, \mathsf{*.f64}\left(d, c0\right)\right)\right), \mathsf{*.f64}\left(D, \color{blue}{w}\right)\right)\right)\right) \]
    13. Applied egg-rr50.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{\frac{\frac{d}{h}}{\frac{D}{d \cdot c0}}}{D \cdot w}}\right) \]

    if 6.3999999999999997e61 < M

    1. Initial program 5.8%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified7.8%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified12.0%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr37.9%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6452.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified52.2%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot D\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right) \cdot D\right), d\right), d\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot D\right), d\right), d\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right) \cdot D\right), d\right), d\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right) \cdot D\right), d\right), d\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right) \cdot D\right), d\right), d\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right), D\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right), D\right), d\right), d\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right) \cdot M\right), D\right), d\right), d\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      13. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(M \cdot h\right)\right)\right)\right), D\right), d\right), d\right) \]
      16. *-lowering-*.f6459.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right)\right)\right), D\right), d\right), d\right) \]
    14. Applied egg-rr59.2%

      \[\leadsto \frac{\frac{\color{blue}{\left(M \cdot \left(0.25 \cdot \left(D \cdot \left(M \cdot h\right)\right)\right)\right) \cdot D}}{d}}{d} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 3.5 \cdot 10^{-166}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot M\right)\right) \cdot \left(D \cdot \left(M \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{elif}\;M \leq 6.4 \cdot 10^{+61}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{\frac{d}{h}}{\frac{D}{c0 \cdot d}}}{w \cdot D}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 48.8% accurate, 4.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := D \cdot \left(h \cdot M\right)\\ \mathbf{if}\;M \leq 3.6 \cdot 10^{-166}:\\ \;\;\;\;\frac{\frac{t\_0 \cdot \left(D \cdot \left(M \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{elif}\;M \leq 0.00094:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{d}{\frac{D}{c0}}}{\frac{D}{\frac{d}{w \cdot h}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot t\_0\right)\right)}{d}}{d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* D (* h M))))
   (if (<= M 3.6e-166)
     (/ (/ (* t_0 (* D (* M 0.25))) d) d)
     (if (<= M 0.00094)
       (* (/ c0 (* 2.0 w)) (* 2.0 (/ (/ d (/ D c0)) (/ D (/ d (* w h))))))
       (/ (/ (* D (* M (* 0.25 t_0))) d) d)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = D * (h * M);
	double tmp;
	if (M <= 3.6e-166) {
		tmp = ((t_0 * (D * (M * 0.25))) / d) / d;
	} else if (M <= 0.00094) {
		tmp = (c0 / (2.0 * w)) * (2.0 * ((d / (D / c0)) / (D / (d / (w * h)))));
	} else {
		tmp = ((D * (M * (0.25 * t_0))) / d) / d;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = d * (h * m)
    if (m <= 3.6d-166) then
        tmp = ((t_0 * (d * (m * 0.25d0))) / d_1) / d_1
    else if (m <= 0.00094d0) then
        tmp = (c0 / (2.0d0 * w)) * (2.0d0 * ((d_1 / (d / c0)) / (d / (d_1 / (w * h)))))
    else
        tmp = ((d * (m * (0.25d0 * t_0))) / d_1) / d_1
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = D * (h * M);
	double tmp;
	if (M <= 3.6e-166) {
		tmp = ((t_0 * (D * (M * 0.25))) / d) / d;
	} else if (M <= 0.00094) {
		tmp = (c0 / (2.0 * w)) * (2.0 * ((d / (D / c0)) / (D / (d / (w * h)))));
	} else {
		tmp = ((D * (M * (0.25 * t_0))) / d) / d;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = D * (h * M)
	tmp = 0
	if M <= 3.6e-166:
		tmp = ((t_0 * (D * (M * 0.25))) / d) / d
	elif M <= 0.00094:
		tmp = (c0 / (2.0 * w)) * (2.0 * ((d / (D / c0)) / (D / (d / (w * h)))))
	else:
		tmp = ((D * (M * (0.25 * t_0))) / d) / d
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(D * Float64(h * M))
	tmp = 0.0
	if (M <= 3.6e-166)
		tmp = Float64(Float64(Float64(t_0 * Float64(D * Float64(M * 0.25))) / d) / d);
	elseif (M <= 0.00094)
		tmp = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(2.0 * Float64(Float64(d / Float64(D / c0)) / Float64(D / Float64(d / Float64(w * h))))));
	else
		tmp = Float64(Float64(Float64(D * Float64(M * Float64(0.25 * t_0))) / d) / d);
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = D * (h * M);
	tmp = 0.0;
	if (M <= 3.6e-166)
		tmp = ((t_0 * (D * (M * 0.25))) / d) / d;
	elseif (M <= 0.00094)
		tmp = (c0 / (2.0 * w)) * (2.0 * ((d / (D / c0)) / (D / (d / (w * h)))));
	else
		tmp = ((D * (M * (0.25 * t_0))) / d) / d;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M, 3.6e-166], N[(N[(N[(t$95$0 * N[(D * N[(M * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[M, 0.00094], N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(d / N[(D / c0), $MachinePrecision]), $MachinePrecision] / N[(D / N[(d / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(D * N[(M * N[(0.25 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := D \cdot \left(h \cdot M\right)\\
\mathbf{if}\;M \leq 3.6 \cdot 10^{-166}:\\
\;\;\;\;\frac{\frac{t\_0 \cdot \left(D \cdot \left(M \cdot 0.25\right)\right)}{d}}{d}\\

\mathbf{elif}\;M \leq 0.00094:\\
\;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{d}{\frac{D}{c0}}}{\frac{D}{\frac{d}{w \cdot h}}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot t\_0\right)\right)}{d}}{d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if M < 3.6000000000000001e-166

    1. Initial program 23.0%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified21.6%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified17.8%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr39.5%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6451.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified51.9%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot D\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right) \cdot D\right), d\right), d\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot D\right), d\right), d\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right) \cdot D\right), d\right), d\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right) \cdot D\right), d\right), d\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right) \cdot D\right), d\right), d\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot \left(M \cdot \frac{1}{4}\right)\right) \cdot D\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot h\right) \cdot M\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot \left(h \cdot M\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot M\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(M \cdot h\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \left(D \cdot \left(M \cdot \frac{1}{4}\right)\right)\right), d\right), d\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \mathsf{*.f64}\left(D, \left(M \cdot \frac{1}{4}\right)\right)\right), d\right), d\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \mathsf{*.f64}\left(D, \left(\frac{1}{4} \cdot M\right)\right)\right), d\right), d\right) \]
      17. *-lowering-*.f6452.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, M\right)\right)\right), d\right), d\right) \]
    14. Applied egg-rr52.0%

      \[\leadsto \frac{\frac{\color{blue}{\left(D \cdot \left(M \cdot h\right)\right) \cdot \left(D \cdot \left(0.25 \cdot M\right)\right)}}{d}}{d} \]

    if 3.6000000000000001e-166 < M < 9.39999999999999972e-4

    1. Initial program 32.1%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified29.6%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \color{blue}{\left(\frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0}{{D}^{2}} \cdot \color{blue}{\frac{{d}^{2}}{h \cdot w}}\right)\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{c0 \cdot \frac{{d}^{2}}{h \cdot w}}{\color{blue}{{D}^{2}}}\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \left(\frac{\frac{c0 \cdot {d}^{2}}{h \cdot w}}{{\color{blue}{D}}^{2}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h \cdot w}\right), \color{blue}{\left({D}^{2}\right)}\right)\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot {d}^{2}}{h}}{w}\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0 \cdot {d}^{2}}{h}\right), w\right), \left({\color{blue}{D}}^{2}\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot {d}^{2}\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left({D}^{2}\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \left(D \cdot \color{blue}{D}\right)\right)\right)\right) \]
      12. *-lowering-*.f6430.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), h\right), w\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Simplified30.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \color{blue}{\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{D \cdot D}}\right) \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      3. count-2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}\right)}\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{\color{blue}{w \cdot \left(D \cdot D\right)}}\right)\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}}{\color{blue}{D \cdot D}}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h}}{w}\right), \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot w}\right), \left(D \cdot D\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(\color{blue}{D} \cdot D\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(h \cdot w\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \left(w \cdot h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \left(D \cdot D\right)\right)\right)\right) \]
      15. *-lowering-*.f6430.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(w, h\right)\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    9. Applied egg-rr30.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot h}}{D \cdot D}\right)} \]
    10. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{D \cdot D} \cdot \color{blue}{\frac{d}{w \cdot h}}\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{c0 \cdot d}{D \cdot D}\right), \color{blue}{\left(\frac{d}{w \cdot h}\right)}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot d\right), \left(D \cdot D\right)\right), \left(\frac{\color{blue}{d}}{w \cdot h}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \left(D \cdot D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \left(\frac{d}{w \cdot h}\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(w \cdot h\right)}\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \left(h \cdot \color{blue}{w}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6435.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, \color{blue}{w}\right)\right)\right)\right)\right) \]
    11. Applied egg-rr35.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{d}{h \cdot w}\right)}\right) \]
    12. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{D \cdot D} \cdot \frac{1}{\color{blue}{\frac{h \cdot w}{d}}}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{D}}{D} \cdot \frac{\color{blue}{1}}{\frac{h \cdot w}{d}}\right)\right)\right) \]
      3. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{D} \cdot 1}{\color{blue}{D \cdot \frac{h \cdot w}{d}}}\right)\right)\right) \]
      4. *-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{D}}{\color{blue}{D} \cdot \frac{h \cdot w}{d}}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{D}\right), \color{blue}{\left(D \cdot \frac{h \cdot w}{d}\right)}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{d \cdot c0}{D}\right), \left(D \cdot \frac{h \cdot w}{d}\right)\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(d \cdot \frac{c0}{D}\right), \left(\color{blue}{D} \cdot \frac{h \cdot w}{d}\right)\right)\right)\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(d \cdot \frac{1}{\frac{D}{c0}}\right), \left(D \cdot \frac{h \cdot w}{d}\right)\right)\right)\right) \]
      9. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{d}{\frac{D}{c0}}\right), \left(\color{blue}{D} \cdot \frac{h \cdot w}{d}\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \left(\frac{D}{c0}\right)\right), \left(\color{blue}{D} \cdot \frac{h \cdot w}{d}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{/.f64}\left(D, c0\right)\right), \left(D \cdot \frac{h \cdot w}{d}\right)\right)\right)\right) \]
      12. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{/.f64}\left(D, c0\right)\right), \left(D \cdot \frac{1}{\color{blue}{\frac{d}{h \cdot w}}}\right)\right)\right)\right) \]
      13. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{/.f64}\left(D, c0\right)\right), \left(\frac{D}{\color{blue}{\frac{d}{h \cdot w}}}\right)\right)\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{/.f64}\left(D, c0\right)\right), \mathsf{/.f64}\left(D, \color{blue}{\left(\frac{d}{h \cdot w}\right)}\right)\right)\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{/.f64}\left(D, c0\right)\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, \color{blue}{\left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      16. *-lowering-*.f6448.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{/.f64}\left(D, c0\right)\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, \color{blue}{w}\right)\right)\right)\right)\right)\right) \]
    13. Applied egg-rr48.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{\frac{d}{\frac{D}{c0}}}{\frac{D}{\frac{d}{h \cdot w}}}}\right) \]

    if 9.39999999999999972e-4 < M

    1. Initial program 9.9%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified11.6%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified12.0%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr38.8%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6452.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified52.7%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot D\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right) \cdot D\right), d\right), d\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot D\right), d\right), d\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right) \cdot D\right), d\right), d\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right) \cdot D\right), d\right), d\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right) \cdot D\right), d\right), d\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right), D\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right), D\right), d\right), d\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right) \cdot M\right), D\right), d\right), d\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      13. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(M \cdot h\right)\right)\right)\right), D\right), d\right), d\right) \]
      16. *-lowering-*.f6458.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right)\right)\right), D\right), d\right), d\right) \]
    14. Applied egg-rr58.7%

      \[\leadsto \frac{\frac{\color{blue}{\left(M \cdot \left(0.25 \cdot \left(D \cdot \left(M \cdot h\right)\right)\right)\right) \cdot D}}{d}}{d} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 3.6 \cdot 10^{-166}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot M\right)\right) \cdot \left(D \cdot \left(M \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{elif}\;M \leq 0.00094:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\frac{d}{\frac{D}{c0}}}{\frac{D}{\frac{d}{w \cdot h}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 48.7% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{\left(D \cdot \left(h \cdot M\right)\right) \cdot \left(D \cdot \left(M \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{if}\;w \leq -2.2 \cdot 10^{+60}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;w \leq 1.85 \cdot 10^{-256}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{\frac{h \cdot \left(M \cdot M\right)}{d}}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (/ (* (* D (* h M)) (* D (* M 0.25))) d) d)))
   (if (<= w -2.2e+60)
     t_0
     (if (<= w 1.85e-256)
       (* 0.25 (* D (* D (/ (/ (* h (* M M)) d) d))))
       t_0))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (((D * (h * M)) * (D * (M * 0.25))) / d) / d;
	double tmp;
	if (w <= -2.2e+60) {
		tmp = t_0;
	} else if (w <= 1.85e-256) {
		tmp = 0.25 * (D * (D * (((h * (M * M)) / d) / d)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (((d * (h * m)) * (d * (m * 0.25d0))) / d_1) / d_1
    if (w <= (-2.2d+60)) then
        tmp = t_0
    else if (w <= 1.85d-256) then
        tmp = 0.25d0 * (d * (d * (((h * (m * m)) / d_1) / d_1)))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (((D * (h * M)) * (D * (M * 0.25))) / d) / d;
	double tmp;
	if (w <= -2.2e+60) {
		tmp = t_0;
	} else if (w <= 1.85e-256) {
		tmp = 0.25 * (D * (D * (((h * (M * M)) / d) / d)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (((D * (h * M)) * (D * (M * 0.25))) / d) / d
	tmp = 0
	if w <= -2.2e+60:
		tmp = t_0
	elif w <= 1.85e-256:
		tmp = 0.25 * (D * (D * (((h * (M * M)) / d) / d)))
	else:
		tmp = t_0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(Float64(Float64(D * Float64(h * M)) * Float64(D * Float64(M * 0.25))) / d) / d)
	tmp = 0.0
	if (w <= -2.2e+60)
		tmp = t_0;
	elseif (w <= 1.85e-256)
		tmp = Float64(0.25 * Float64(D * Float64(D * Float64(Float64(Float64(h * Float64(M * M)) / d) / d))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (((D * (h * M)) * (D * (M * 0.25))) / d) / d;
	tmp = 0.0;
	if (w <= -2.2e+60)
		tmp = t_0;
	elseif (w <= 1.85e-256)
		tmp = 0.25 * (D * (D * (((h * (M * M)) / d) / d)));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(N[(N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision] * N[(D * N[(M * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]}, If[LessEqual[w, -2.2e+60], t$95$0, If[LessEqual[w, 1.85e-256], N[(0.25 * N[(D * N[(D * N[(N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\frac{\left(D \cdot \left(h \cdot M\right)\right) \cdot \left(D \cdot \left(M \cdot 0.25\right)\right)}{d}}{d}\\
\mathbf{if}\;w \leq -2.2 \cdot 10^{+60}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;w \leq 1.85 \cdot 10^{-256}:\\
\;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{\frac{h \cdot \left(M \cdot M\right)}{d}}{d}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if w < -2.19999999999999996e60 or 1.85000000000000014e-256 < w

    1. Initial program 20.9%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified20.0%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified17.4%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr32.0%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6443.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified43.7%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot D\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right) \cdot D\right), d\right), d\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot D\right), d\right), d\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right) \cdot D\right), d\right), d\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right) \cdot D\right), d\right), d\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right) \cdot D\right), d\right), d\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot \left(M \cdot \frac{1}{4}\right)\right) \cdot D\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot h\right) \cdot M\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot \left(h \cdot M\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot M\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(M \cdot h\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \left(\left(M \cdot \frac{1}{4}\right) \cdot D\right)\right), d\right), d\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \left(D \cdot \left(M \cdot \frac{1}{4}\right)\right)\right), d\right), d\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \mathsf{*.f64}\left(D, \left(M \cdot \frac{1}{4}\right)\right)\right), d\right), d\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \mathsf{*.f64}\left(D, \left(\frac{1}{4} \cdot M\right)\right)\right), d\right), d\right) \]
      17. *-lowering-*.f6449.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right), \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, M\right)\right)\right), d\right), d\right) \]
    14. Applied egg-rr49.6%

      \[\leadsto \frac{\frac{\color{blue}{\left(D \cdot \left(M \cdot h\right)\right) \cdot \left(D \cdot \left(0.25 \cdot M\right)\right)}}{d}}{d} \]

    if -2.19999999999999996e60 < w < 1.85000000000000014e-256

    1. Initial program 21.6%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified21.0%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified10.4%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      11. *-lowering-*.f6438.6%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    10. Simplified38.6%

      \[\leadsto \color{blue}{0.25 \cdot \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \color{blue}{\frac{h \cdot \left(M \cdot M\right)}{d \cdot d}}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \color{blue}{\left(D \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right) \cdot \color{blue}{D}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right), \color{blue}{D}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(\frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)\right), D\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(\frac{\frac{h \cdot \left(M \cdot M\right)}{d}}{d}\right)\right), D\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\left(\frac{h \cdot \left(M \cdot M\right)}{d}\right), d\right)\right), D\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), d\right), d\right)\right), D\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(M \cdot M\right) \cdot h\right), d\right), d\right)\right), D\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot M\right), h\right), d\right), d\right)\right), D\right)\right) \]
      11. *-lowering-*.f6456.8%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), d\right), d\right)\right), D\right)\right) \]
    12. Applied egg-rr56.8%

      \[\leadsto 0.25 \cdot \color{blue}{\left(\left(D \cdot \frac{\frac{\left(M \cdot M\right) \cdot h}{d}}{d}\right) \cdot D\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -2.2 \cdot 10^{+60}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot M\right)\right) \cdot \left(D \cdot \left(M \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{elif}\;w \leq 1.85 \cdot 10^{-256}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{\frac{h \cdot \left(M \cdot M\right)}{d}}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot M\right)\right) \cdot \left(D \cdot \left(M \cdot 0.25\right)\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 48.5% accurate, 7.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 1.15 \cdot 10^{-223}:\\ \;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= D 1.15e-223)
   (/ (/ (* h (* (* M (* D M)) (* D 0.25))) d) d)
   (/ (/ (* D (* M (* 0.25 (* D (* h M))))) d) d)))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 1.15e-223) {
		tmp = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	} else {
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if (d <= 1.15d-223) then
        tmp = ((h * ((m * (d * m)) * (d * 0.25d0))) / d_1) / d_1
    else
        tmp = ((d * (m * (0.25d0 * (d * (h * m))))) / d_1) / d_1
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 1.15e-223) {
		tmp = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	} else {
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if D <= 1.15e-223:
		tmp = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d
	else:
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (D <= 1.15e-223)
		tmp = Float64(Float64(Float64(h * Float64(Float64(M * Float64(D * M)) * Float64(D * 0.25))) / d) / d);
	else
		tmp = Float64(Float64(Float64(D * Float64(M * Float64(0.25 * Float64(D * Float64(h * M))))) / d) / d);
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if (D <= 1.15e-223)
		tmp = ((h * ((M * (D * M)) * (D * 0.25))) / d) / d;
	else
		tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 1.15e-223], N[(N[(N[(h * N[(N[(M * N[(D * M), $MachinePrecision]), $MachinePrecision] * N[(D * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision], N[(N[(N[(D * N[(M * N[(0.25 * N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \leq 1.15 \cdot 10^{-223}:\\
\;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if D < 1.15e-223

    1. Initial program 20.0%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified17.8%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified13.8%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr33.9%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6449.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified49.5%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(\left(D \cdot \left(M \cdot M\right)\right) \cdot h\right)\right), d\right), d\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(M \cdot M\right)\right)\right) \cdot h\right), d\right), d\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(M \cdot M\right)\right)\right), h\right), d\right), d\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(D \cdot \left(M \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(D \cdot M\right) \cdot M\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(D \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(\frac{1}{4} \cdot D\right)\right), h\right), d\right), d\right) \]
      11. *-lowering-*.f6449.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(\frac{1}{4}, D\right)\right), h\right), d\right), d\right) \]
    14. Applied egg-rr49.7%

      \[\leadsto \frac{\frac{\color{blue}{\left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(0.25 \cdot D\right)\right) \cdot h}}{d}}{d} \]

    if 1.15e-223 < D

    1. Initial program 22.9%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified23.8%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
    7. Simplified15.0%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
    8. Step-by-step derivation
      1. div0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
      2. +-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
      3. unswap-sqrN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
    9. Applied egg-rr40.7%

      \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
      13. *-lowering-*.f6446.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. Simplified46.8%

      \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
    13. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot D\right)\right), d\right), d\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right) \cdot D\right), d\right), d\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot D\right), d\right), d\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right) \cdot D\right), d\right), d\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right) \cdot D\right), d\right), d\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right) \cdot D\right), d\right), d\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right), D\right), d\right), d\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right), D\right), d\right), d\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right) \cdot M\right), D\right), d\right), d\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
      13. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(M \cdot h\right)\right)\right)\right), D\right), d\right), d\right) \]
      16. *-lowering-*.f6451.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right)\right)\right), D\right), d\right), d\right) \]
    14. Applied egg-rr51.2%

      \[\leadsto \frac{\frac{\color{blue}{\left(M \cdot \left(0.25 \cdot \left(D \cdot \left(M \cdot h\right)\right)\right)\right) \cdot D}}{d}}{d} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification50.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 1.15 \cdot 10^{-223}:\\ \;\;\;\;\frac{\frac{h \cdot \left(\left(M \cdot \left(D \cdot M\right)\right) \cdot \left(D \cdot 0.25\right)\right)}{d}}{d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 48.8% accurate, 10.1× speedup?

\[\begin{array}{l} \\ \frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (/ (/ (* D (* M (* 0.25 (* D (* h M))))) d) d))
double code(double c0, double w, double h, double D, double d, double M) {
	return ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = ((d * (m * (0.25d0 * (d * (h * m))))) / d_1) / d_1
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
}
def code(c0, w, h, D, d, M):
	return ((D * (M * (0.25 * (D * (h * M))))) / d) / d
function code(c0, w, h, D, d, M)
	return Float64(Float64(Float64(D * Float64(M * Float64(0.25 * Float64(D * Float64(h * M))))) / d) / d)
end
function tmp = code(c0, w, h, D, d, M)
	tmp = ((D * (M * (0.25 * (D * (h * M))))) / d) / d;
end
code[c0_, w_, h_, D_, d_, M_] := N[(N[(N[(D * N[(M * N[(0.25 * N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d}
\end{array}
Derivation
  1. Initial program 21.2%

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
  2. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
  3. Simplified20.4%

    \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in c0 around -inf

    \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
  6. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
  7. Simplified14.3%

    \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
  8. Step-by-step derivation
    1. div0N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
    2. +-lft-identityN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
    3. unswap-sqrN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
    4. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
  9. Applied egg-rr36.9%

    \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
  10. Taylor expanded in c0 around 0

    \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
  11. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
    2. unpow2N/A

      \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
    3. associate-/r*N/A

      \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
    8. associate-*l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
    13. *-lowering-*.f6448.3%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
  12. Simplified48.3%

    \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
  13. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot D\right)\right), d\right), d\right) \]
    2. associate-*r*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right) \cdot D\right), d\right), d\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot D\right), d\right), d\right) \]
    4. associate-*r*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right) \cdot D\right), d\right), d\right) \]
    5. associate-*l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right) \cdot D\right), d\right), d\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right) \cdot D\right), d\right), d\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right) \cdot \frac{1}{4}\right), D\right), d\right), d\right) \]
    8. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot \left(\left(\left(D \cdot h\right) \cdot M\right) \cdot M\right)\right), D\right), d\right), d\right) \]
    9. associate-*r*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right) \cdot M\right), D\right), d\right), d\right) \]
    10. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(\frac{1}{4} \cdot \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot h\right) \cdot M\right)\right)\right), D\right), d\right), d\right) \]
    13. associate-*l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(h \cdot M\right)\right)\right)\right), D\right), d\right), d\right) \]
    15. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(M \cdot h\right)\right)\right)\right), D\right), d\right), d\right) \]
    16. *-lowering-*.f6450.4%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, h\right)\right)\right)\right), D\right), d\right), d\right) \]
  14. Applied egg-rr50.4%

    \[\leadsto \frac{\frac{\color{blue}{\left(M \cdot \left(0.25 \cdot \left(D \cdot \left(M \cdot h\right)\right)\right)\right) \cdot D}}{d}}{d} \]
  15. Final simplification50.4%

    \[\leadsto \frac{\frac{D \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)\right)}{d}}{d} \]
  16. Add Preprocessing

Alternative 10: 47.1% accurate, 10.1× speedup?

\[\begin{array}{l} \\ \frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d}}{d} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (/ (/ (* 0.25 (* D (* D (* h (* M M))))) d) d))
double code(double c0, double w, double h, double D, double d, double M) {
	return ((0.25 * (D * (D * (h * (M * M))))) / d) / d;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = ((0.25d0 * (d * (d * (h * (m * m))))) / d_1) / d_1
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return ((0.25 * (D * (D * (h * (M * M))))) / d) / d;
}
def code(c0, w, h, D, d, M):
	return ((0.25 * (D * (D * (h * (M * M))))) / d) / d
function code(c0, w, h, D, d, M)
	return Float64(Float64(Float64(0.25 * Float64(D * Float64(D * Float64(h * Float64(M * M))))) / d) / d)
end
function tmp = code(c0, w, h, D, d, M)
	tmp = ((0.25 * (D * (D * (h * (M * M))))) / d) / d;
end
code[c0_, w_, h_, D_, d_, M_] := N[(N[(N[(0.25 * N[(D * N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d}}{d}
\end{array}
Derivation
  1. Initial program 21.2%

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
  2. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
  3. Simplified20.4%

    \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in c0 around -inf

    \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
  6. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
  7. Simplified14.3%

    \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
  8. Step-by-step derivation
    1. div0N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
    2. +-lft-identityN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
    3. unswap-sqrN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
    4. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
  9. Applied egg-rr36.9%

    \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
  10. Taylor expanded in c0 around 0

    \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
  11. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
    2. unpow2N/A

      \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
    3. associate-/r*N/A

      \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
    8. associate-*l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
    13. *-lowering-*.f6448.3%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
  12. Simplified48.3%

    \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
  13. Final simplification48.3%

    \[\leadsto \frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d}}{d} \]
  14. Add Preprocessing

Alternative 11: 47.8% accurate, 10.1× speedup?

\[\begin{array}{l} \\ \frac{D \cdot \left(D \cdot \frac{h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)}{d}\right)}{d} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (/ (* D (* D (/ (* h (* (* M M) 0.25)) d))) d))
double code(double c0, double w, double h, double D, double d, double M) {
	return (D * (D * ((h * ((M * M) * 0.25)) / d))) / d;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = (d * (d * ((h * ((m * m) * 0.25d0)) / d_1))) / d_1
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return (D * (D * ((h * ((M * M) * 0.25)) / d))) / d;
}
def code(c0, w, h, D, d, M):
	return (D * (D * ((h * ((M * M) * 0.25)) / d))) / d
function code(c0, w, h, D, d, M)
	return Float64(Float64(D * Float64(D * Float64(Float64(h * Float64(Float64(M * M) * 0.25)) / d))) / d)
end
function tmp = code(c0, w, h, D, d, M)
	tmp = (D * (D * ((h * ((M * M) * 0.25)) / d))) / d;
end
code[c0_, w_, h_, D_, d_, M_] := N[(N[(D * N[(D * N[(N[(h * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]
\begin{array}{l}

\\
\frac{D \cdot \left(D \cdot \frac{h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)}{d}\right)}{d}
\end{array}
Derivation
  1. Initial program 21.2%

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
  2. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
  3. Simplified20.4%

    \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in c0 around -inf

    \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
  6. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
  7. Simplified14.3%

    \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
  8. Step-by-step derivation
    1. div0N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(0 + \frac{\color{blue}{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)\right) \]
    2. +-lft-identityN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}}\right)\right) \]
    3. unswap-sqrN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot c0\right) \cdot \color{blue}{\left(d \cdot c0\right)}}\right)\right) \]
    4. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}}{\color{blue}{d \cdot c0}}\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot c0}\right), \color{blue}{\left(d \cdot c0\right)}\right)\right) \]
  9. Applied egg-rr36.9%

    \[\leadsto \left(c0 \cdot c0\right) \cdot \color{blue}{\frac{\frac{D \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot 0.25\right)}{c0 \cdot d}}{c0 \cdot d}} \]
  10. Taylor expanded in c0 around 0

    \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
  11. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
    2. unpow2N/A

      \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d \cdot \color{blue}{d}} \]
    3. associate-/r*N/A

      \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}}{\color{blue}{d}} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{d}\right), \color{blue}{d}\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), d\right), d\right) \]
    8. associate-*l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), d\right), d\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), d\right), d\right) \]
    12. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), d\right), d\right) \]
    13. *-lowering-*.f6448.3%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), d\right), d\right) \]
  12. Simplified48.3%

    \[\leadsto \color{blue}{\frac{\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d}}{d}} \]
  13. Taylor expanded in D around 0

    \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
  14. Step-by-step derivation
    1. unpow2N/A

      \[\leadsto \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d \cdot \color{blue}{d}} \]
    2. associate-/r*N/A

      \[\leadsto \frac{1}{4} \cdot \frac{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}}{\color{blue}{d}} \]
    3. associate-*r/N/A

      \[\leadsto \frac{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}}{\color{blue}{d}} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{d}\right), \color{blue}{d}\right) \]
  15. Simplified47.9%

    \[\leadsto \color{blue}{\frac{\left(\frac{\left(0.25 \cdot \left(M \cdot M\right)\right) \cdot h}{d} \cdot D\right) \cdot D}{d}} \]
  16. Final simplification47.9%

    \[\leadsto \frac{D \cdot \left(D \cdot \frac{h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)}{d}\right)}{d} \]
  17. Add Preprocessing

Alternative 12: 47.2% accurate, 10.1× speedup?

\[\begin{array}{l} \\ 0.25 \cdot \left(D \cdot \left(D \cdot \frac{\frac{h \cdot \left(M \cdot M\right)}{d}}{d}\right)\right) \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (* 0.25 (* D (* D (/ (/ (* h (* M M)) d) d)))))
double code(double c0, double w, double h, double D, double d, double M) {
	return 0.25 * (D * (D * (((h * (M * M)) / d) / d)));
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = 0.25d0 * (d * (d * (((h * (m * m)) / d_1) / d_1)))
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return 0.25 * (D * (D * (((h * (M * M)) / d) / d)));
}
def code(c0, w, h, D, d, M):
	return 0.25 * (D * (D * (((h * (M * M)) / d) / d)))
function code(c0, w, h, D, d, M)
	return Float64(0.25 * Float64(D * Float64(D * Float64(Float64(Float64(h * Float64(M * M)) / d) / d))))
end
function tmp = code(c0, w, h, D, d, M)
	tmp = 0.25 * (D * (D * (((h * (M * M)) / d) / d)));
end
code[c0_, w_, h_, D_, d_, M_] := N[(0.25 * N[(D * N[(D * N[(N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.25 \cdot \left(D \cdot \left(D \cdot \frac{\frac{h \cdot \left(M \cdot M\right)}{d}}{d}\right)\right)
\end{array}
Derivation
  1. Initial program 21.2%

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
  2. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
  3. Simplified20.4%

    \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in c0 around -inf

    \[\leadsto \color{blue}{{c0}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)} \]
  6. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left({c0}^{2}\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\color{blue}{\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}} + \frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}{w}\right), \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}}\right)}\right)\right) \]
  7. Simplified14.3%

    \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0}{w} + \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)}\right)} \]
  8. Taylor expanded in c0 around 0

    \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
  9. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
    4. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right), \left({d}^{2}\right)\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
    8. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
    10. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
    11. *-lowering-*.f6433.1%

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
  10. Simplified33.1%

    \[\leadsto \color{blue}{0.25 \cdot \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot d}} \]
  11. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot D\right) \cdot \color{blue}{\frac{h \cdot \left(M \cdot M\right)}{d \cdot d}}\right)\right) \]
    2. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot \color{blue}{\left(D \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)}\right)\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right) \cdot \color{blue}{D}\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right), \color{blue}{D}\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(\frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)\right), D\right)\right) \]
    6. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(\frac{\frac{h \cdot \left(M \cdot M\right)}{d}}{d}\right)\right), D\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\left(\frac{h \cdot \left(M \cdot M\right)}{d}\right), d\right)\right), D\right)\right) \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), d\right), d\right)\right), D\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(M \cdot M\right) \cdot h\right), d\right), d\right)\right), D\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot M\right), h\right), d\right), d\right)\right), D\right)\right) \]
    11. *-lowering-*.f6447.9%

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), d\right), d\right)\right), D\right)\right) \]
  12. Applied egg-rr47.9%

    \[\leadsto 0.25 \cdot \color{blue}{\left(\left(D \cdot \frac{\frac{\left(M \cdot M\right) \cdot h}{d}}{d}\right) \cdot D\right)} \]
  13. Final simplification47.9%

    \[\leadsto 0.25 \cdot \left(D \cdot \left(D \cdot \frac{\frac{h \cdot \left(M \cdot M\right)}{d}}{d}\right)\right) \]
  14. Add Preprocessing

Alternative 13: 33.8% accurate, 151.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (c0 w h D d M) :precision binary64 0.0)
double code(double c0, double w, double h, double D, double d, double M) {
	return 0.0;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = 0.0d0
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return 0.0;
}
def code(c0, w, h, D, d, M):
	return 0.0
function code(c0, w, h, D, d, M)
	return 0.0
end
function tmp = code(c0, w, h, D, d, M)
	tmp = 0.0;
end
code[c0_, w_, h_, D_, d_, M_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 21.2%

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
  2. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
  3. Simplified20.4%

    \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in c0 around -inf

    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)}\right) \]
  6. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot c0\right) \cdot \color{blue}{\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    2. mul-1-negN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\color{blue}{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
    3. distribute-lft1-inN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\left(-1 + 1\right) \cdot \color{blue}{\frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}\right)\right)\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(0 \cdot \frac{\color{blue}{{d}^{2}}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
    5. mul0-lftN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right) \]
    6. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
    7. distribute-lft-neg-inN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 + 1\right)\right)\right)\right) \]
    8. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \color{blue}{\left(\mathsf{neg}\left(\left(-1 + 1\right)\right)\right)}\right)\right) \]
    9. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right) \]
    10. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot 0\right)\right) \]
    11. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, \color{blue}{\left(-1 + 1\right)}\right)\right) \]
    13. metadata-eval27.8%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, 0\right)\right) \]
  7. Simplified27.8%

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
  8. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(\frac{c0}{2 \cdot w} \cdot c0\right) \cdot \color{blue}{0} \]
    2. mul0-rgt32.0%

      \[\leadsto 0 \]
  9. Applied egg-rr32.0%

    \[\leadsto \color{blue}{0} \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2024145 
(FPCore (c0 w h D d M)
  :name "Henrywood and Agarwal, Equation (13)"
  :precision binary64
  (* (/ c0 (* 2.0 w)) (+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))))