Henrywood and Agarwal, Equation (13)

Percentage Accurate: 24.8% → 63.3%
Time: 27.7s
Alternatives: 8
Speedup: 30.2×

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 8 alternatives:

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

Initial Program: 24.8% 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: 63.3% accurate, 0.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}\\


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

    1. Initial program 74.8%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. times-frac70.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def69.2%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares69.4%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Taylor expanded in c0 around inf 73.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
    5. Step-by-step derivation
      1. *-commutative73.6%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{w}}{h \cdot {D}^{2}}}\right) \]
      6. unpow271.3%

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \color{blue}{{d}^{2}}}{\left(h \cdot \left(D \cdot D\right)\right) \cdot w}\right) \]
      9. *-commutative72.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{{d}^{2} \cdot c0}}{\left(h \cdot \left(D \cdot D\right)\right) \cdot w}\right) \]
      10. unpow272.3%

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

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{\left(d \cdot d\right) \cdot c0}{\left(\left(D \cdot h\right) \cdot D\right) \cdot w}\right)} \]
    7. Step-by-step derivation
      1. *-un-lft-identity73.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(1 \cdot \frac{\left(d \cdot d\right) \cdot c0}{\left(\left(D \cdot h\right) \cdot D\right) \cdot w}\right)}\right) \]
      2. times-frac69.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(1 \cdot \color{blue}{\left(\frac{d \cdot d}{\left(D \cdot h\right) \cdot D} \cdot \frac{c0}{w}\right)}\right)\right) \]
      3. *-commutative69.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(1 \cdot \left(\frac{d \cdot d}{\color{blue}{D \cdot \left(D \cdot h\right)}} \cdot \frac{c0}{w}\right)\right)\right) \]
    8. Applied egg-rr69.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(1 \cdot \left(\frac{d \cdot d}{D \cdot \left(D \cdot h\right)} \cdot \frac{c0}{w}\right)\right)}\right) \]
    9. Step-by-step derivation
      1. *-lft-identity69.9%

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

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

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

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

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

        \[\leadsto \frac{c0 \cdot \left(\color{blue}{\left(\frac{d}{D} \cdot \left(\frac{d}{D \cdot h} \cdot \frac{c0}{w}\right)\right)} \cdot 2\right)}{2 \cdot w} \]
      4. *-commutative78.5%

        \[\leadsto \frac{c0 \cdot \left(\left(\frac{d}{D} \cdot \left(\frac{d}{D \cdot h} \cdot \frac{c0}{w}\right)\right) \cdot 2\right)}{\color{blue}{w \cdot 2}} \]
    12. Applied egg-rr78.5%

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

        \[\leadsto \color{blue}{\frac{c0}{w \cdot 2} \cdot \left(\left(\frac{d}{D} \cdot \left(\frac{d}{D \cdot h} \cdot \frac{c0}{w}\right)\right) \cdot 2\right)} \]
      2. *-commutative80.5%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left(\frac{d}{D} \cdot \left(\frac{d}{D \cdot h} \cdot \frac{c0}{w}\right)\right)\right)} \cdot \frac{c0}{w \cdot 2} \]
      4. *-commutative80.5%

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

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

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

    1. Initial program 0.0%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. times-frac0.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def0.6%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares14.0%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef17.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/15.9%

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

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

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/13.4%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac13.4%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/13.4%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac13.4%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr3.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow23.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-6.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses32.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow232.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified32.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 21.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg21.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg21.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/21.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*22.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow222.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow222.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow222.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*22.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac22.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow222.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow222.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac23.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow223.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative23.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified23.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 44.0%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow244.0%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative44.0%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow244.0%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*44.0%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow244.0%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow244.0%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow244.0%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative44.0%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified44.0%

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

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{{d}^{2}}{h \cdot {M}^{2}}}} \]
    15. Step-by-step derivation
      1. unpow244.0%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{h \cdot {M}^{2}}} \]
      2. unpow244.0%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}} \]
      3. associate-*r*47.0%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(h \cdot M\right) \cdot M}}} \]
      4. times-frac58.1%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}} \]
    16. Simplified58.1%

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.1%

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

