Henrywood and Agarwal, Equation (13)

Percentage Accurate: 25.6% → 66.1%
Time: 26.1s
Alternatives: 11
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 11 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: 25.6% 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: 66.1% accurate, 0.9× 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)}\\ \mathbf{if}\;\frac{c0}{2 \cdot w} \cdot \left(t\_0 + \sqrt{t\_0 \cdot t\_0 - M \cdot M}\right) \leq \infty:\\ \;\;\;\;\frac{\frac{c0}{2}}{\frac{\frac{w}{\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)}}}{2 \cdot d}}\\ \mathbf{else}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (* c0 (* d d)) (* (* w h) (* D D)))))
   (if (<=
        (* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))
        INFINITY)
     (/ (/ c0 2.0) (/ (/ w (/ (* c0 d) (* D (* w (* h D))))) (* 2.0 d)))
     (* (/ D d) (/ (* D (* h (* (* M M) 0.25))) d)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	double tmp;
	if (((c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))))) <= ((double) INFINITY)) {
		tmp = (c0 / 2.0) / ((w / ((c0 * d) / (D * (w * (h * D))))) / (2.0 * d));
	} else {
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
	}
	return tmp;
}
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));
	double tmp;
	if (((c0 / (2.0 * w)) * (t_0 + Math.sqrt(((t_0 * t_0) - (M * M))))) <= Double.POSITIVE_INFINITY) {
		tmp = (c0 / 2.0) / ((w / ((c0 * d) / (D * (w * (h * D))))) / (2.0 * d));
	} else {
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (c0 * (d * d)) / ((w * h) * (D * D))
	tmp = 0
	if ((c0 / (2.0 * w)) * (t_0 + math.sqrt(((t_0 * t_0) - (M * M))))) <= math.inf:
		tmp = (c0 / 2.0) / ((w / ((c0 * d) / (D * (w * (h * D))))) / (2.0 * d))
	else:
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d)
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))
	tmp = 0.0
	if (Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M))))) <= Inf)
		tmp = Float64(Float64(c0 / 2.0) / Float64(Float64(w / Float64(Float64(c0 * d) / Float64(D * Float64(w * Float64(h * D))))) / Float64(2.0 * d)));
	else
		tmp = Float64(Float64(D / d) * Float64(Float64(D * Float64(h * Float64(Float64(M * M) * 0.25))) / d));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	tmp = 0.0;
	if (((c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))))) <= Inf)
		tmp = (c0 / 2.0) / ((w / ((c0 * d) / (D * (w * (h * D))))) / (2.0 * d));
	else
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
	end
	tmp_2 = tmp;
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]}, If[LessEqual[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], Infinity], N[(N[(c0 / 2.0), $MachinePrecision] / N[(N[(w / N[(N[(c0 * d), $MachinePrecision] / N[(D * N[(w * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(D / d), $MachinePrecision] * N[(N[(D * N[(h * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $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)}\\
\mathbf{if}\;\frac{c0}{2 \cdot w} \cdot \left(t\_0 + \sqrt{t\_0 \cdot t\_0 - M \cdot M}\right) \leq \infty:\\
\;\;\;\;\frac{\frac{c0}{2}}{\frac{\frac{w}{\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)}}}{2 \cdot d}}\\

\mathbf{else}:\\
\;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{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 71.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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. Simplified61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr0.7%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

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

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified44.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\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}}{\frac{\frac{w}{\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)}}}{2 \cdot d}}\\ \mathbf{else}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 48.2% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{c0}{2}}{w}\\ \mathbf{if}\;d \leq 2.5 \cdot 10^{-254}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \mathbf{elif}\;d \leq 4.2 \cdot 10^{-60}:\\ \;\;\;\;t\_0 \cdot \left(2 \cdot \frac{\frac{d}{\frac{D}{\frac{d}{w \cdot h}}}}{\frac{D}{c0}}\right)\\ \mathbf{elif}\;d \leq 6.5 \cdot 10^{+51}:\\ \;\;\;\;\frac{h \cdot \left(0.25 \cdot \left(M \cdot \left(D \cdot \left(D \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 1.13 \cdot 10^{+225}:\\ \;\;\;\;\left(2 \cdot d\right) \cdot \left(\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)} \cdot t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{c0}{2}}{\frac{0.5 \cdot \left(D \cdot \left(D \cdot \frac{\frac{h \cdot \left(w \cdot w\right)}{d}}{d}\right)\right)}{c0}}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (/ c0 2.0) w)))
   (if (<= d 2.5e-254)
     (* (/ D d) (/ (* D (* h (* (* M M) 0.25))) d))
     (if (<= d 4.2e-60)
       (* t_0 (* 2.0 (/ (/ d (/ D (/ d (* w h)))) (/ D c0))))
       (if (<= d 6.5e+51)
         (/ (* h (* 0.25 (* M (* D (* D M))))) (* d d))
         (if (<= d 1.13e+225)
           (* (* 2.0 d) (* (/ (* c0 d) (* D (* w (* h D)))) t_0))
           (/
            (/ c0 2.0)
            (/ (* 0.5 (* D (* D (/ (/ (* h (* w w)) d) d)))) c0))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 / 2.0) / w;
	double tmp;
	if (d <= 2.5e-254) {
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
	} else if (d <= 4.2e-60) {
		tmp = t_0 * (2.0 * ((d / (D / (d / (w * h)))) / (D / c0)));
	} else if (d <= 6.5e+51) {
		tmp = (h * (0.25 * (M * (D * (D * M))))) / (d * d);
	} else if (d <= 1.13e+225) {
		tmp = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * t_0);
	} else {
		tmp = (c0 / 2.0) / ((0.5 * (D * (D * (((h * (w * w)) / d) / d)))) / c0);
	}
	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 = (c0 / 2.0d0) / w
    if (d_1 <= 2.5d-254) then
        tmp = (d / d_1) * ((d * (h * ((m * m) * 0.25d0))) / d_1)
    else if (d_1 <= 4.2d-60) then
        tmp = t_0 * (2.0d0 * ((d_1 / (d / (d_1 / (w * h)))) / (d / c0)))
    else if (d_1 <= 6.5d+51) then
        tmp = (h * (0.25d0 * (m * (d * (d * m))))) / (d_1 * d_1)
    else if (d_1 <= 1.13d+225) then
        tmp = (2.0d0 * d_1) * (((c0 * d_1) / (d * (w * (h * d)))) * t_0)
    else
        tmp = (c0 / 2.0d0) / ((0.5d0 * (d * (d * (((h * (w * w)) / d_1) / d_1)))) / c0)
    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 / 2.0) / w;
	double tmp;
	if (d <= 2.5e-254) {
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
	} else if (d <= 4.2e-60) {
		tmp = t_0 * (2.0 * ((d / (D / (d / (w * h)))) / (D / c0)));
	} else if (d <= 6.5e+51) {
		tmp = (h * (0.25 * (M * (D * (D * M))))) / (d * d);
	} else if (d <= 1.13e+225) {
		tmp = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * t_0);
	} else {
		tmp = (c0 / 2.0) / ((0.5 * (D * (D * (((h * (w * w)) / d) / d)))) / c0);
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (c0 / 2.0) / w
	tmp = 0
	if d <= 2.5e-254:
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d)
	elif d <= 4.2e-60:
		tmp = t_0 * (2.0 * ((d / (D / (d / (w * h)))) / (D / c0)))
	elif d <= 6.5e+51:
		tmp = (h * (0.25 * (M * (D * (D * M))))) / (d * d)
	elif d <= 1.13e+225:
		tmp = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * t_0)
	else:
		tmp = (c0 / 2.0) / ((0.5 * (D * (D * (((h * (w * w)) / d) / d)))) / c0)
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 / 2.0) / w)
	tmp = 0.0
	if (d <= 2.5e-254)
		tmp = Float64(Float64(D / d) * Float64(Float64(D * Float64(h * Float64(Float64(M * M) * 0.25))) / d));
	elseif (d <= 4.2e-60)
		tmp = Float64(t_0 * Float64(2.0 * Float64(Float64(d / Float64(D / Float64(d / Float64(w * h)))) / Float64(D / c0))));
	elseif (d <= 6.5e+51)
		tmp = Float64(Float64(h * Float64(0.25 * Float64(M * Float64(D * Float64(D * M))))) / Float64(d * d));
	elseif (d <= 1.13e+225)
		tmp = Float64(Float64(2.0 * d) * Float64(Float64(Float64(c0 * d) / Float64(D * Float64(w * Float64(h * D)))) * t_0));
	else
		tmp = Float64(Float64(c0 / 2.0) / Float64(Float64(0.5 * Float64(D * Float64(D * Float64(Float64(Float64(h * Float64(w * w)) / d) / d)))) / c0));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (c0 / 2.0) / w;
	tmp = 0.0;
	if (d <= 2.5e-254)
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
	elseif (d <= 4.2e-60)
		tmp = t_0 * (2.0 * ((d / (D / (d / (w * h)))) / (D / c0)));
	elseif (d <= 6.5e+51)
		tmp = (h * (0.25 * (M * (D * (D * M))))) / (d * d);
	elseif (d <= 1.13e+225)
		tmp = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * t_0);
	else
		tmp = (c0 / 2.0) / ((0.5 * (D * (D * (((h * (w * w)) / d) / d)))) / c0);
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 / 2.0), $MachinePrecision] / w), $MachinePrecision]}, If[LessEqual[d, 2.5e-254], N[(N[(D / d), $MachinePrecision] * N[(N[(D * N[(h * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.2e-60], N[(t$95$0 * N[(2.0 * N[(N[(d / N[(D / N[(d / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(D / c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 6.5e+51], N[(N[(h * N[(0.25 * N[(M * N[(D * N[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.13e+225], N[(N[(2.0 * d), $MachinePrecision] * N[(N[(N[(c0 * d), $MachinePrecision] / N[(D * N[(w * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(c0 / 2.0), $MachinePrecision] / N[(N[(0.5 * N[(D * N[(D * N[(N[(N[(h * N[(w * w), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\frac{c0}{2}}{w}\\
\mathbf{if}\;d \leq 2.5 \cdot 10^{-254}:\\
\;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\

\mathbf{elif}\;d \leq 4.2 \cdot 10^{-60}:\\
\;\;\;\;t\_0 \cdot \left(2 \cdot \frac{\frac{d}{\frac{D}{\frac{d}{w \cdot h}}}}{\frac{D}{c0}}\right)\\

\mathbf{elif}\;d \leq 6.5 \cdot 10^{+51}:\\
\;\;\;\;\frac{h \cdot \left(0.25 \cdot \left(M \cdot \left(D \cdot \left(D \cdot M\right)\right)\right)\right)}{d \cdot d}\\

\mathbf{elif}\;d \leq 1.13 \cdot 10^{+225}:\\
\;\;\;\;\left(2 \cdot d\right) \cdot \left(\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)} \cdot t\_0\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{c0}{2}}{\frac{0.5 \cdot \left(D \cdot \left(D \cdot \frac{\frac{h \cdot \left(w \cdot w\right)}{d}}{d}\right)\right)}{c0}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < 2.5000000000000002e-254

    1. Initial program 26.7%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr25.7%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

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

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5000000000000002e-254 < d < 4.19999999999999982e-60

    1. Initial program 41.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.19999999999999982e-60 < d < 6.5e51

    1. Initial program 27.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr27.4%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

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

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified57.6%

      \[\leadsto \color{blue}{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(0.25 \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. 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}}} \]
    12. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, M\right)\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    13. Simplified72.6%

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

    if 6.5e51 < d < 1.13e225

    1. Initial program 28.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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. Simplified25.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, w\right)\right)\right), D\right), D\right)\right)\right) \]
    12. Simplified47.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.13e225 < d

    1. Initial program 18.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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. Simplified18.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), \mathsf{/.f64}\left(\left(\frac{\frac{1}{2} \cdot \left({D}^{2} \cdot \left(h \cdot {w}^{2}\right)\right)}{{d}^{2}}\right), \color{blue}{c0}\right)\right) \]
    14. Simplified63.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 2.5 \cdot 10^{-254}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \mathbf{elif}\;d \leq 4.2 \cdot 10^{-60}:\\ \;\;\;\;\frac{\frac{c0}{2}}{w} \cdot \left(2 \cdot \frac{\frac{d}{\frac{D}{\frac{d}{w \cdot h}}}}{\frac{D}{c0}}\right)\\ \mathbf{elif}\;d \leq 6.5 \cdot 10^{+51}:\\ \;\;\;\;\frac{h \cdot \left(0.25 \cdot \left(M \cdot \left(D \cdot \left(D \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 1.13 \cdot 10^{+225}:\\ \;\;\;\;\left(2 \cdot d\right) \cdot \left(\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)} \cdot \frac{\frac{c0}{2}}{w}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{c0}{2}}{\frac{0.5 \cdot \left(D \cdot \left(D \cdot \frac{\frac{h \cdot \left(w \cdot w\right)}{d}}{d}\right)\right)}{c0}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 48.2% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{c0}{2}}{w}\\ t_1 := h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\\ \mathbf{if}\;d \leq 8.2 \cdot 10^{-257}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot t\_1}{d}\\ \mathbf{elif}\;d \leq 2.2 \cdot 10^{-63}:\\ \;\;\;\;t\_0 \cdot \left(2 \cdot \frac{\frac{d}{\frac{D}{\frac{d}{w \cdot h}}}}{\frac{D}{c0}}\right)\\ \mathbf{elif}\;d \leq 5.2 \cdot 10^{+51}:\\ \;\;\;\;\frac{h \cdot \left(0.25 \cdot \left(M \cdot \left(D \cdot \left(D \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+279}:\\ \;\;\;\;\left(2 \cdot d\right) \cdot \left(\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)} \cdot t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{D \cdot D}{\frac{d}{t\_1}}}{d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (/ c0 2.0) w)) (t_1 (* h (* (* M M) 0.25))))
   (if (<= d 8.2e-257)
     (* (/ D d) (/ (* D t_1) d))
     (if (<= d 2.2e-63)
       (* t_0 (* 2.0 (/ (/ d (/ D (/ d (* w h)))) (/ D c0))))
       (if (<= d 5.2e+51)
         (/ (* h (* 0.25 (* M (* D (* D M))))) (* d d))
         (if (<= d 2.3e+279)
           (* (* 2.0 d) (* (/ (* c0 d) (* D (* w (* h D)))) t_0))
           (/ (/ (* D D) (/ d t_1)) 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 = h * ((M * M) * 0.25);
	double tmp;
	if (d <= 8.2e-257) {
		tmp = (D / d) * ((D * t_1) / d);
	} else if (d <= 2.2e-63) {
		tmp = t_0 * (2.0 * ((d / (D / (d / (w * h)))) / (D / c0)));
	} else if (d <= 5.2e+51) {
		tmp = (h * (0.25 * (M * (D * (D * M))))) / (d * d);
	} else if (d <= 2.3e+279) {
		tmp = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * t_0);
	} else {
		tmp = ((D * D) / (d / t_1)) / 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) :: t_1
    real(8) :: tmp
    t_0 = (c0 / 2.0d0) / w
    t_1 = h * ((m * m) * 0.25d0)
    if (d_1 <= 8.2d-257) then
        tmp = (d / d_1) * ((d * t_1) / d_1)
    else if (d_1 <= 2.2d-63) then
        tmp = t_0 * (2.0d0 * ((d_1 / (d / (d_1 / (w * h)))) / (d / c0)))
    else if (d_1 <= 5.2d+51) then
        tmp = (h * (0.25d0 * (m * (d * (d * m))))) / (d_1 * d_1)
    else if (d_1 <= 2.3d+279) then
        tmp = (2.0d0 * d_1) * (((c0 * d_1) / (d * (w * (h * d)))) * t_0)
    else
        tmp = ((d * d) / (d_1 / t_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 = (c0 / 2.0) / w;
	double t_1 = h * ((M * M) * 0.25);
	double tmp;
	if (d <= 8.2e-257) {
		tmp = (D / d) * ((D * t_1) / d);
	} else if (d <= 2.2e-63) {
		tmp = t_0 * (2.0 * ((d / (D / (d / (w * h)))) / (D / c0)));
	} else if (d <= 5.2e+51) {
		tmp = (h * (0.25 * (M * (D * (D * M))))) / (d * d);
	} else if (d <= 2.3e+279) {
		tmp = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * t_0);
	} else {
		tmp = ((D * D) / (d / t_1)) / d;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (c0 / 2.0) / w
	t_1 = h * ((M * M) * 0.25)
	tmp = 0
	if d <= 8.2e-257:
		tmp = (D / d) * ((D * t_1) / d)
	elif d <= 2.2e-63:
		tmp = t_0 * (2.0 * ((d / (D / (d / (w * h)))) / (D / c0)))
	elif d <= 5.2e+51:
		tmp = (h * (0.25 * (M * (D * (D * M))))) / (d * d)
	elif d <= 2.3e+279:
		tmp = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * t_0)
	else:
		tmp = ((D * D) / (d / t_1)) / d
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 / 2.0) / w)
	t_1 = Float64(h * Float64(Float64(M * M) * 0.25))
	tmp = 0.0
	if (d <= 8.2e-257)
		tmp = Float64(Float64(D / d) * Float64(Float64(D * t_1) / d));
	elseif (d <= 2.2e-63)
		tmp = Float64(t_0 * Float64(2.0 * Float64(Float64(d / Float64(D / Float64(d / Float64(w * h)))) / Float64(D / c0))));
	elseif (d <= 5.2e+51)
		tmp = Float64(Float64(h * Float64(0.25 * Float64(M * Float64(D * Float64(D * M))))) / Float64(d * d));
	elseif (d <= 2.3e+279)
		tmp = Float64(Float64(2.0 * d) * Float64(Float64(Float64(c0 * d) / Float64(D * Float64(w * Float64(h * D)))) * t_0));
	else
		tmp = Float64(Float64(Float64(D * D) / Float64(d / t_1)) / d);
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (c0 / 2.0) / w;
	t_1 = h * ((M * M) * 0.25);
	tmp = 0.0;
	if (d <= 8.2e-257)
		tmp = (D / d) * ((D * t_1) / d);
	elseif (d <= 2.2e-63)
		tmp = t_0 * (2.0 * ((d / (D / (d / (w * h)))) / (D / c0)));
	elseif (d <= 5.2e+51)
		tmp = (h * (0.25 * (M * (D * (D * M))))) / (d * d);
	elseif (d <= 2.3e+279)
		tmp = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * t_0);
	else
		tmp = ((D * D) / (d / t_1)) / d;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 / 2.0), $MachinePrecision] / w), $MachinePrecision]}, Block[{t$95$1 = N[(h * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, 8.2e-257], N[(N[(D / d), $MachinePrecision] * N[(N[(D * t$95$1), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.2e-63], N[(t$95$0 * N[(2.0 * N[(N[(d / N[(D / N[(d / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(D / c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 5.2e+51], N[(N[(h * N[(0.25 * N[(M * N[(D * N[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.3e+279], N[(N[(2.0 * d), $MachinePrecision] * N[(N[(N[(c0 * d), $MachinePrecision] / N[(D * N[(w * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(D * D), $MachinePrecision] / N[(d / t$95$1), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;d \leq 2.2 \cdot 10^{-63}:\\
\;\;\;\;t\_0 \cdot \left(2 \cdot \frac{\frac{d}{\frac{D}{\frac{d}{w \cdot h}}}}{\frac{D}{c0}}\right)\\

\mathbf{elif}\;d \leq 5.2 \cdot 10^{+51}:\\
\;\;\;\;\frac{h \cdot \left(0.25 \cdot \left(M \cdot \left(D \cdot \left(D \cdot M\right)\right)\right)\right)}{d \cdot d}\\

\mathbf{elif}\;d \leq 2.3 \cdot 10^{+279}:\\
\;\;\;\;\left(2 \cdot d\right) \cdot \left(\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)} \cdot t\_0\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{D \cdot D}{\frac{d}{t\_1}}}{d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < 8.1999999999999994e-257

    1. Initial program 26.7%

      \[\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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr25.7%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

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

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.1999999999999994e-257 < d < 2.2e-63

    1. Initial program 41.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2e-63 < d < 5.2000000000000002e51

    1. Initial program 27.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr27.4%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

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

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified57.6%

      \[\leadsto \color{blue}{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(0.25 \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. 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}}} \]
    12. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, M\right)\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    13. Simplified72.6%

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

    if 5.2000000000000002e51 < d < 2.3e279

    1. Initial program 27.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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. Simplified25.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.3e279 < d

    1. Initial program 9.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr9.1%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{\frac{-1}{2} \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)}{\color{blue}{w}}\right)\right) \]
    7. Simplified45.6%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 8.2 \cdot 10^{-257}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \mathbf{elif}\;d \leq 2.2 \cdot 10^{-63}:\\ \;\;\;\;\frac{\frac{c0}{2}}{w} \cdot \left(2 \cdot \frac{\frac{d}{\frac{D}{\frac{d}{w \cdot h}}}}{\frac{D}{c0}}\right)\\ \mathbf{elif}\;d \leq 5.2 \cdot 10^{+51}:\\ \;\;\;\;\frac{h \cdot \left(0.25 \cdot \left(M \cdot \left(D \cdot \left(D \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+279}:\\ \;\;\;\;\left(2 \cdot d\right) \cdot \left(\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)} \cdot \frac{\frac{c0}{2}}{w}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{D \cdot D}{\frac{d}{h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)}}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 45.7% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\\ t_1 := \frac{D}{d} \cdot \frac{D \cdot t\_0}{d}\\ t_2 := \left(2 \cdot d\right) \cdot \left(\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)} \cdot \frac{\frac{c0}{2}}{w}\right)\\ \mathbf{if}\;w \leq -1.6 \cdot 10^{-50}:\\ \;\;\;\;\frac{\frac{D \cdot D}{\frac{d}{t\_0}}}{d}\\ \mathbf{elif}\;w \leq -3.3 \cdot 10^{-288}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;w \leq 4.9 \cdot 10^{-244}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;w \leq 4.5 \cdot 10^{+65}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* h (* (* M M) 0.25)))
        (t_1 (* (/ D d) (/ (* D t_0) d)))
        (t_2
         (* (* 2.0 d) (* (/ (* c0 d) (* D (* w (* h D)))) (/ (/ c0 2.0) w)))))
   (if (<= w -1.6e-50)
     (/ (/ (* D D) (/ d t_0)) d)
     (if (<= w -3.3e-288)
       t_2
       (if (<= w 4.9e-244) t_1 (if (<= w 4.5e+65) t_2 t_1))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = h * ((M * M) * 0.25);
	double t_1 = (D / d) * ((D * t_0) / d);
	double t_2 = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * ((c0 / 2.0) / w));
	double tmp;
	if (w <= -1.6e-50) {
		tmp = ((D * D) / (d / t_0)) / d;
	} else if (w <= -3.3e-288) {
		tmp = t_2;
	} else if (w <= 4.9e-244) {
		tmp = t_1;
	} else if (w <= 4.5e+65) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_0 = h * ((m * m) * 0.25d0)
    t_1 = (d / d_1) * ((d * t_0) / d_1)
    t_2 = (2.0d0 * d_1) * (((c0 * d_1) / (d * (w * (h * d)))) * ((c0 / 2.0d0) / w))
    if (w <= (-1.6d-50)) then
        tmp = ((d * d) / (d_1 / t_0)) / d_1
    else if (w <= (-3.3d-288)) then
        tmp = t_2
    else if (w <= 4.9d-244) then
        tmp = t_1
    else if (w <= 4.5d+65) then
        tmp = t_2
    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 = h * ((M * M) * 0.25);
	double t_1 = (D / d) * ((D * t_0) / d);
	double t_2 = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * ((c0 / 2.0) / w));
	double tmp;
	if (w <= -1.6e-50) {
		tmp = ((D * D) / (d / t_0)) / d;
	} else if (w <= -3.3e-288) {
		tmp = t_2;
	} else if (w <= 4.9e-244) {
		tmp = t_1;
	} else if (w <= 4.5e+65) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = h * ((M * M) * 0.25)
	t_1 = (D / d) * ((D * t_0) / d)
	t_2 = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * ((c0 / 2.0) / w))
	tmp = 0
	if w <= -1.6e-50:
		tmp = ((D * D) / (d / t_0)) / d
	elif w <= -3.3e-288:
		tmp = t_2
	elif w <= 4.9e-244:
		tmp = t_1
	elif w <= 4.5e+65:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(h * Float64(Float64(M * M) * 0.25))
	t_1 = Float64(Float64(D / d) * Float64(Float64(D * t_0) / d))
	t_2 = Float64(Float64(2.0 * d) * Float64(Float64(Float64(c0 * d) / Float64(D * Float64(w * Float64(h * D)))) * Float64(Float64(c0 / 2.0) / w)))
	tmp = 0.0
	if (w <= -1.6e-50)
		tmp = Float64(Float64(Float64(D * D) / Float64(d / t_0)) / d);
	elseif (w <= -3.3e-288)
		tmp = t_2;
	elseif (w <= 4.9e-244)
		tmp = t_1;
	elseif (w <= 4.5e+65)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = h * ((M * M) * 0.25);
	t_1 = (D / d) * ((D * t_0) / d);
	t_2 = (2.0 * d) * (((c0 * d) / (D * (w * (h * D)))) * ((c0 / 2.0) / w));
	tmp = 0.0;
	if (w <= -1.6e-50)
		tmp = ((D * D) / (d / t_0)) / d;
	elseif (w <= -3.3e-288)
		tmp = t_2;
	elseif (w <= 4.9e-244)
		tmp = t_1;
	elseif (w <= 4.5e+65)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(h * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(D / d), $MachinePrecision] * N[(N[(D * t$95$0), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * d), $MachinePrecision] * N[(N[(N[(c0 * d), $MachinePrecision] / N[(D * N[(w * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 / 2.0), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[w, -1.6e-50], N[(N[(N[(D * D), $MachinePrecision] / N[(d / t$95$0), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[w, -3.3e-288], t$95$2, If[LessEqual[w, 4.9e-244], t$95$1, If[LessEqual[w, 4.5e+65], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;w \leq -3.3 \cdot 10^{-288}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;w \leq 4.9 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;w \leq 4.5 \cdot 10^{+65}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if w < -1.6e-50

    1. Initial program 18.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr20.1%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

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

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6e-50 < w < -3.29999999999999988e-288 or 4.90000000000000015e-244 < w < 4.5e65

    1. Initial program 31.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, w\right)\right)\right), D\right), D\right)\right)\right) \]
    12. Simplified58.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999988e-288 < w < 4.90000000000000015e-244 or 4.5e65 < w

    1. Initial program 24.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr21.3%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

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

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified45.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -1.6 \cdot 10^{-50}:\\ \;\;\;\;\frac{\frac{D \cdot D}{\frac{d}{h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)}}}{d}\\ \mathbf{elif}\;w \leq -3.3 \cdot 10^{-288}:\\ \;\;\;\;\left(2 \cdot d\right) \cdot \left(\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)} \cdot \frac{\frac{c0}{2}}{w}\right)\\ \mathbf{elif}\;w \leq 4.9 \cdot 10^{-244}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \mathbf{elif}\;w \leq 4.5 \cdot 10^{+65}:\\ \;\;\;\;\left(2 \cdot d\right) \cdot \left(\frac{c0 \cdot d}{D \cdot \left(w \cdot \left(h \cdot D\right)\right)} \cdot \frac{\frac{c0}{2}}{w}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 44.4% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\\ t_1 := \frac{D}{d} \cdot \frac{D \cdot t\_0}{d}\\ t_2 := \left(c0 \cdot d\right) \cdot \left(\frac{c0}{2 \cdot w} \cdot \frac{2 \cdot d}{w \cdot \left(D \cdot \left(h \cdot D\right)\right)}\right)\\ \mathbf{if}\;w \leq -5.5 \cdot 10^{-48}:\\ \;\;\;\;\frac{\frac{D \cdot D}{\frac{d}{t\_0}}}{d}\\ \mathbf{elif}\;w \leq -3.3 \cdot 10^{-288}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;w \leq 9.5 \cdot 10^{-245}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;w \leq 3 \cdot 10^{+67}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* h (* (* M M) 0.25)))
        (t_1 (* (/ D d) (/ (* D t_0) d)))
        (t_2
         (* (* c0 d) (* (/ c0 (* 2.0 w)) (/ (* 2.0 d) (* w (* D (* h D))))))))
   (if (<= w -5.5e-48)
     (/ (/ (* D D) (/ d t_0)) d)
     (if (<= w -3.3e-288)
       t_2
       (if (<= w 9.5e-245) t_1 (if (<= w 3e+67) t_2 t_1))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = h * ((M * M) * 0.25);
	double t_1 = (D / d) * ((D * t_0) / d);
	double t_2 = (c0 * d) * ((c0 / (2.0 * w)) * ((2.0 * d) / (w * (D * (h * D)))));
	double tmp;
	if (w <= -5.5e-48) {
		tmp = ((D * D) / (d / t_0)) / d;
	} else if (w <= -3.3e-288) {
		tmp = t_2;
	} else if (w <= 9.5e-245) {
		tmp = t_1;
	} else if (w <= 3e+67) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_0 = h * ((m * m) * 0.25d0)
    t_1 = (d / d_1) * ((d * t_0) / d_1)
    t_2 = (c0 * d_1) * ((c0 / (2.0d0 * w)) * ((2.0d0 * d_1) / (w * (d * (h * d)))))
    if (w <= (-5.5d-48)) then
        tmp = ((d * d) / (d_1 / t_0)) / d_1
    else if (w <= (-3.3d-288)) then
        tmp = t_2
    else if (w <= 9.5d-245) then
        tmp = t_1
    else if (w <= 3d+67) then
        tmp = t_2
    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 = h * ((M * M) * 0.25);
	double t_1 = (D / d) * ((D * t_0) / d);
	double t_2 = (c0 * d) * ((c0 / (2.0 * w)) * ((2.0 * d) / (w * (D * (h * D)))));
	double tmp;
	if (w <= -5.5e-48) {
		tmp = ((D * D) / (d / t_0)) / d;
	} else if (w <= -3.3e-288) {
		tmp = t_2;
	} else if (w <= 9.5e-245) {
		tmp = t_1;
	} else if (w <= 3e+67) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = h * ((M * M) * 0.25)
	t_1 = (D / d) * ((D * t_0) / d)
	t_2 = (c0 * d) * ((c0 / (2.0 * w)) * ((2.0 * d) / (w * (D * (h * D)))))
	tmp = 0
	if w <= -5.5e-48:
		tmp = ((D * D) / (d / t_0)) / d
	elif w <= -3.3e-288:
		tmp = t_2
	elif w <= 9.5e-245:
		tmp = t_1
	elif w <= 3e+67:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(h * Float64(Float64(M * M) * 0.25))
	t_1 = Float64(Float64(D / d) * Float64(Float64(D * t_0) / d))
	t_2 = Float64(Float64(c0 * d) * Float64(Float64(c0 / Float64(2.0 * w)) * Float64(Float64(2.0 * d) / Float64(w * Float64(D * Float64(h * D))))))
	tmp = 0.0
	if (w <= -5.5e-48)
		tmp = Float64(Float64(Float64(D * D) / Float64(d / t_0)) / d);
	elseif (w <= -3.3e-288)
		tmp = t_2;
	elseif (w <= 9.5e-245)
		tmp = t_1;
	elseif (w <= 3e+67)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = h * ((M * M) * 0.25);
	t_1 = (D / d) * ((D * t_0) / d);
	t_2 = (c0 * d) * ((c0 / (2.0 * w)) * ((2.0 * d) / (w * (D * (h * D)))));
	tmp = 0.0;
	if (w <= -5.5e-48)
		tmp = ((D * D) / (d / t_0)) / d;
	elseif (w <= -3.3e-288)
		tmp = t_2;
	elseif (w <= 9.5e-245)
		tmp = t_1;
	elseif (w <= 3e+67)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(h * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(D / d), $MachinePrecision] * N[(N[(D * t$95$0), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c0 * d), $MachinePrecision] * N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * d), $MachinePrecision] / N[(w * N[(D * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[w, -5.5e-48], N[(N[(N[(D * D), $MachinePrecision] / N[(d / t$95$0), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[w, -3.3e-288], t$95$2, If[LessEqual[w, 9.5e-245], t$95$1, If[LessEqual[w, 3e+67], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;w \leq -3.3 \cdot 10^{-288}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;w \leq 9.5 \cdot 10^{-245}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;w \leq 3 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if w < -5.50000000000000047e-48

    1. Initial program 18.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr20.1%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

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

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.50000000000000047e-48 < w < -3.29999999999999988e-288 or 9.5000000000000002e-245 < w < 3.0000000000000001e67

    1. Initial program 31.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999988e-288 < w < 9.5000000000000002e-245 or 3.0000000000000001e67 < w

    1. Initial program 24.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr21.3%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

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

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified45.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -5.5 \cdot 10^{-48}:\\ \;\;\;\;\frac{\frac{D \cdot D}{\frac{d}{h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)}}}{d}\\ \mathbf{elif}\;w \leq -3.3 \cdot 10^{-288}:\\ \;\;\;\;\left(c0 \cdot d\right) \cdot \left(\frac{c0}{2 \cdot w} \cdot \frac{2 \cdot d}{w \cdot \left(D \cdot \left(h \cdot D\right)\right)}\right)\\ \mathbf{elif}\;w \leq 9.5 \cdot 10^{-245}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \mathbf{elif}\;w \leq 3 \cdot 10^{+67}:\\ \;\;\;\;\left(c0 \cdot d\right) \cdot \left(\frac{c0}{2 \cdot w} \cdot \frac{2 \cdot d}{w \cdot \left(D \cdot \left(h \cdot D\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 43.2% accurate, 4.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\\ t_1 := \frac{c0 \cdot \frac{c0 \cdot \frac{\frac{\frac{d \cdot d}{D}}{D}}{w}}{w}}{h}\\ \mathbf{if}\;h \leq -3.4 \cdot 10^{-239}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot t\_0}{d}\\ \mathbf{elif}\;h \leq 3.2 \cdot 10^{-104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;h \leq 2.25 \cdot 10^{+43}:\\ \;\;\;\;\frac{\frac{D \cdot D}{\frac{d}{t\_0}}}{d}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* h (* (* M M) 0.25)))
        (t_1 (/ (* c0 (/ (* c0 (/ (/ (/ (* d d) D) D) w)) w)) h)))
   (if (<= h -3.4e-239)
     (* (/ D d) (/ (* D t_0) d))
     (if (<= h 3.2e-104)
       t_1
       (if (<= h 2.25e+43) (/ (/ (* D D) (/ d t_0)) d) t_1)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = h * ((M * M) * 0.25);
	double t_1 = (c0 * ((c0 * ((((d * d) / D) / D) / w)) / w)) / h;
	double tmp;
	if (h <= -3.4e-239) {
		tmp = (D / d) * ((D * t_0) / d);
	} else if (h <= 3.2e-104) {
		tmp = t_1;
	} else if (h <= 2.25e+43) {
		tmp = ((D * D) / (d / t_0)) / d;
	} 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 = h * ((m * m) * 0.25d0)
    t_1 = (c0 * ((c0 * ((((d_1 * d_1) / d) / d) / w)) / w)) / h
    if (h <= (-3.4d-239)) then
        tmp = (d / d_1) * ((d * t_0) / d_1)
    else if (h <= 3.2d-104) then
        tmp = t_1
    else if (h <= 2.25d+43) then
        tmp = ((d * d) / (d_1 / t_0)) / d_1
    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 = h * ((M * M) * 0.25);
	double t_1 = (c0 * ((c0 * ((((d * d) / D) / D) / w)) / w)) / h;
	double tmp;
	if (h <= -3.4e-239) {
		tmp = (D / d) * ((D * t_0) / d);
	} else if (h <= 3.2e-104) {
		tmp = t_1;
	} else if (h <= 2.25e+43) {
		tmp = ((D * D) / (d / t_0)) / d;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = h * ((M * M) * 0.25)
	t_1 = (c0 * ((c0 * ((((d * d) / D) / D) / w)) / w)) / h
	tmp = 0
	if h <= -3.4e-239:
		tmp = (D / d) * ((D * t_0) / d)
	elif h <= 3.2e-104:
		tmp = t_1
	elif h <= 2.25e+43:
		tmp = ((D * D) / (d / t_0)) / d
	else:
		tmp = t_1
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(h * Float64(Float64(M * M) * 0.25))
	t_1 = Float64(Float64(c0 * Float64(Float64(c0 * Float64(Float64(Float64(Float64(d * d) / D) / D) / w)) / w)) / h)
	tmp = 0.0
	if (h <= -3.4e-239)
		tmp = Float64(Float64(D / d) * Float64(Float64(D * t_0) / d));
	elseif (h <= 3.2e-104)
		tmp = t_1;
	elseif (h <= 2.25e+43)
		tmp = Float64(Float64(Float64(D * D) / Float64(d / t_0)) / d);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = h * ((M * M) * 0.25);
	t_1 = (c0 * ((c0 * ((((d * d) / D) / D) / w)) / w)) / h;
	tmp = 0.0;
	if (h <= -3.4e-239)
		tmp = (D / d) * ((D * t_0) / d);
	elseif (h <= 3.2e-104)
		tmp = t_1;
	elseif (h <= 2.25e+43)
		tmp = ((D * D) / (d / t_0)) / d;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(h * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(c0 * N[(N[(c0 * N[(N[(N[(N[(d * d), $MachinePrecision] / D), $MachinePrecision] / D), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]}, If[LessEqual[h, -3.4e-239], N[(N[(D / d), $MachinePrecision] * N[(N[(D * t$95$0), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 3.2e-104], t$95$1, If[LessEqual[h, 2.25e+43], N[(N[(N[(D * D), $MachinePrecision] / N[(d / t$95$0), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;h \leq 3.2 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;h \leq 2.25 \cdot 10^{+43}:\\
\;\;\;\;\frac{\frac{D \cdot D}{\frac{d}{t\_0}}}{d}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if h < -3.4e-239

    1. Initial program 21.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr22.4%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

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

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4e-239 < h < 3.19999999999999989e-104 or 2.25e43 < h

    1. Initial program 34.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(h, w\right)\right)\right), D\right), D\right)\right)\right) \]
    12. Simplified53.1%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \cdot \frac{c0 \cdot {d}^{2}}{{w}^{2} \cdot {D}^{2}}\right), \color{blue}{h}\right) \]
    15. Simplified56.0%

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

    if 3.19999999999999989e-104 < h < 2.25e43

    1. Initial program 12.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr12.1%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{\frac{-1}{2} \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)}{\color{blue}{w}}\right)\right) \]
    7. Simplified21.9%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{D \cdot D}{\frac{d}{h \cdot \left(0.25 \cdot \left(M \cdot M\right)\right)}}}{d}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -3.4 \cdot 10^{-239}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \mathbf{elif}\;h \leq 3.2 \cdot 10^{-104}:\\ \;\;\;\;\frac{c0 \cdot \frac{c0 \cdot \frac{\frac{\frac{d \cdot d}{D}}{D}}{w}}{w}}{h}\\ \mathbf{elif}\;h \leq 2.25 \cdot 10^{+43}:\\ \;\;\;\;\frac{\frac{D \cdot D}{\frac{d}{h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)}}}{d}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot \frac{c0 \cdot \frac{\frac{\frac{d \cdot d}{D}}{D}}{w}}{w}}{h}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 43.5% accurate, 6.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;h \leq -2.2 \cdot 10^{-237}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\frac{\frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{w}}{w}}{h}}{D}}{D}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= h -2.2e-237)
   (* (/ D d) (/ (* D (* h (* (* M M) 0.25))) d))
   (/ (/ (/ (/ (/ (* c0 (* c0 (* d d))) w) w) h) D) D)))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (h <= -2.2e-237) {
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
	} else {
		tmp = (((((c0 * (c0 * (d * d))) / w) / w) / h) / 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 (h <= (-2.2d-237)) then
        tmp = (d / d_1) * ((d * (h * ((m * m) * 0.25d0))) / d_1)
    else
        tmp = (((((c0 * (c0 * (d_1 * d_1))) / w) / w) / h) / d) / d
    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 (h <= -2.2e-237) {
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
	} else {
		tmp = (((((c0 * (c0 * (d * d))) / w) / w) / h) / D) / D;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if h <= -2.2e-237:
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d)
	else:
		tmp = (((((c0 * (c0 * (d * d))) / w) / w) / h) / D) / D
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (h <= -2.2e-237)
		tmp = Float64(Float64(D / d) * Float64(Float64(D * Float64(h * Float64(Float64(M * M) * 0.25))) / d));
	else
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(c0 * Float64(c0 * Float64(d * d))) / w) / w) / h) / D) / D);
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if (h <= -2.2e-237)
		tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
	else
		tmp = (((((c0 * (c0 * (d * d))) / w) / w) / h) / D) / D;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[h, -2.2e-237], N[(N[(D / d), $MachinePrecision] * N[(N[(D * N[(h * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(c0 * N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision] / w), $MachinePrecision] / h), $MachinePrecision] / D), $MachinePrecision] / D), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;h \leq -2.2 \cdot 10^{-237}:\\
\;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\frac{\frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{w}}{w}}{h}}{D}}{D}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if h < -2.19999999999999998e-237

    1. Initial program 21.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr22.4%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{\frac{-1}{2} \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)}{\color{blue}{w}}\right)\right) \]
    7. Simplified11.4%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left({M}^{2} \cdot h\right) \cdot {D}^{2}\right)\right), \left({d}^{2}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right) \cdot {D}^{2}\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({D}^{2} \cdot \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({D}^{2}\right), \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(\frac{1}{4} \cdot {M}^{2}\right) \cdot h\right)\right), \left({d}^{2}\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot \left(\frac{1}{4} \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(\frac{1}{4} \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      16. *-lowering-*.f6436.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified36.2%

      \[\leadsto \color{blue}{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(0.25 \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{D \cdot \left(D \cdot \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)\right)}{\color{blue}{d} \cdot d} \]
      2. times-fracN/A

        \[\leadsto \frac{D}{d} \cdot \color{blue}{\frac{D \cdot \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)}{d}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{D}{d}\right), \color{blue}{\left(\frac{D \cdot \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)}{d}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \left(\frac{\color{blue}{D \cdot \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)}}{d}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\left(D \cdot \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)\right), \color{blue}{d}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)\right), d\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)\right), d\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \left(M \cdot M\right)\right)\right)\right), d\right)\right) \]
      9. *-lowering-*.f6454.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), d\right)\right) \]
    12. Applied egg-rr54.2%

      \[\leadsto \color{blue}{\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(0.25 \cdot \left(M \cdot M\right)\right)\right)}{d}} \]

    if -2.19999999999999998e-237 < h

    1. Initial program 30.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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. Simplified26.8%

      \[\leadsto \color{blue}{\frac{\frac{c0}{2}}{w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\frac{c0}{w \cdot h} \cdot \left(\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}\right)}{D \cdot D} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \color{blue}{\left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} \cdot \color{blue}{2}\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\left(c0 \cdot {d}^{2}\right) \cdot 2}{\color{blue}{{D}^{2} \cdot \left(h \cdot w\right)}}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{/.f64}\left(\left(\left(c0 \cdot {d}^{2}\right) \cdot 2\right), \color{blue}{\left({D}^{2} \cdot \left(h \cdot w\right)\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(c0 \cdot {d}^{2}\right), 2\right), \left(\color{blue}{{D}^{2}} \cdot \left(h \cdot w\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right), 2\right), \left({\color{blue}{D}}^{2} \cdot \left(h \cdot w\right)\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), 2\right), \left({D}^{2} \cdot \left(h \cdot w\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), 2\right), \left({D}^{2} \cdot \left(h \cdot w\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), 2\right), \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(h \cdot w\right)}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), 2\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), 2\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), 2\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(w \cdot \color{blue}{h}\right)\right)\right)\right) \]
      12. *-lowering-*.f6440.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), 2\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(w, \color{blue}{h}\right)\right)\right)\right) \]
    7. Simplified40.5%

      \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \color{blue}{\frac{\left(c0 \cdot \left(d \cdot d\right)\right) \cdot 2}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
    8. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(c0 \cdot \left(d \cdot d\right)\right) \cdot \color{blue}{\frac{2}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(\left(c0 \cdot d\right) \cdot d\right) \cdot \frac{\color{blue}{2}}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(c0 \cdot d\right) \cdot \color{blue}{\left(d \cdot \frac{2}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\left(c0 \cdot d\right), \color{blue}{\left(d \cdot \frac{2}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}\right)}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \left(\color{blue}{d} \cdot \frac{2}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(d, \color{blue}{\left(\frac{2}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}\right)}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(d, \mathsf{/.f64}\left(2, \color{blue}{\left(\left(D \cdot D\right) \cdot \left(w \cdot h\right)\right)}\right)\right)\right)\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(d, \mathsf{/.f64}\left(2, \left(D \cdot \color{blue}{\left(D \cdot \left(w \cdot h\right)\right)}\right)\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(d, \mathsf{/.f64}\left(2, \left(D \cdot \left(\left(w \cdot h\right) \cdot \color{blue}{D}\right)\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(d, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(D, \color{blue}{\left(\left(w \cdot h\right) \cdot D\right)}\right)\right)\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(d, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(D, \left(w \cdot \color{blue}{\left(h \cdot D\right)}\right)\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(d, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(w, \color{blue}{\left(h \cdot D\right)}\right)\right)\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(d, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(w, \left(D \cdot \color{blue}{h}\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6451.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(d, \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(D, \color{blue}{h}\right)\right)\right)\right)\right)\right)\right) \]
    9. Applied egg-rr51.5%

      \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \color{blue}{\left(\left(c0 \cdot d\right) \cdot \left(d \cdot \frac{2}{D \cdot \left(w \cdot \left(D \cdot h\right)\right)}\right)\right)} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{{c0}^{2} \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)}} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{{d}^{2} \cdot {c0}^{2}}{\color{blue}{{D}^{2}} \cdot \left(h \cdot {w}^{2}\right)} \]
      2. times-fracN/A

        \[\leadsto \frac{{d}^{2}}{{D}^{2}} \cdot \color{blue}{\frac{{c0}^{2}}{h \cdot {w}^{2}}} \]
      3. unpow2N/A

        \[\leadsto \frac{{d}^{2}}{D \cdot D} \cdot \frac{{c0}^{\color{blue}{2}}}{h \cdot {w}^{2}} \]
      4. associate-/r*N/A

        \[\leadsto \frac{\frac{{d}^{2}}{D}}{D} \cdot \frac{\color{blue}{{c0}^{2}}}{h \cdot {w}^{2}} \]
      5. associate-*l/N/A

        \[\leadsto \frac{\frac{{d}^{2}}{D} \cdot \frac{{c0}^{2}}{h \cdot {w}^{2}}}{\color{blue}{D}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{{d}^{2}}{D} \cdot \frac{{c0}^{2}}{h \cdot {w}^{2}}\right), \color{blue}{D}\right) \]
    12. Simplified52.0%

      \[\leadsto \color{blue}{\frac{\frac{\frac{\frac{\frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{w}}{w}}{h}}{D}}{D}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -2.2 \cdot 10^{-237}:\\ \;\;\;\;\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\frac{\frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{w}}{w}}{h}}{D}}{D}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 42.6% accurate, 6.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;d \cdot d \leq 1.55 \cdot 10^{+308}:\\ \;\;\;\;D \cdot \frac{D}{\frac{d \cdot d}{h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)}}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= (* d d) 1.55e+308)
   (* D (/ D (/ (* d d) (* h (* (* M M) 0.25)))))
   0.0))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((d * d) <= 1.55e+308) {
		tmp = D * (D / ((d * d) / (h * ((M * M) * 0.25))));
	} else {
		tmp = 0.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) :: tmp
    if ((d_1 * d_1) <= 1.55d+308) then
        tmp = d * (d / ((d_1 * d_1) / (h * ((m * m) * 0.25d0))))
    else
        tmp = 0.0d0
    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 * d) <= 1.55e+308) {
		tmp = D * (D / ((d * d) / (h * ((M * M) * 0.25))));
	} else {
		tmp = 0.0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if (d * d) <= 1.55e+308:
		tmp = D * (D / ((d * d) / (h * ((M * M) * 0.25))))
	else:
		tmp = 0.0
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (Float64(d * d) <= 1.55e+308)
		tmp = Float64(D * Float64(D / Float64(Float64(d * d) / Float64(h * Float64(Float64(M * M) * 0.25)))));
	else
		tmp = 0.0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if ((d * d) <= 1.55e+308)
		tmp = D * (D / ((d * d) / (h * ((M * M) * 0.25))));
	else
		tmp = 0.0;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[N[(d * d), $MachinePrecision], 1.55e+308], N[(D * N[(D / N[(N[(d * d), $MachinePrecision] / N[(h * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;d \cdot d \leq 1.55 \cdot 10^{+308}:\\
\;\;\;\;D \cdot \frac{D}{\frac{d \cdot d}{h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)}}\\

\mathbf{else}:\\
\;\;\;\;0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 d d) < 1.5500000000000001e308

    1. Initial program 27.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
    4. Applied egg-rr27.0%

      \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
    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. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{\frac{-1}{2} \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)}{\color{blue}{w}}\right)\right) \]
    7. Simplified13.2%

      \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left({M}^{2} \cdot h\right) \cdot {D}^{2}\right)\right), \left({d}^{2}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right) \cdot {D}^{2}\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({D}^{2} \cdot \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({D}^{2}\right), \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(\frac{1}{4} \cdot {M}^{2}\right) \cdot h\right)\right), \left({d}^{2}\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot \left(\frac{1}{4} \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(\frac{1}{4} \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      16. *-lowering-*.f6437.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified37.6%

      \[\leadsto \color{blue}{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(0.25 \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \left(D \cdot D\right) \cdot \color{blue}{\frac{h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)}{d \cdot d}} \]
      2. associate-*l*N/A

        \[\leadsto D \cdot \color{blue}{\left(D \cdot \frac{h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)}{d \cdot d}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(D, \color{blue}{\left(D \cdot \frac{h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)}{d \cdot d}\right)}\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(D, \left(D \cdot \frac{1}{\color{blue}{\frac{d \cdot d}{h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)}}}\right)\right) \]
      5. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(D, \left(\frac{D}{\color{blue}{\frac{d \cdot d}{h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)}}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(D, \color{blue}{\left(\frac{d \cdot d}{h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)}\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\left(d \cdot d\right), \color{blue}{\left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), \left(\color{blue}{h} \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{*.f64}\left(h, \color{blue}{\left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(M \cdot M\right)}\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f6443.2%

        \[\leadsto \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, \color{blue}{M}\right)\right)\right)\right)\right)\right) \]
    12. Applied egg-rr43.2%

      \[\leadsto \color{blue}{D \cdot \frac{D}{\frac{d \cdot d}{h \cdot \left(0.25 \cdot \left(M \cdot M\right)\right)}}} \]

    if 1.5500000000000001e308 < (*.f64 d d)

    1. Initial program 26.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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. Simplified22.4%

      \[\leadsto \color{blue}{\frac{\frac{c0}{2}}{w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\frac{c0}{w \cdot h} \cdot \left(\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}\right)}{D \cdot D} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(c0, \color{blue}{\left(-1 + 1\right)}\right)\right) \]
      13. metadata-eval29.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(c0, 0\right)\right) \]
    7. Simplified29.3%

      \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{\frac{c0}{2}}{w} \cdot c0\right) \cdot \color{blue}{0} \]
      2. mul0-rgt31.4%

        \[\leadsto 0 \]
    9. Applied egg-rr31.4%

      \[\leadsto \color{blue}{0} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \cdot d \leq 1.55 \cdot 10^{+308}:\\ \;\;\;\;D \cdot \frac{D}{\frac{d \cdot d}{h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)}}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 36.6% accurate, 6.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \cdot D \leq 4 \cdot 10^{-300}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= (* D D) 4e-300) 0.0 (* 0.25 (/ (* (* D D) (* h (* M M))) (* d d)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((D * D) <= 4e-300) {
		tmp = 0.0;
	} else {
		tmp = 0.25 * (((D * D) * (h * (M * 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 * d) <= 4d-300) then
        tmp = 0.0d0
    else
        tmp = 0.25d0 * (((d * d) * (h * (m * 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 * D) <= 4e-300) {
		tmp = 0.0;
	} else {
		tmp = 0.25 * (((D * D) * (h * (M * M))) / (d * d));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if (D * D) <= 4e-300:
		tmp = 0.0
	else:
		tmp = 0.25 * (((D * D) * (h * (M * M))) / (d * d))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (Float64(D * D) <= 4e-300)
		tmp = 0.0;
	else
		tmp = Float64(0.25 * Float64(Float64(Float64(D * D) * Float64(h * Float64(M * M))) / Float64(d * d)));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if ((D * D) <= 4e-300)
		tmp = 0.0;
	else
		tmp = 0.25 * (((D * D) * (h * (M * M))) / (d * d));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[N[(D * D), $MachinePrecision], 4e-300], 0.0, N[(0.25 * N[(N[(N[(D * D), $MachinePrecision] * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \cdot D \leq 4 \cdot 10^{-300}:\\
\;\;\;\;0\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 D D) < 4.0000000000000001e-300

    1. Initial program 27.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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. Simplified25.0%

      \[\leadsto \color{blue}{\frac{\frac{c0}{2}}{w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\frac{c0}{w \cdot h} \cdot \left(\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}\right)}{D \cdot D} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(c0, \color{blue}{\left(-1 + 1\right)}\right)\right) \]
      13. metadata-eval36.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(c0, 0\right)\right) \]
    7. Simplified36.1%

      \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{\frac{c0}{2}}{w} \cdot c0\right) \cdot \color{blue}{0} \]
      2. mul0-rgt43.7%

        \[\leadsto 0 \]
    9. Applied egg-rr43.7%

      \[\leadsto \color{blue}{0} \]

    if 4.0000000000000001e-300 < (*.f64 D D)

    1. Initial program 27.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. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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. Simplified22.9%

      \[\leadsto \color{blue}{\frac{\frac{c0}{2}}{w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\frac{c0}{w \cdot h} \cdot \left(\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}\right)}{D \cdot D} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(0 - \color{blue}{c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(-1 + 1\right) - \color{blue}{c0} \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{\_.f64}\left(\left(-1 + 1\right), \color{blue}{\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{\_.f64}\left(0, \left(\color{blue}{c0} \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(c0, \color{blue}{\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)}\right)\right)\right) \]
    7. Simplified17.1%

      \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \color{blue}{\left(0 - c0 \cdot \left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\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-*.f6431.3%

        \[\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. Simplified31.3%

      \[\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}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 46.3% accurate, 10.1× speedup?

\[\begin{array}{l} \\ \frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (* (/ D d) (/ (* D (* h (* (* M M) 0.25))) d)))
double code(double c0, double w, double h, double D, double d, double M) {
	return (D / d) * ((D * (h * ((M * M) * 0.25))) / 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_1) * ((d * (h * ((m * m) * 0.25d0))) / d_1)
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
}
def code(c0, w, h, D, d, M):
	return (D / d) * ((D * (h * ((M * M) * 0.25))) / d)
function code(c0, w, h, D, d, M)
	return Float64(Float64(D / d) * Float64(Float64(D * Float64(h * Float64(Float64(M * M) * 0.25))) / d))
end
function tmp = code(c0, w, h, D, d, M)
	tmp = (D / d) * ((D * (h * ((M * M) * 0.25))) / d);
end
code[c0_, w_, h_, D_, d_, M_] := N[(N[(D / d), $MachinePrecision] * N[(N[(D * N[(h * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d}
\end{array}
Derivation
  1. Initial program 27.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. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/N/A

      \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
    2. *-commutativeN/A

      \[\leadsto \frac{c0 \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)}{w \cdot \color{blue}{2}} \]
    3. associate-/r*N/A

      \[\leadsto \frac{\frac{c0 \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)}{w}}{\color{blue}{2}} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0 \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)}{w}\right), \color{blue}{2}\right) \]
  4. Applied egg-rr26.7%

    \[\leadsto \color{blue}{\frac{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)} + \sqrt{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(\left(D \cdot D\right) \cdot w\right)}}{\left(\left(w \cdot h\right) \cdot D\right) \cdot \frac{D}{c0 \cdot \left(d \cdot d\right)}} - M \cdot M}\right)}{w}}{2}} \]
  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. +-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \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}}\right)\right) \]
    5. associate-*r/N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{\frac{-1}{2} \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)}{\color{blue}{w}}\right)\right) \]
  7. Simplified13.8%

    \[\leadsto \color{blue}{\left(c0 \cdot c0\right) \cdot \left(\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)} + \frac{0}{w}\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. 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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(\left({M}^{2} \cdot h\right) \cdot {D}^{2}\right)\right), \left({d}^{2}\right)\right) \]
    4. associate-*r*N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right) \cdot {D}^{2}\right), \left({\color{blue}{d}}^{2}\right)\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left({D}^{2} \cdot \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({D}^{2}\right), \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
    9. associate-*r*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(\frac{1}{4} \cdot {M}^{2}\right) \cdot h\right)\right), \left({d}^{2}\right)\right) \]
    10. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot \left(\frac{1}{4} \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(\frac{1}{4} \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
    13. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
    15. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
    16. *-lowering-*.f6432.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
  10. Simplified32.8%

    \[\leadsto \color{blue}{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(0.25 \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
  11. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \frac{D \cdot \left(D \cdot \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)\right)}{\color{blue}{d} \cdot d} \]
    2. times-fracN/A

      \[\leadsto \frac{D}{d} \cdot \color{blue}{\frac{D \cdot \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)}{d}} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{D}{d}\right), \color{blue}{\left(\frac{D \cdot \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)}{d}\right)}\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \left(\frac{\color{blue}{D \cdot \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)}}{d}\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\left(D \cdot \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)\right), \color{blue}{d}\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)\right), d\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(\frac{1}{4} \cdot \left(M \cdot M\right)\right)\right)\right), d\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \left(M \cdot M\right)\right)\right)\right), d\right)\right) \]
    9. *-lowering-*.f6446.4%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), d\right)\right) \]
  12. Applied egg-rr46.4%

    \[\leadsto \color{blue}{\frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(0.25 \cdot \left(M \cdot M\right)\right)\right)}{d}} \]
  13. Final simplification46.4%

    \[\leadsto \frac{D}{d} \cdot \frac{D \cdot \left(h \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{d} \]
  14. Add Preprocessing

Alternative 11: 33.5% 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 27.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. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\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(\left(\frac{c0}{2}\right), w\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) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{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) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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.7%

    \[\leadsto \color{blue}{\frac{\frac{c0}{2}}{w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\frac{c0}{w \cdot h} \cdot \left(\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}\right)}{D \cdot D} - M \cdot M}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in c0 around -inf

    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right) \]
    6. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right) \]
    10. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
    11. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(c0, \color{blue}{\left(-1 + 1\right)}\right)\right) \]
    13. metadata-eval25.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(c0, 0\right)\right) \]
  7. Simplified25.9%

    \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
  8. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(\frac{\frac{c0}{2}}{w} \cdot c0\right) \cdot \color{blue}{0} \]
    2. mul0-rgt29.0%

      \[\leadsto 0 \]
  9. Applied egg-rr29.0%

    \[\leadsto \color{blue}{0} \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2024163 
(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))))))