Alternative 2: 48.5% accurate, 6.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;M \cdot M \leq 2 \cdot 10^{+117}:\\
\;\;\;\;0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 M M) < 2.0000000000000001e117

    1. Initial program 31.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. times-frac28.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def28.2%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares28.3%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef32.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/30.1%

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

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

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/29.3%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac29.3%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/29.3%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac31.1%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr5.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow25.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-9.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses32.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow232.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified32.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 26.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg26.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg26.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/26.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*25.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow225.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow225.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow225.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*25.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac24.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow224.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow224.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac25.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow225.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative25.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified26.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 43.9%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow243.9%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative43.9%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow243.9%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*43.6%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow243.6%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow243.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow243.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative43.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified43.6%

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

      \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    15. Step-by-step derivation
      1. *-commutative43.9%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{\left(h \cdot {M}^{2}\right) \cdot {D}^{2}}}{{d}^{2}} \]
      2. unpow243.9%

        \[\leadsto 0.25 \cdot \frac{\left(h \cdot \color{blue}{\left(M \cdot M\right)}\right) \cdot {D}^{2}}{{d}^{2}} \]
      3. associate-*r/42.2%

        \[\leadsto 0.25 \cdot \color{blue}{\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{{D}^{2}}{{d}^{2}}\right)} \]
      4. unpow242.2%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{\color{blue}{D \cdot D}}{{d}^{2}}\right) \]
      5. unpow242.2%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{\color{blue}{d \cdot d}}\right) \]
      6. times-frac51.7%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)}\right) \]
    16. Simplified51.7%

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

    if 2.0000000000000001e117 < (*.f64 M M)

    1. Initial program 17.6%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. times-frac18.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def18.8%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares44.4%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Taylor expanded in c0 around inf 49.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
    5. Step-by-step derivation
      1. *-commutative49.8%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\frac{\frac{c0 \cdot \left(d \cdot d\right)}{w}}{h \cdot {D}^{2}}}\right) \]
      6. unpow253.5%

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \color{blue}{{d}^{2}}}{\left(h \cdot \left(D \cdot D\right)\right) \cdot w}\right) \]
      9. *-commutative50.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\color{blue}{{d}^{2} \cdot c0}}{\left(h \cdot \left(D \cdot D\right)\right) \cdot w}\right) \]
      10. unpow250.9%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\left(d \cdot d\right) \cdot c0}{\color{blue}{\left(\left(h \cdot D\right) \cdot D\right)} \cdot w}\right) \]
      12. *-commutative52.1%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(2 \cdot \frac{\left(d \cdot d\right) \cdot c0}{\left(\left(D \cdot h\right) \cdot D\right) \cdot w}\right)} \]
    7. Step-by-step derivation
      1. *-un-lft-identity52.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(1 \cdot \frac{\left(d \cdot d\right) \cdot c0}{\left(\left(D \cdot h\right) \cdot D\right) \cdot w}\right)}\right) \]
      2. times-frac53.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(1 \cdot \color{blue}{\left(\frac{d \cdot d}{\left(D \cdot h\right) \cdot D} \cdot \frac{c0}{w}\right)}\right)\right) \]
      3. *-commutative53.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(1 \cdot \left(\frac{d \cdot d}{\color{blue}{D \cdot \left(D \cdot h\right)}} \cdot \frac{c0}{w}\right)\right)\right) \]
    8. Applied egg-rr53.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(1 \cdot \left(\frac{d \cdot d}{D \cdot \left(D \cdot h\right)} \cdot \frac{c0}{w}\right)\right)}\right) \]
    9. Step-by-step derivation
      1. *-lft-identity53.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{d \cdot d}{D \cdot \left(D \cdot h\right)} \cdot \frac{c0}{w}\right)}\right) \]
      2. times-frac55.1%

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

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

        \[\leadsto \color{blue}{\frac{c0 \cdot \left(2 \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D \cdot h}\right) \cdot \frac{c0}{w}\right)\right)}{2 \cdot w}} \]
      2. *-commutative55.1%

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

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

        \[\leadsto \frac{c0 \cdot \left(\left(\frac{d}{D} \cdot \left(\frac{d}{D \cdot h} \cdot \frac{c0}{w}\right)\right) \cdot 2\right)}{\color{blue}{w \cdot 2}} \]
    12. Applied egg-rr57.3%

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

        \[\leadsto \color{blue}{\frac{c0}{w \cdot 2} \cdot \left(\left(\frac{d}{D} \cdot \left(\frac{d}{D \cdot h} \cdot \frac{c0}{w}\right)\right) \cdot 2\right)} \]
      2. *-commutative58.4%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left(\frac{d}{D} \cdot \left(\frac{d}{D \cdot h} \cdot \frac{c0}{w}\right)\right)\right)} \cdot \frac{c0}{w \cdot 2} \]
      4. *-commutative58.4%

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

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

      \[\leadsto \left(2 \cdot \left(\frac{d}{D} \cdot \color{blue}{\frac{d \cdot c0}{D \cdot \left(w \cdot h\right)}}\right)\right) \cdot \frac{c0}{2 \cdot w} \]
    16. Step-by-step derivation
      1. times-frac58.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \cdot M \leq 2 \cdot 10^{+117}:\\ \;\;\;\;0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{d}{D} \cdot \left(\frac{d}{D} \cdot \frac{c0}{w \cdot h}\right)\right)\right)\\ \end{array} \]

Alternative 3: 42.9% accurate, 7.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := h \cdot \left(M \cdot M\right)\\ \mathbf{if}\;D \leq 7.2 \cdot 10^{-146}:\\ \;\;\;\;0.25 \cdot \frac{D}{\frac{\frac{d \cdot d}{t_0}}{D}}\\ \mathbf{elif}\;D \leq 6.6 \cdot 10^{-137}:\\ \;\;\;\;\frac{d \cdot d}{\frac{h \cdot \left(\left(D \cdot D\right) \cdot \left(w \cdot w\right)\right)}{c0 \cdot c0}}\\ \mathbf{elif}\;D \leq 3.8 \cdot 10^{+75}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(t_0 \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* h (* M M))))
   (if (<= D 7.2e-146)
     (* 0.25 (/ D (/ (/ (* d d) t_0) D)))
     (if (<= D 6.6e-137)
       (/ (* d d) (/ (* h (* (* D D) (* w w))) (* c0 c0)))
       (if (<= D 3.8e+75)
         (* 0.25 (/ (* D D) (* (/ d (* h M)) (/ d M))))
         (* 0.25 (* t_0 (* (/ D d) (/ D d)))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = h * (M * M);
	double tmp;
	if (D <= 7.2e-146) {
		tmp = 0.25 * (D / (((d * d) / t_0) / D));
	} else if (D <= 6.6e-137) {
		tmp = (d * d) / ((h * ((D * D) * (w * w))) / (c0 * c0));
	} else if (D <= 3.8e+75) {
		tmp = 0.25 * ((D * D) / ((d / (h * M)) * (d / M)));
	} else {
		tmp = 0.25 * (t_0 * ((D / d) * (D / d)));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = h * (m * m)
    if (d <= 7.2d-146) then
        tmp = 0.25d0 * (d / (((d_1 * d_1) / t_0) / d))
    else if (d <= 6.6d-137) then
        tmp = (d_1 * d_1) / ((h * ((d * d) * (w * w))) / (c0 * c0))
    else if (d <= 3.8d+75) then
        tmp = 0.25d0 * ((d * d) / ((d_1 / (h * m)) * (d_1 / m)))
    else
        tmp = 0.25d0 * (t_0 * ((d / d_1) * (d / 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 = h * (M * M);
	double tmp;
	if (D <= 7.2e-146) {
		tmp = 0.25 * (D / (((d * d) / t_0) / D));
	} else if (D <= 6.6e-137) {
		tmp = (d * d) / ((h * ((D * D) * (w * w))) / (c0 * c0));
	} else if (D <= 3.8e+75) {
		tmp = 0.25 * ((D * D) / ((d / (h * M)) * (d / M)));
	} else {
		tmp = 0.25 * (t_0 * ((D / d) * (D / d)));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = h * (M * M)
	tmp = 0
	if D <= 7.2e-146:
		tmp = 0.25 * (D / (((d * d) / t_0) / D))
	elif D <= 6.6e-137:
		tmp = (d * d) / ((h * ((D * D) * (w * w))) / (c0 * c0))
	elif D <= 3.8e+75:
		tmp = 0.25 * ((D * D) / ((d / (h * M)) * (d / M)))
	else:
		tmp = 0.25 * (t_0 * ((D / d) * (D / d)))
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(h * Float64(M * M))
	tmp = 0.0
	if (D <= 7.2e-146)
		tmp = Float64(0.25 * Float64(D / Float64(Float64(Float64(d * d) / t_0) / D)));
	elseif (D <= 6.6e-137)
		tmp = Float64(Float64(d * d) / Float64(Float64(h * Float64(Float64(D * D) * Float64(w * w))) / Float64(c0 * c0)));
	elseif (D <= 3.8e+75)
		tmp = Float64(0.25 * Float64(Float64(D * D) / Float64(Float64(d / Float64(h * M)) * Float64(d / M))));
	else
		tmp = Float64(0.25 * Float64(t_0 * Float64(Float64(D / d) * Float64(D / d))));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = h * (M * M);
	tmp = 0.0;
	if (D <= 7.2e-146)
		tmp = 0.25 * (D / (((d * d) / t_0) / D));
	elseif (D <= 6.6e-137)
		tmp = (d * d) / ((h * ((D * D) * (w * w))) / (c0 * c0));
	elseif (D <= 3.8e+75)
		tmp = 0.25 * ((D * D) / ((d / (h * M)) * (d / M)));
	else
		tmp = 0.25 * (t_0 * ((D / d) * (D / d)));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[D, 7.2e-146], N[(0.25 * N[(D / N[(N[(N[(d * d), $MachinePrecision] / t$95$0), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 6.6e-137], N[(N[(d * d), $MachinePrecision] / N[(N[(h * N[(N[(D * D), $MachinePrecision] * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c0 * c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 3.8e+75], N[(0.25 * N[(N[(D * D), $MachinePrecision] / N[(N[(d / N[(h * M), $MachinePrecision]), $MachinePrecision] * N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(t$95$0 * N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;D \leq 6.6 \cdot 10^{-137}:\\
\;\;\;\;\frac{d \cdot d}{\frac{h \cdot \left(\left(D \cdot D\right) \cdot \left(w \cdot w\right)\right)}{c0 \cdot c0}}\\

\mathbf{elif}\;D \leq 3.8 \cdot 10^{+75}:\\
\;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if D < 7.19999999999999957e-146

    1. Initial program 24.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. Step-by-step derivation
      1. times-frac22.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def22.9%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares32.0%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef36.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/33.8%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      4. fma-udef32.6%

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/32.5%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac32.5%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/32.5%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac33.7%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr3.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow23.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-6.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses28.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow228.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified28.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 20.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg20.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg20.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/20.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*21.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow221.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow221.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow221.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*21.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac21.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow221.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow221.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac21.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow221.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative21.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified21.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 36.1%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow236.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative36.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow236.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*36.4%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow236.4%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow236.4%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow236.4%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative36.4%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified36.4%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}} \]
    14. Step-by-step derivation
      1. *-un-lft-identity36.4%

        \[\leadsto 0.25 \cdot \color{blue}{\left(1 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}\right)} \]
      2. associate-/l*45.8%

        \[\leadsto 0.25 \cdot \left(1 \cdot \color{blue}{\frac{D}{\frac{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}{D}}}\right) \]
    15. Applied egg-rr45.8%

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

    if 7.19999999999999957e-146 < D < 6.6000000000000004e-137

    1. Initial program 80.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. associate-*l*80.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. difference-of-squares80.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M\right)}}\right) \]
      3. associate-*l*80.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M\right)}\right) \]
      4. associate-*l*80.0%

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

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

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

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

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

        \[\leadsto \frac{d \cdot d}{\frac{\color{blue}{\left({D}^{2} \cdot {w}^{2}\right) \cdot h}}{{c0}^{2}}} \]
      4. unpow280.0%

        \[\leadsto \frac{d \cdot d}{\frac{\left(\color{blue}{\left(D \cdot D\right)} \cdot {w}^{2}\right) \cdot h}{{c0}^{2}}} \]
      5. unpow280.0%

        \[\leadsto \frac{d \cdot d}{\frac{\left(\left(D \cdot D\right) \cdot \color{blue}{\left(w \cdot w\right)}\right) \cdot h}{{c0}^{2}}} \]
      6. unpow280.0%

        \[\leadsto \frac{d \cdot d}{\frac{\left(\left(D \cdot D\right) \cdot \left(w \cdot w\right)\right) \cdot h}{\color{blue}{c0 \cdot c0}}} \]
    6. Simplified80.0%

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

    if 6.6000000000000004e-137 < D < 3.8000000000000002e75

    1. Initial program 33.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. times-frac33.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def31.7%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares41.6%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef41.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/41.5%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      4. fma-udef41.5%

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/41.5%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac41.5%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/41.5%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac43.4%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr3.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow23.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-6.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses12.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow212.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified12.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 14.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg14.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg14.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/14.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*14.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow214.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow214.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow214.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*14.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac10.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow210.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow210.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac10.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow210.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative10.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified12.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 40.1%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow240.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative40.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow240.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*40.3%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow240.3%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow240.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow240.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative40.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified40.3%

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

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{{d}^{2}}{h \cdot {M}^{2}}}} \]
    15. Step-by-step derivation
      1. unpow240.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{h \cdot {M}^{2}}} \]
      2. unpow240.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}} \]
      3. associate-*r*45.8%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(h \cdot M\right) \cdot M}}} \]
      4. times-frac55.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}} \]
    16. Simplified55.6%

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}} \]

    if 3.8000000000000002e75 < D

    1. Initial program 14.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. times-frac13.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def13.9%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares18.5%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef23.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/23.1%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      4. fma-udef18.5%

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/18.5%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac18.4%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/18.4%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac18.6%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr4.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow24.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-9.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses18.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow218.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified18.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 9.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg9.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg9.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/9.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*4.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow24.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow24.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow24.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*4.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac9.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow29.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow29.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac9.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow29.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative9.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified9.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 23.4%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow223.4%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative23.4%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow223.4%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*19.1%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow219.1%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow219.1%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow219.1%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative19.1%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified19.1%

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

      \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    15. Step-by-step derivation
      1. *-commutative23.4%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{\left(h \cdot {M}^{2}\right) \cdot {D}^{2}}}{{d}^{2}} \]
      2. unpow223.4%

        \[\leadsto 0.25 \cdot \frac{\left(h \cdot \color{blue}{\left(M \cdot M\right)}\right) \cdot {D}^{2}}{{d}^{2}} \]
      3. associate-*r/23.3%

        \[\leadsto 0.25 \cdot \color{blue}{\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{{D}^{2}}{{d}^{2}}\right)} \]
      4. unpow223.3%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{\color{blue}{D \cdot D}}{{d}^{2}}\right) \]
      5. unpow223.3%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{\color{blue}{d \cdot d}}\right) \]
      6. times-frac55.1%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)}\right) \]
    16. Simplified55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 7.2 \cdot 10^{-146}:\\ \;\;\;\;0.25 \cdot \frac{D}{\frac{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}{D}}\\ \mathbf{elif}\;D \leq 6.6 \cdot 10^{-137}:\\ \;\;\;\;\frac{d \cdot d}{\frac{h \cdot \left(\left(D \cdot D\right) \cdot \left(w \cdot w\right)\right)}{c0 \cdot c0}}\\ \mathbf{elif}\;D \leq 3.8 \cdot 10^{+75}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\ \end{array} \]

Alternative 4: 43.2% accurate, 7.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 2.4 \cdot 10^{-184} \lor \neg \left(D \leq 6.8 \cdot 10^{+101}\right):\\ \;\;\;\;0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h} \cdot \frac{d}{M \cdot M}}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (or (<= D 2.4e-184) (not (<= D 6.8e+101)))
   (* 0.25 (* (* h (* M M)) (* (/ D d) (/ D d))))
   (* 0.25 (/ (* D D) (* (/ d h) (/ d (* M M)))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((D <= 2.4e-184) || !(D <= 6.8e+101)) {
		tmp = 0.25 * ((h * (M * M)) * ((D / d) * (D / d)));
	} else {
		tmp = 0.25 * ((D * D) / ((d / h) * (d / (M * M))));
	}
	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 <= 2.4d-184) .or. (.not. (d <= 6.8d+101))) then
        tmp = 0.25d0 * ((h * (m * m)) * ((d / d_1) * (d / d_1)))
    else
        tmp = 0.25d0 * ((d * d) / ((d_1 / h) * (d_1 / (m * m))))
    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 <= 2.4e-184) || !(D <= 6.8e+101)) {
		tmp = 0.25 * ((h * (M * M)) * ((D / d) * (D / d)));
	} else {
		tmp = 0.25 * ((D * D) / ((d / h) * (d / (M * M))));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if (D <= 2.4e-184) or not (D <= 6.8e+101):
		tmp = 0.25 * ((h * (M * M)) * ((D / d) * (D / d)))
	else:
		tmp = 0.25 * ((D * D) / ((d / h) * (d / (M * M))))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if ((D <= 2.4e-184) || !(D <= 6.8e+101))
		tmp = Float64(0.25 * Float64(Float64(h * Float64(M * M)) * Float64(Float64(D / d) * Float64(D / d))));
	else
		tmp = Float64(0.25 * Float64(Float64(D * D) / Float64(Float64(d / h) * Float64(d / Float64(M * M)))));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if ((D <= 2.4e-184) || ~((D <= 6.8e+101)))
		tmp = 0.25 * ((h * (M * M)) * ((D / d) * (D / d)));
	else
		tmp = 0.25 * ((D * D) / ((d / h) * (d / (M * M))));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[Or[LessEqual[D, 2.4e-184], N[Not[LessEqual[D, 6.8e+101]], $MachinePrecision]], N[(0.25 * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(N[(D * D), $MachinePrecision] / N[(N[(d / h), $MachinePrecision] * N[(d / N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \leq 2.4 \cdot 10^{-184} \lor \neg \left(D \leq 6.8 \cdot 10^{+101}\right):\\
\;\;\;\;0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h} \cdot \frac{d}{M \cdot M}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if D < 2.40000000000000024e-184 or 6.80000000000000034e101 < D

    1. Initial program 23.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. Step-by-step derivation
      1. times-frac22.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def22.0%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares30.7%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef35.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/32.9%

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

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

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/31.1%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac31.1%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/31.1%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac32.3%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr3.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow23.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-6.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses26.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow226.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified26.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 18.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg18.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg18.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/18.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*18.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow218.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow218.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow218.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*18.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac18.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow218.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow218.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac19.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow219.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative19.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified19.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 33.0%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow233.0%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative33.0%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow233.0%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*32.7%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow232.7%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow232.7%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow232.7%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative32.7%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified32.7%

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

      \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    15. Step-by-step derivation
      1. *-commutative33.0%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{\left(h \cdot {M}^{2}\right) \cdot {D}^{2}}}{{d}^{2}} \]
      2. unpow233.0%

        \[\leadsto 0.25 \cdot \frac{\left(h \cdot \color{blue}{\left(M \cdot M\right)}\right) \cdot {D}^{2}}{{d}^{2}} \]
      3. associate-*r/32.4%

        \[\leadsto 0.25 \cdot \color{blue}{\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{{D}^{2}}{{d}^{2}}\right)} \]
      4. unpow232.4%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{\color{blue}{D \cdot D}}{{d}^{2}}\right) \]
      5. unpow232.4%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{\color{blue}{d \cdot d}}\right) \]
      6. times-frac45.1%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)}\right) \]
    16. Simplified45.1%

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

    if 2.40000000000000024e-184 < D < 6.80000000000000034e101

    1. Initial program 34.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. times-frac34.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def33.1%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares41.8%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef41.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/41.7%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      4. fma-udef41.7%

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/41.7%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac41.7%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/41.7%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac43.0%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr4.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow24.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-5.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow216.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified16.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 16.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg16.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg16.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/16.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*16.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow216.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow216.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow216.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*16.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac15.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow215.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow215.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac15.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow215.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative15.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified16.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 41.1%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow241.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative41.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow241.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*41.3%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow241.3%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow241.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow241.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative41.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified41.3%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}} \]
    14. Step-by-step derivation
      1. times-frac48.1%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{d}{h} \cdot \frac{d}{M \cdot M}}} \]
    15. Applied egg-rr48.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 2.4 \cdot 10^{-184} \lor \neg \left(D \leq 6.8 \cdot 10^{+101}\right):\\ \;\;\;\;0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h} \cdot \frac{d}{M \cdot M}}\\ \end{array} \]

Alternative 5: 44.2% accurate, 7.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 2.15 \cdot 10^{-184} \lor \neg \left(D \leq 3.9 \cdot 10^{+75}\right):\\ \;\;\;\;0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (or (<= D 2.15e-184) (not (<= D 3.9e+75)))
   (* 0.25 (* (* h (* M M)) (* (/ D d) (/ D d))))
   (* 0.25 (/ (* D D) (* (/ d (* h M)) (/ d M))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((D <= 2.15e-184) || !(D <= 3.9e+75)) {
		tmp = 0.25 * ((h * (M * M)) * ((D / d) * (D / d)));
	} else {
		tmp = 0.25 * ((D * D) / ((d / (h * M)) * (d / M)));
	}
	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 <= 2.15d-184) .or. (.not. (d <= 3.9d+75))) then
        tmp = 0.25d0 * ((h * (m * m)) * ((d / d_1) * (d / d_1)))
    else
        tmp = 0.25d0 * ((d * d) / ((d_1 / (h * m)) * (d_1 / m)))
    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 <= 2.15e-184) || !(D <= 3.9e+75)) {
		tmp = 0.25 * ((h * (M * M)) * ((D / d) * (D / d)));
	} else {
		tmp = 0.25 * ((D * D) / ((d / (h * M)) * (d / M)));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if (D <= 2.15e-184) or not (D <= 3.9e+75):
		tmp = 0.25 * ((h * (M * M)) * ((D / d) * (D / d)))
	else:
		tmp = 0.25 * ((D * D) / ((d / (h * M)) * (d / M)))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if ((D <= 2.15e-184) || !(D <= 3.9e+75))
		tmp = Float64(0.25 * Float64(Float64(h * Float64(M * M)) * Float64(Float64(D / d) * Float64(D / d))));
	else
		tmp = Float64(0.25 * Float64(Float64(D * D) / Float64(Float64(d / Float64(h * M)) * Float64(d / M))));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if ((D <= 2.15e-184) || ~((D <= 3.9e+75)))
		tmp = 0.25 * ((h * (M * M)) * ((D / d) * (D / d)));
	else
		tmp = 0.25 * ((D * D) / ((d / (h * M)) * (d / M)));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[Or[LessEqual[D, 2.15e-184], N[Not[LessEqual[D, 3.9e+75]], $MachinePrecision]], N[(0.25 * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(N[(D * D), $MachinePrecision] / N[(N[(d / N[(h * M), $MachinePrecision]), $MachinePrecision] * N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \leq 2.15 \cdot 10^{-184} \lor \neg \left(D \leq 3.9 \cdot 10^{+75}\right):\\
\;\;\;\;0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if D < 2.15000000000000003e-184 or 3.90000000000000038e75 < D

    1. Initial program 23.6%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. times-frac21.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def21.9%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares30.4%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef34.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/32.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      3. times-frac30.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      4. fma-udef30.9%

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/30.8%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac30.8%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/30.8%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac31.9%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr3.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow23.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-6.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses26.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow226.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified26.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 18.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg18.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg18.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/18.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*18.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow218.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow218.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow218.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*18.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac19.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow219.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow219.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac19.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow219.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative19.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified19.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 33.7%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow233.7%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative33.7%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow233.7%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*33.5%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow233.5%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow233.5%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow233.5%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative33.5%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified33.5%

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

      \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    15. Step-by-step derivation
      1. *-commutative33.7%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{\left(h \cdot {M}^{2}\right) \cdot {D}^{2}}}{{d}^{2}} \]
      2. unpow233.7%

        \[\leadsto 0.25 \cdot \frac{\left(h \cdot \color{blue}{\left(M \cdot M\right)}\right) \cdot {D}^{2}}{{d}^{2}} \]
      3. associate-*r/33.2%

        \[\leadsto 0.25 \cdot \color{blue}{\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{{D}^{2}}{{d}^{2}}\right)} \]
      4. unpow233.2%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{\color{blue}{D \cdot D}}{{d}^{2}}\right) \]
      5. unpow233.2%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{\color{blue}{d \cdot d}}\right) \]
      6. times-frac45.5%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)}\right) \]
    16. Simplified45.5%

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

    if 2.15000000000000003e-184 < D < 3.90000000000000038e75

    1. Initial program 35.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. times-frac35.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def34.1%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares43.4%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef43.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/43.3%

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

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

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/43.4%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac43.4%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/43.4%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac44.8%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr3.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow23.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-4.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses14.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow214.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified14.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 16.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow216.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow216.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow216.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac13.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow213.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow213.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac13.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow213.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative13.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified14.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 39.5%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow239.5%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative39.5%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow239.5%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*39.6%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow239.6%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow239.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow239.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative39.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified39.6%

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

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{{d}^{2}}{h \cdot {M}^{2}}}} \]
    15. Step-by-step derivation
      1. unpow239.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{h \cdot {M}^{2}}} \]
      2. unpow239.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}} \]
      3. associate-*r*45.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(h \cdot M\right) \cdot M}}} \]
      4. times-frac53.2%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}} \]
    16. Simplified53.2%

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 2.15 \cdot 10^{-184} \lor \neg \left(D \leq 3.9 \cdot 10^{+75}\right):\\ \;\;\;\;0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}\\ \end{array} \]

Alternative 6: 43.3% accurate, 7.9× speedup?

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

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

\mathbf{elif}\;D \leq 4 \cdot 10^{+75}:\\
\;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if D < 2.2999999999999999e-184

    1. Initial program 24.8%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. times-frac23.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def23.0%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares32.0%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef36.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/33.8%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      4. fma-udef32.5%

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/32.4%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac32.4%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/32.4%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac33.7%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr3.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow23.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-6.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses27.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow227.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified27.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 20.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg20.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg20.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/20.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*20.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow220.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow220.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow220.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*20.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac20.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow220.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow220.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac21.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow221.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative21.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified21.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 35.1%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow235.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative35.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow235.1%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*35.3%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow235.3%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow235.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow235.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative35.3%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified35.3%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}} \]
    14. Step-by-step derivation
      1. *-un-lft-identity35.3%

        \[\leadsto 0.25 \cdot \color{blue}{\left(1 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}\right)} \]
      2. associate-/l*44.6%

        \[\leadsto 0.25 \cdot \left(1 \cdot \color{blue}{\frac{D}{\frac{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}{D}}}\right) \]
    15. Applied egg-rr44.6%

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

    if 2.2999999999999999e-184 < D < 3.99999999999999971e75

    1. Initial program 35.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. times-frac35.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def34.1%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares43.4%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef43.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/43.3%

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

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

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/43.4%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac43.4%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/43.4%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac44.8%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr3.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow23.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-4.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses14.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow214.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified14.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 16.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow216.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow216.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow216.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*16.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac13.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow213.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow213.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac13.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow213.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative13.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified14.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 39.5%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow239.5%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative39.5%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow239.5%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*39.6%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow239.6%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow239.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow239.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative39.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified39.6%

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

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{{d}^{2}}{h \cdot {M}^{2}}}} \]
    15. Step-by-step derivation
      1. unpow239.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{h \cdot {M}^{2}}} \]
      2. unpow239.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}} \]
      3. associate-*r*45.6%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(h \cdot M\right) \cdot M}}} \]
      4. times-frac53.2%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}} \]
    16. Simplified53.2%

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}} \]

    if 3.99999999999999971e75 < D

    1. Initial program 14.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. times-frac13.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def13.9%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
      4. difference-of-squares18.5%

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

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    4. Step-by-step derivation
      1. fma-udef23.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
      2. associate-/l/23.1%

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      4. fma-udef18.5%

        \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      5. associate-/l/18.5%

        \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      6. times-frac18.4%

        \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
      7. associate-/l/18.4%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
      8. times-frac18.6%

        \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
    5. Applied egg-rr4.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    6. Step-by-step derivation
      1. unpow24.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      2. associate--r-9.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      3. +-inverses18.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
      4. unpow218.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    7. Simplified18.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in c0 around -inf 9.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    9. Step-by-step derivation
      1. mul-1-neg9.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
      2. unsub-neg9.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
      3. associate-*r/9.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      4. associate-*r*4.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      5. unpow24.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      6. unpow24.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      7. unpow24.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      8. associate-*r*4.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
      9. times-frac9.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
      10. unpow29.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      11. unpow29.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
      12. times-frac9.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
      13. unpow29.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
      14. *-commutative9.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
    10. Simplified9.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
    11. Taylor expanded in c0 around inf 23.4%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. unpow223.4%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
      2. *-commutative23.4%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
      3. unpow223.4%

        \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
      4. associate-/l*19.1%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
      5. unpow219.1%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
      6. unpow219.1%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
      7. unpow219.1%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
      8. *-commutative19.1%

        \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
    13. Simplified19.1%

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

      \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    15. Step-by-step derivation
      1. *-commutative23.4%

        \[\leadsto 0.25 \cdot \frac{\color{blue}{\left(h \cdot {M}^{2}\right) \cdot {D}^{2}}}{{d}^{2}} \]
      2. unpow223.4%

        \[\leadsto 0.25 \cdot \frac{\left(h \cdot \color{blue}{\left(M \cdot M\right)}\right) \cdot {D}^{2}}{{d}^{2}} \]
      3. associate-*r/23.3%

        \[\leadsto 0.25 \cdot \color{blue}{\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{{D}^{2}}{{d}^{2}}\right)} \]
      4. unpow223.3%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{\color{blue}{D \cdot D}}{{d}^{2}}\right) \]
      5. unpow223.3%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{\color{blue}{d \cdot d}}\right) \]
      6. times-frac55.1%

        \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)}\right) \]
    16. Simplified55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 2.3 \cdot 10^{-184}:\\ \;\;\;\;0.25 \cdot \frac{D}{\frac{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}{D}}\\ \mathbf{elif}\;D \leq 4 \cdot 10^{+75}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot D}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\ \end{array} \]

Alternative 7: 42.4% accurate, 10.1× speedup?

\[\begin{array}{l} \\ 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right) \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (* 0.25 (* (* h (* M M)) (* (/ D d) (/ D d)))))
double code(double c0, double w, double h, double D, double d, double M) {
	return 0.25 * ((h * (M * M)) * ((D / d) * (D / d)));
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = 0.25d0 * ((h * (m * m)) * ((d / d_1) * (d / d_1)))
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return 0.25 * ((h * (M * M)) * ((D / d) * (D / d)));
}
def code(c0, w, h, D, d, M):
	return 0.25 * ((h * (M * M)) * ((D / d) * (D / d)))
function code(c0, w, h, D, d, M)
	return Float64(0.25 * Float64(Float64(h * Float64(M * M)) * Float64(Float64(D / d) * Float64(D / d))))
end
function tmp = code(c0, w, h, D, d, M)
	tmp = 0.25 * ((h * (M * M)) * ((D / d) * (D / d)));
end
code[c0_, w_, h_, D_, d_, M_] := N[(0.25 * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)
\end{array}
Derivation
  1. Initial program 26.6%

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
  2. Step-by-step derivation
    1. times-frac25.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. fma-def25.0%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{\frac{d \cdot d}{D}}{D}}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    4. difference-of-squares33.7%

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

    \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
  4. Step-by-step derivation
    1. fma-udef36.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right)} \]
    2. associate-/l/35.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
    3. times-frac34.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{\frac{d \cdot d}{D}}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
    4. fma-udef34.1%

      \[\leadsto \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{\color{blue}{\left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} + M\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
    5. associate-/l/34.0%

      \[\leadsto \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{\left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
    6. times-frac34.0%

      \[\leadsto \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{\left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{\frac{d \cdot d}{D}}{D} - M\right)}\right) \]
    7. associate-/l/34.0%

      \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} - M\right)}\right) \]
    8. times-frac35.2%

      \[\leadsto \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{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} - M\right)}\right) \]
  5. Applied egg-rr3.7%

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
  6. Step-by-step derivation
    1. unpow23.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - \color{blue}{{M}^{2}}\right)}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    2. associate--r-6.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{\left({\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - {\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2}\right) + {M}^{2}}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    3. +-inverses23.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\color{blue}{0} + {M}^{2}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
    4. unpow223.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + \color{blue}{M \cdot M}}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}} \]
  7. Simplified23.6%

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
  8. Taylor expanded in c0 around -inf 18.1%

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
  9. Step-by-step derivation
    1. mul-1-neg18.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} + \color{blue}{\left(-\frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right)} \]
    2. unsub-neg18.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}} \]
    3. associate-*r/18.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\color{blue}{\frac{0.5 \cdot \left({D}^{2} \cdot \left(w \cdot \left(h \cdot {M}^{2}\right)\right)\right)}{{d}^{2} \cdot c0}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
    4. associate-*r*18.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \color{blue}{\left(\left({D}^{2} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
    5. unpow218.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\color{blue}{\left(D \cdot D\right)} \cdot w\right) \cdot \left(h \cdot {M}^{2}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
    6. unpow218.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)\right)}{{d}^{2} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
    7. unpow218.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{\left(d \cdot d\right)} \cdot c0} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
    8. associate-*r*18.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\color{blue}{d \cdot \left(d \cdot c0\right)}} - \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \]
    9. times-frac17.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}}\right)} \]
    10. unpow217.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
    11. unpow217.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{c0}{w \cdot h}\right)} \]
    12. times-frac18.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{\left(\frac{d}{D} \cdot \frac{d}{D}\right)} \cdot \frac{c0}{w \cdot h}\right)} \]
    13. unpow218.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \color{blue}{{\left(\frac{d}{D}\right)}^{2}} \cdot \frac{c0}{w \cdot h}\right)} \]
    14. *-commutative18.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - {\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{\color{blue}{h \cdot w}}\right)} \]
  10. Simplified18.6%

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \color{blue}{\left(\frac{0.5 \cdot \left(\left(\left(D \cdot D\right) \cdot w\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot \left(d \cdot c0\right)} - \frac{\frac{c0}{h}}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}} \]
  11. Taylor expanded in c0 around inf 35.2%

    \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
  12. Step-by-step derivation
    1. unpow235.2%

      \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}{{d}^{2}} \]
    2. *-commutative35.2%

      \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot h\right)}}{{d}^{2}} \]
    3. unpow235.2%

      \[\leadsto 0.25 \cdot \frac{{D}^{2} \cdot \left(\color{blue}{{M}^{2}} \cdot h\right)}{{d}^{2}} \]
    4. associate-/l*35.0%

      \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{{M}^{2} \cdot h}}} \]
    5. unpow235.0%

      \[\leadsto 0.25 \cdot \frac{\color{blue}{D \cdot D}}{\frac{{d}^{2}}{{M}^{2} \cdot h}} \]
    6. unpow235.0%

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{\color{blue}{d \cdot d}}{{M}^{2} \cdot h}} \]
    7. unpow235.0%

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{\left(M \cdot M\right)} \cdot h}} \]
    8. *-commutative35.0%

      \[\leadsto 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot \left(M \cdot M\right)}}} \]
  13. Simplified35.0%

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

    \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
  15. Step-by-step derivation
    1. *-commutative35.2%

      \[\leadsto 0.25 \cdot \frac{\color{blue}{\left(h \cdot {M}^{2}\right) \cdot {D}^{2}}}{{d}^{2}} \]
    2. unpow235.2%

      \[\leadsto 0.25 \cdot \frac{\left(h \cdot \color{blue}{\left(M \cdot M\right)}\right) \cdot {D}^{2}}{{d}^{2}} \]
    3. associate-*r/34.1%

      \[\leadsto 0.25 \cdot \color{blue}{\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{{D}^{2}}{{d}^{2}}\right)} \]
    4. unpow234.1%

      \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{\color{blue}{D \cdot D}}{{d}^{2}}\right) \]
    5. unpow234.1%

      \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{\color{blue}{d \cdot d}}\right) \]
    6. times-frac43.3%

      \[\leadsto 0.25 \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)}\right) \]
  16. Simplified43.3%

    \[\leadsto 0.25 \cdot \color{blue}{\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)} \]
  17. Final simplification43.3%

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

Alternative 8: 33.9% accurate, 30.2× speedup?

\[\begin{array}{l} \\ -0.5 \cdot \frac{0}{w} \end{array} \]
(FPCore (c0 w h D d M) :precision binary64 (* -0.5 (/ 0.0 w)))
double code(double c0, double w, double h, double D, double d, double M) {
	return -0.5 * (0.0 / w);
}
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.5d0) * (0.0d0 / w)
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return -0.5 * (0.0 / w);
}
def code(c0, w, h, D, d, M):
	return -0.5 * (0.0 / w)
function code(c0, w, h, D, d, M)
	return Float64(-0.5 * Float64(0.0 / w))
end
function tmp = code(c0, w, h, D, d, M)
	tmp = -0.5 * (0.0 / w);
end
code[c0_, w_, h_, D_, d_, M_] := N[(-0.5 * N[(0.0 / w), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
-0.5 \cdot \frac{0}{w}
\end{array}
Derivation
  1. Initial program 26.6%

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
  2. Step-by-step derivation
    1. associate-*l*25.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. difference-of-squares34.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M\right)}}\right) \]
    3. associate-*l*34.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M\right)}\right) \]
    4. associate-*l*35.5%

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

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

    \[\leadsto \color{blue}{-0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}} \]
  5. Step-by-step derivation
    1. *-commutative3.0%

      \[\leadsto -0.5 \cdot \frac{\color{blue}{{c0}^{2} \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}}{w} \]
    2. unpow23.0%

      \[\leadsto -0.5 \cdot \frac{\color{blue}{\left(c0 \cdot c0\right)} \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}{w} \]
    3. distribute-rgt1-in3.0%

      \[\leadsto -0.5 \cdot \frac{\left(c0 \cdot c0\right) \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}}{w} \]
    4. metadata-eval3.0%

      \[\leadsto -0.5 \cdot \frac{\left(c0 \cdot c0\right) \cdot \left(\color{blue}{0} \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}{w} \]
    5. mul0-lft25.4%

      \[\leadsto -0.5 \cdot \frac{\left(c0 \cdot c0\right) \cdot \color{blue}{0}}{w} \]
  6. Simplified25.4%

    \[\leadsto \color{blue}{-0.5 \cdot \frac{\left(c0 \cdot c0\right) \cdot 0}{w}} \]
  7. Taylor expanded in c0 around 0 32.7%

    \[\leadsto -0.5 \cdot \frac{\color{blue}{0}}{w} \]
  8. Final simplification32.7%

    \[\leadsto -0.5 \cdot \frac{0}{w} \]

Reproduce

?
herbie shell --seed 2023250 
(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))))))