Henrywood and Agarwal, Equation (13)

Percentage Accurate: 25.0% → 66.6%
Time: 37.7s
Alternatives: 8
Speedup: 151.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 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: 25.0% accurate, 1.0× speedup?

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

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

Alternative 1: 66.6% accurate, 0.9× speedup?

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

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

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


\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 78.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-frac76.1%

        \[\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-def76.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. times-frac76.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{d}{D} \cdot \frac{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-squares76.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{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. Simplified75.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, 1 \cdot \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot \left(h \cdot D\right)}, d \cdot \frac{d}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{{\left(\frac{d}{D}\right)}^{2}} - M\right)}\right) \]
    5. Applied egg-rr77.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\left(\frac{c0}{\frac{w \cdot h}{{\left(\frac{d}{D}\right)}^{2}}} - M\right) \cdot \color{blue}{\left(\frac{c0}{w \cdot \left(h \cdot D\right)} \cdot \frac{d}{\frac{D}{d}} + M\right)}}\right) \]
    10. Taylor expanded in c0 around inf 80.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)} \]
    11. Step-by-step derivation
      1. associate-/r*80.8%

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

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

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

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

    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. Taylor expanded in c0 around -inf 2.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def2.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*2.9%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*2.9%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
    5. Taylor expanded in c0 around 0 46.7%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    6. Step-by-step derivation
      1. associate-/l*46.8%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}} \]
      2. *-commutative46.8%

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

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

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

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

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

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

        \[\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*53.1%

        \[\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) \]
      3. associate-/l*63.7%

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

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

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

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

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

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

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

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

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

Alternative 2: 43.7% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := d \cdot \frac{d}{D}\\ t_1 := 0.25 \cdot \left(D \cdot \frac{D}{\frac{d}{\frac{h}{\frac{d}{M \cdot M}}}}\right)\\ t_2 := h \cdot \left(M \cdot M\right)\\ \mathbf{if}\;h \leq -6.8 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq -1.6 \cdot 10^{-224}:\\ \;\;\;\;t_0 \cdot \frac{\frac{c0}{w} \cdot \frac{\frac{c0}{h}}{w}}{D}\\ \mathbf{elif}\;h \leq 5.5 \cdot 10^{-200}:\\ \;\;\;\;0.25 \cdot \frac{D}{\frac{d \cdot \frac{d}{t_2}}{D}}\\ \mathbf{elif}\;h \leq 7.6 \cdot 10^{-140}:\\ \;\;\;\;t_0 \cdot \frac{c0 \cdot c0}{D \cdot \left(w \cdot \left(w \cdot h\right)\right)}\\ \mathbf{elif}\;h \leq 4.5 \cdot 10^{-8}:\\ \;\;\;\;0.25 \cdot \left(t_2 \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\ \mathbf{elif}\;h \leq 420000000000 \lor \neg \left(h \leq 5 \cdot 10^{+88}\right):\\ \;\;\;\;d \cdot \left(\frac{d}{D} \cdot \left(\frac{c0}{h} \cdot \frac{\frac{c0}{w \cdot w}}{D}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* d (/ d D)))
        (t_1 (* 0.25 (* D (/ D (/ d (/ h (/ d (* M M))))))))
        (t_2 (* h (* M M))))
   (if (<= h -6.8e-19)
     t_1
     (if (<= h -1.6e-224)
       (* t_0 (/ (* (/ c0 w) (/ (/ c0 h) w)) D))
       (if (<= h 5.5e-200)
         (* 0.25 (/ D (/ (* d (/ d t_2)) D)))
         (if (<= h 7.6e-140)
           (* t_0 (/ (* c0 c0) (* D (* w (* w h)))))
           (if (<= h 4.5e-8)
             (* 0.25 (* t_2 (* (/ D d) (/ D d))))
             (if (or (<= h 420000000000.0) (not (<= h 5e+88)))
               (* d (* (/ d D) (* (/ c0 h) (/ (/ c0 (* w w)) D))))
               t_1))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = d * (d / D);
	double t_1 = 0.25 * (D * (D / (d / (h / (d / (M * M))))));
	double t_2 = h * (M * M);
	double tmp;
	if (h <= -6.8e-19) {
		tmp = t_1;
	} else if (h <= -1.6e-224) {
		tmp = t_0 * (((c0 / w) * ((c0 / h) / w)) / D);
	} else if (h <= 5.5e-200) {
		tmp = 0.25 * (D / ((d * (d / t_2)) / D));
	} else if (h <= 7.6e-140) {
		tmp = t_0 * ((c0 * c0) / (D * (w * (w * h))));
	} else if (h <= 4.5e-8) {
		tmp = 0.25 * (t_2 * ((D / d) * (D / d)));
	} else if ((h <= 420000000000.0) || !(h <= 5e+88)) {
		tmp = d * ((d / D) * ((c0 / h) * ((c0 / (w * w)) / D)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = d_1 * (d_1 / d)
    t_1 = 0.25d0 * (d * (d / (d_1 / (h / (d_1 / (m * m))))))
    t_2 = h * (m * m)
    if (h <= (-6.8d-19)) then
        tmp = t_1
    else if (h <= (-1.6d-224)) then
        tmp = t_0 * (((c0 / w) * ((c0 / h) / w)) / d)
    else if (h <= 5.5d-200) then
        tmp = 0.25d0 * (d / ((d_1 * (d_1 / t_2)) / d))
    else if (h <= 7.6d-140) then
        tmp = t_0 * ((c0 * c0) / (d * (w * (w * h))))
    else if (h <= 4.5d-8) then
        tmp = 0.25d0 * (t_2 * ((d / d_1) * (d / d_1)))
    else if ((h <= 420000000000.0d0) .or. (.not. (h <= 5d+88))) then
        tmp = d_1 * ((d_1 / d) * ((c0 / h) * ((c0 / (w * w)) / d)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = d * (d / D);
	double t_1 = 0.25 * (D * (D / (d / (h / (d / (M * M))))));
	double t_2 = h * (M * M);
	double tmp;
	if (h <= -6.8e-19) {
		tmp = t_1;
	} else if (h <= -1.6e-224) {
		tmp = t_0 * (((c0 / w) * ((c0 / h) / w)) / D);
	} else if (h <= 5.5e-200) {
		tmp = 0.25 * (D / ((d * (d / t_2)) / D));
	} else if (h <= 7.6e-140) {
		tmp = t_0 * ((c0 * c0) / (D * (w * (w * h))));
	} else if (h <= 4.5e-8) {
		tmp = 0.25 * (t_2 * ((D / d) * (D / d)));
	} else if ((h <= 420000000000.0) || !(h <= 5e+88)) {
		tmp = d * ((d / D) * ((c0 / h) * ((c0 / (w * w)) / D)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = d * (d / D)
	t_1 = 0.25 * (D * (D / (d / (h / (d / (M * M))))))
	t_2 = h * (M * M)
	tmp = 0
	if h <= -6.8e-19:
		tmp = t_1
	elif h <= -1.6e-224:
		tmp = t_0 * (((c0 / w) * ((c0 / h) / w)) / D)
	elif h <= 5.5e-200:
		tmp = 0.25 * (D / ((d * (d / t_2)) / D))
	elif h <= 7.6e-140:
		tmp = t_0 * ((c0 * c0) / (D * (w * (w * h))))
	elif h <= 4.5e-8:
		tmp = 0.25 * (t_2 * ((D / d) * (D / d)))
	elif (h <= 420000000000.0) or not (h <= 5e+88):
		tmp = d * ((d / D) * ((c0 / h) * ((c0 / (w * w)) / D)))
	else:
		tmp = t_1
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(d * Float64(d / D))
	t_1 = Float64(0.25 * Float64(D * Float64(D / Float64(d / Float64(h / Float64(d / Float64(M * M)))))))
	t_2 = Float64(h * Float64(M * M))
	tmp = 0.0
	if (h <= -6.8e-19)
		tmp = t_1;
	elseif (h <= -1.6e-224)
		tmp = Float64(t_0 * Float64(Float64(Float64(c0 / w) * Float64(Float64(c0 / h) / w)) / D));
	elseif (h <= 5.5e-200)
		tmp = Float64(0.25 * Float64(D / Float64(Float64(d * Float64(d / t_2)) / D)));
	elseif (h <= 7.6e-140)
		tmp = Float64(t_0 * Float64(Float64(c0 * c0) / Float64(D * Float64(w * Float64(w * h)))));
	elseif (h <= 4.5e-8)
		tmp = Float64(0.25 * Float64(t_2 * Float64(Float64(D / d) * Float64(D / d))));
	elseif ((h <= 420000000000.0) || !(h <= 5e+88))
		tmp = Float64(d * Float64(Float64(d / D) * Float64(Float64(c0 / h) * Float64(Float64(c0 / Float64(w * w)) / D))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = d * (d / D);
	t_1 = 0.25 * (D * (D / (d / (h / (d / (M * M))))));
	t_2 = h * (M * M);
	tmp = 0.0;
	if (h <= -6.8e-19)
		tmp = t_1;
	elseif (h <= -1.6e-224)
		tmp = t_0 * (((c0 / w) * ((c0 / h) / w)) / D);
	elseif (h <= 5.5e-200)
		tmp = 0.25 * (D / ((d * (d / t_2)) / D));
	elseif (h <= 7.6e-140)
		tmp = t_0 * ((c0 * c0) / (D * (w * (w * h))));
	elseif (h <= 4.5e-8)
		tmp = 0.25 * (t_2 * ((D / d) * (D / d)));
	elseif ((h <= 420000000000.0) || ~((h <= 5e+88)))
		tmp = d * ((d / D) * ((c0 / h) * ((c0 / (w * w)) / D)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.25 * N[(D * N[(D / N[(d / N[(h / N[(d / N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, -6.8e-19], t$95$1, If[LessEqual[h, -1.6e-224], N[(t$95$0 * N[(N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / h), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 5.5e-200], N[(0.25 * N[(D / N[(N[(d * N[(d / t$95$2), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 7.6e-140], N[(t$95$0 * N[(N[(c0 * c0), $MachinePrecision] / N[(D * N[(w * N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 4.5e-8], N[(0.25 * N[(t$95$2 * N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[h, 420000000000.0], N[Not[LessEqual[h, 5e+88]], $MachinePrecision]], N[(d * N[(N[(d / D), $MachinePrecision] * N[(N[(c0 / h), $MachinePrecision] * N[(N[(c0 / N[(w * w), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;h \leq -1.6 \cdot 10^{-224}:\\
\;\;\;\;t_0 \cdot \frac{\frac{c0}{w} \cdot \frac{\frac{c0}{h}}{w}}{D}\\

\mathbf{elif}\;h \leq 5.5 \cdot 10^{-200}:\\
\;\;\;\;0.25 \cdot \frac{D}{\frac{d \cdot \frac{d}{t_2}}{D}}\\

\mathbf{elif}\;h \leq 7.6 \cdot 10^{-140}:\\
\;\;\;\;t_0 \cdot \frac{c0 \cdot c0}{D \cdot \left(w \cdot \left(w \cdot h\right)\right)}\\

\mathbf{elif}\;h \leq 4.5 \cdot 10^{-8}:\\
\;\;\;\;0.25 \cdot \left(t_2 \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\

\mathbf{elif}\;h \leq 420000000000 \lor \neg \left(h \leq 5 \cdot 10^{+88}\right):\\
\;\;\;\;d \cdot \left(\frac{d}{D} \cdot \left(\frac{c0}{h} \cdot \frac{\frac{c0}{w \cdot w}}{D}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if h < -6.8000000000000004e-19 or 4.2e11 < h < 4.99999999999999997e88

    1. Initial program 12.2%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def7.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*7.7%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*7.7%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
    5. Taylor expanded in c0 around 0 42.9%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    6. Step-by-step derivation
      1. associate-/l*42.8%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}} \]
      2. *-commutative42.8%

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

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

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

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

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

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

        \[\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*46.1%

        \[\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) \]
      3. associate-/l*57.1%

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

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

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

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

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

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

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

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

    if -6.8000000000000004e-19 < h < -1.5999999999999999e-224

    1. Initial program 34.9%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. times-frac34.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-def34.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. times-frac35.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{d}{D} \cdot \frac{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-squares46.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{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. Simplified44.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, 1 \cdot \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot \left(h \cdot D\right)}, d \cdot \frac{d}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{{\left(\frac{d}{D}\right)}^{2}} - M\right)}\right) \]
    5. Applied egg-rr52.1%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}} \]
      2. unpow234.8%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      3. unpow234.8%

        \[\leadsto \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      4. unpow234.8%

        \[\leadsto \frac{d \cdot d}{D \cdot D} \cdot \frac{\color{blue}{c0 \cdot c0}}{{w}^{2} \cdot h} \]
      5. unpow234.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D}} \]
      3. unpow249.2%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D} \]
      4. associate-*r/50.8%

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

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

        \[\leadsto \left(d \cdot \frac{d}{D}\right) \cdot \frac{\color{blue}{\frac{c0 \cdot \frac{c0}{h}}{w \cdot w}}}{D} \]
    16. Applied egg-rr46.0%

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

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

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

    if -1.5999999999999999e-224 < h < 5.4999999999999996e-200

    1. Initial program 15.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. Taylor expanded in c0 around -inf 1.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def1.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*1.9%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*1.9%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
    5. Taylor expanded in c0 around 0 43.5%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    6. Step-by-step derivation
      1. associate-/l*44.2%

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

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

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

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

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

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

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

        \[\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*46.3%

        \[\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) \]
      3. associate-/l*52.4%

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

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

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

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

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

    if 5.4999999999999996e-200 < h < 7.59999999999999997e-140

    1. Initial program 38.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-frac38.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-def38.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. times-frac38.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{d}{D} \cdot \frac{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-squares54.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{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. Simplified54.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, 1 \cdot \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot \left(h \cdot D\right)}, d \cdot \frac{d}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{{\left(\frac{d}{D}\right)}^{2}} - M\right)}\right) \]
    5. Applied egg-rr77.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}} \]
      2. unpow261.7%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      3. unpow261.7%

        \[\leadsto \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      4. unpow261.7%

        \[\leadsto \frac{d \cdot d}{D \cdot D} \cdot \frac{\color{blue}{c0 \cdot c0}}{{w}^{2} \cdot h} \]
      5. unpow261.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D}} \]
      3. unpow261.7%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D} \]
      4. associate-*r/77.0%

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

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

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

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

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

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

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

    if 7.59999999999999997e-140 < h < 4.49999999999999993e-8

    1. Initial program 19.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. Taylor expanded in c0 around -inf 11.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def11.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*7.6%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*7.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, \color{blue}{\left(-1 \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)\right) \cdot c0}\right) \]
    4. Simplified31.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
    5. Taylor expanded in c0 around 0 51.0%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    6. Step-by-step derivation
      1. associate-/l*50.9%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}} \]
      2. *-commutative50.9%

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

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

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

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

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

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

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

        \[\leadsto 0.25 \cdot \left(\color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \]
    9. Applied egg-rr58.4%

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

    if 4.49999999999999993e-8 < h < 4.2e11 or 4.99999999999999997e88 < h

    1. Initial program 50.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-frac50.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-def50.4%

        \[\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. times-frac50.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{d}{D} \cdot \frac{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-squares59.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{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. Simplified59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}} \]
      2. unpow265.1%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      3. unpow265.1%

        \[\leadsto \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      4. unpow265.1%

        \[\leadsto \frac{d \cdot d}{D \cdot D} \cdot \frac{\color{blue}{c0 \cdot c0}}{{w}^{2} \cdot h} \]
      5. unpow265.1%

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(d \cdot d\right) \cdot \left(\frac{c0}{w \cdot w} \cdot \frac{c0}{h}\right)}{D \cdot D}} \]
    13. Step-by-step derivation
      1. unpow262.3%

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D}} \]
      3. unpow268.1%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D} \]
      4. associate-*r/71.1%

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

      \[\leadsto \color{blue}{\left(d \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D}} \]
    15. Step-by-step derivation
      1. pow171.1%

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

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

        \[\leadsto {\left(d \cdot \left(\frac{d}{D} \cdot \color{blue}{\frac{\frac{c0}{w \cdot w}}{\frac{D}{\frac{c0}{h}}}}\right)\right)}^{1} \]
    16. Applied egg-rr71.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -6.8 \cdot 10^{-19}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{D}{\frac{d}{\frac{h}{\frac{d}{M \cdot M}}}}\right)\\ \mathbf{elif}\;h \leq -1.6 \cdot 10^{-224}:\\ \;\;\;\;\left(d \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{w} \cdot \frac{\frac{c0}{h}}{w}}{D}\\ \mathbf{elif}\;h \leq 5.5 \cdot 10^{-200}:\\ \;\;\;\;0.25 \cdot \frac{D}{\frac{d \cdot \frac{d}{h \cdot \left(M \cdot M\right)}}{D}}\\ \mathbf{elif}\;h \leq 7.6 \cdot 10^{-140}:\\ \;\;\;\;\left(d \cdot \frac{d}{D}\right) \cdot \frac{c0 \cdot c0}{D \cdot \left(w \cdot \left(w \cdot h\right)\right)}\\ \mathbf{elif}\;h \leq 4.5 \cdot 10^{-8}:\\ \;\;\;\;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{elif}\;h \leq 420000000000 \lor \neg \left(h \leq 5 \cdot 10^{+88}\right):\\ \;\;\;\;d \cdot \left(\frac{d}{D} \cdot \left(\frac{c0}{h} \cdot \frac{\frac{c0}{w \cdot w}}{D}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{D}{\frac{d}{\frac{h}{\frac{d}{M \cdot M}}}}\right)\\ \end{array} \]

Alternative 3: 43.4% accurate, 4.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := d \cdot \frac{d}{D}\\ t_1 := 0.25 \cdot \left(D \cdot \frac{D}{\frac{d}{\frac{h}{\frac{d}{M \cdot M}}}}\right)\\ t_2 := h \cdot \left(M \cdot M\right)\\ \mathbf{if}\;h \leq -1.8 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq -7 \cdot 10^{-223}:\\ \;\;\;\;t_0 \cdot \frac{\frac{c0}{w} \cdot \frac{\frac{c0}{h}}{w}}{D}\\ \mathbf{elif}\;h \leq 9 \cdot 10^{-207}:\\ \;\;\;\;0.25 \cdot \frac{D}{\frac{d \cdot \frac{d}{t_2}}{D}}\\ \mathbf{elif}\;h \leq 8.4 \cdot 10^{-140}:\\ \;\;\;\;t_0 \cdot \frac{c0 \cdot c0}{D \cdot \left(w \cdot \left(w \cdot h\right)\right)}\\ \mathbf{elif}\;h \leq 1.25 \cdot 10^{-5}:\\ \;\;\;\;0.25 \cdot \left(t_2 \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\ \mathbf{elif}\;h \leq 450000000000:\\ \;\;\;\;\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0 \cdot c0}{h \cdot \left(w \cdot w\right)}\\ \mathbf{elif}\;h \leq 5.2 \cdot 10^{+88}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left(\frac{d}{D} \cdot \left(\frac{c0}{h} \cdot \frac{\frac{c0}{w \cdot w}}{D}\right)\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* d (/ d D)))
        (t_1 (* 0.25 (* D (/ D (/ d (/ h (/ d (* M M))))))))
        (t_2 (* h (* M M))))
   (if (<= h -1.8e-20)
     t_1
     (if (<= h -7e-223)
       (* t_0 (/ (* (/ c0 w) (/ (/ c0 h) w)) D))
       (if (<= h 9e-207)
         (* 0.25 (/ D (/ (* d (/ d t_2)) D)))
         (if (<= h 8.4e-140)
           (* t_0 (/ (* c0 c0) (* D (* w (* w h)))))
           (if (<= h 1.25e-5)
             (* 0.25 (* t_2 (* (/ D d) (/ D d))))
             (if (<= h 450000000000.0)
               (* (* (/ d D) (/ d D)) (/ (* c0 c0) (* h (* w w))))
               (if (<= h 5.2e+88)
                 t_1
                 (* d (* (/ d D) (* (/ c0 h) (/ (/ c0 (* w w)) D)))))))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = d * (d / D);
	double t_1 = 0.25 * (D * (D / (d / (h / (d / (M * M))))));
	double t_2 = h * (M * M);
	double tmp;
	if (h <= -1.8e-20) {
		tmp = t_1;
	} else if (h <= -7e-223) {
		tmp = t_0 * (((c0 / w) * ((c0 / h) / w)) / D);
	} else if (h <= 9e-207) {
		tmp = 0.25 * (D / ((d * (d / t_2)) / D));
	} else if (h <= 8.4e-140) {
		tmp = t_0 * ((c0 * c0) / (D * (w * (w * h))));
	} else if (h <= 1.25e-5) {
		tmp = 0.25 * (t_2 * ((D / d) * (D / d)));
	} else if (h <= 450000000000.0) {
		tmp = ((d / D) * (d / D)) * ((c0 * c0) / (h * (w * w)));
	} else if (h <= 5.2e+88) {
		tmp = t_1;
	} else {
		tmp = d * ((d / D) * ((c0 / h) * ((c0 / (w * w)) / D)));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = d_1 * (d_1 / d)
    t_1 = 0.25d0 * (d * (d / (d_1 / (h / (d_1 / (m * m))))))
    t_2 = h * (m * m)
    if (h <= (-1.8d-20)) then
        tmp = t_1
    else if (h <= (-7d-223)) then
        tmp = t_0 * (((c0 / w) * ((c0 / h) / w)) / d)
    else if (h <= 9d-207) then
        tmp = 0.25d0 * (d / ((d_1 * (d_1 / t_2)) / d))
    else if (h <= 8.4d-140) then
        tmp = t_0 * ((c0 * c0) / (d * (w * (w * h))))
    else if (h <= 1.25d-5) then
        tmp = 0.25d0 * (t_2 * ((d / d_1) * (d / d_1)))
    else if (h <= 450000000000.0d0) then
        tmp = ((d_1 / d) * (d_1 / d)) * ((c0 * c0) / (h * (w * w)))
    else if (h <= 5.2d+88) then
        tmp = t_1
    else
        tmp = d_1 * ((d_1 / d) * ((c0 / h) * ((c0 / (w * w)) / d)))
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = d * (d / D);
	double t_1 = 0.25 * (D * (D / (d / (h / (d / (M * M))))));
	double t_2 = h * (M * M);
	double tmp;
	if (h <= -1.8e-20) {
		tmp = t_1;
	} else if (h <= -7e-223) {
		tmp = t_0 * (((c0 / w) * ((c0 / h) / w)) / D);
	} else if (h <= 9e-207) {
		tmp = 0.25 * (D / ((d * (d / t_2)) / D));
	} else if (h <= 8.4e-140) {
		tmp = t_0 * ((c0 * c0) / (D * (w * (w * h))));
	} else if (h <= 1.25e-5) {
		tmp = 0.25 * (t_2 * ((D / d) * (D / d)));
	} else if (h <= 450000000000.0) {
		tmp = ((d / D) * (d / D)) * ((c0 * c0) / (h * (w * w)));
	} else if (h <= 5.2e+88) {
		tmp = t_1;
	} else {
		tmp = d * ((d / D) * ((c0 / h) * ((c0 / (w * w)) / D)));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = d * (d / D)
	t_1 = 0.25 * (D * (D / (d / (h / (d / (M * M))))))
	t_2 = h * (M * M)
	tmp = 0
	if h <= -1.8e-20:
		tmp = t_1
	elif h <= -7e-223:
		tmp = t_0 * (((c0 / w) * ((c0 / h) / w)) / D)
	elif h <= 9e-207:
		tmp = 0.25 * (D / ((d * (d / t_2)) / D))
	elif h <= 8.4e-140:
		tmp = t_0 * ((c0 * c0) / (D * (w * (w * h))))
	elif h <= 1.25e-5:
		tmp = 0.25 * (t_2 * ((D / d) * (D / d)))
	elif h <= 450000000000.0:
		tmp = ((d / D) * (d / D)) * ((c0 * c0) / (h * (w * w)))
	elif h <= 5.2e+88:
		tmp = t_1
	else:
		tmp = d * ((d / D) * ((c0 / h) * ((c0 / (w * w)) / D)))
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(d * Float64(d / D))
	t_1 = Float64(0.25 * Float64(D * Float64(D / Float64(d / Float64(h / Float64(d / Float64(M * M)))))))
	t_2 = Float64(h * Float64(M * M))
	tmp = 0.0
	if (h <= -1.8e-20)
		tmp = t_1;
	elseif (h <= -7e-223)
		tmp = Float64(t_0 * Float64(Float64(Float64(c0 / w) * Float64(Float64(c0 / h) / w)) / D));
	elseif (h <= 9e-207)
		tmp = Float64(0.25 * Float64(D / Float64(Float64(d * Float64(d / t_2)) / D)));
	elseif (h <= 8.4e-140)
		tmp = Float64(t_0 * Float64(Float64(c0 * c0) / Float64(D * Float64(w * Float64(w * h)))));
	elseif (h <= 1.25e-5)
		tmp = Float64(0.25 * Float64(t_2 * Float64(Float64(D / d) * Float64(D / d))));
	elseif (h <= 450000000000.0)
		tmp = Float64(Float64(Float64(d / D) * Float64(d / D)) * Float64(Float64(c0 * c0) / Float64(h * Float64(w * w))));
	elseif (h <= 5.2e+88)
		tmp = t_1;
	else
		tmp = Float64(d * Float64(Float64(d / D) * Float64(Float64(c0 / h) * Float64(Float64(c0 / Float64(w * w)) / D))));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = d * (d / D);
	t_1 = 0.25 * (D * (D / (d / (h / (d / (M * M))))));
	t_2 = h * (M * M);
	tmp = 0.0;
	if (h <= -1.8e-20)
		tmp = t_1;
	elseif (h <= -7e-223)
		tmp = t_0 * (((c0 / w) * ((c0 / h) / w)) / D);
	elseif (h <= 9e-207)
		tmp = 0.25 * (D / ((d * (d / t_2)) / D));
	elseif (h <= 8.4e-140)
		tmp = t_0 * ((c0 * c0) / (D * (w * (w * h))));
	elseif (h <= 1.25e-5)
		tmp = 0.25 * (t_2 * ((D / d) * (D / d)));
	elseif (h <= 450000000000.0)
		tmp = ((d / D) * (d / D)) * ((c0 * c0) / (h * (w * w)));
	elseif (h <= 5.2e+88)
		tmp = t_1;
	else
		tmp = d * ((d / D) * ((c0 / h) * ((c0 / (w * w)) / D)));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.25 * N[(D * N[(D / N[(d / N[(h / N[(d / N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, -1.8e-20], t$95$1, If[LessEqual[h, -7e-223], N[(t$95$0 * N[(N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / h), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 9e-207], N[(0.25 * N[(D / N[(N[(d * N[(d / t$95$2), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 8.4e-140], N[(t$95$0 * N[(N[(c0 * c0), $MachinePrecision] / N[(D * N[(w * N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 1.25e-5], N[(0.25 * N[(t$95$2 * N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 450000000000.0], N[(N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 * c0), $MachinePrecision] / N[(h * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 5.2e+88], t$95$1, N[(d * N[(N[(d / D), $MachinePrecision] * N[(N[(c0 / h), $MachinePrecision] * N[(N[(c0 / N[(w * w), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;h \leq -7 \cdot 10^{-223}:\\
\;\;\;\;t_0 \cdot \frac{\frac{c0}{w} \cdot \frac{\frac{c0}{h}}{w}}{D}\\

\mathbf{elif}\;h \leq 9 \cdot 10^{-207}:\\
\;\;\;\;0.25 \cdot \frac{D}{\frac{d \cdot \frac{d}{t_2}}{D}}\\

\mathbf{elif}\;h \leq 8.4 \cdot 10^{-140}:\\
\;\;\;\;t_0 \cdot \frac{c0 \cdot c0}{D \cdot \left(w \cdot \left(w \cdot h\right)\right)}\\

\mathbf{elif}\;h \leq 1.25 \cdot 10^{-5}:\\
\;\;\;\;0.25 \cdot \left(t_2 \cdot \left(\frac{D}{d} \cdot \frac{D}{d}\right)\right)\\

\mathbf{elif}\;h \leq 450000000000:\\
\;\;\;\;\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0 \cdot c0}{h \cdot \left(w \cdot w\right)}\\

\mathbf{elif}\;h \leq 5.2 \cdot 10^{+88}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if h < -1.79999999999999987e-20 or 4.5e11 < h < 5.2000000000000001e88

    1. Initial program 12.2%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def7.7%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*7.7%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*7.7%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
    5. Taylor expanded in c0 around 0 42.9%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    6. Step-by-step derivation
      1. associate-/l*42.8%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}} \]
      2. *-commutative42.8%

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

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

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

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

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

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

        \[\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*46.1%

        \[\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) \]
      3. associate-/l*57.1%

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

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

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

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

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

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

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

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

    if -1.79999999999999987e-20 < h < -7.00000000000000018e-223

    1. Initial program 34.9%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. times-frac34.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-def34.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. times-frac35.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{d}{D} \cdot \frac{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-squares46.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{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. Simplified44.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, 1 \cdot \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot \left(h \cdot D\right)}, d \cdot \frac{d}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{{\left(\frac{d}{D}\right)}^{2}} - M\right)}\right) \]
    5. Applied egg-rr52.1%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}} \]
      2. unpow234.8%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      3. unpow234.8%

        \[\leadsto \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      4. unpow234.8%

        \[\leadsto \frac{d \cdot d}{D \cdot D} \cdot \frac{\color{blue}{c0 \cdot c0}}{{w}^{2} \cdot h} \]
      5. unpow234.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D}} \]
      3. unpow249.2%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D} \]
      4. associate-*r/50.8%

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

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

        \[\leadsto \left(d \cdot \frac{d}{D}\right) \cdot \frac{\color{blue}{\frac{c0 \cdot \frac{c0}{h}}{w \cdot w}}}{D} \]
    16. Applied egg-rr46.0%

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

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

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

    if -7.00000000000000018e-223 < h < 8.99999999999999984e-207

    1. Initial program 15.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. Taylor expanded in c0 around -inf 1.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def1.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*1.9%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*1.9%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
    5. Taylor expanded in c0 around 0 43.5%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    6. Step-by-step derivation
      1. associate-/l*44.2%

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

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

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

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

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

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

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

        \[\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*46.3%

        \[\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) \]
      3. associate-/l*52.4%

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

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

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

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

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

    if 8.99999999999999984e-207 < h < 8.4000000000000007e-140

    1. Initial program 38.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-frac38.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-def38.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. times-frac38.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{d}{D} \cdot \frac{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-squares54.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{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. Simplified54.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, 1 \cdot \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot \left(h \cdot D\right)}, d \cdot \frac{d}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{{\left(\frac{d}{D}\right)}^{2}} - M\right)}\right) \]
    5. Applied egg-rr77.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}} \]
      2. unpow261.7%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      3. unpow261.7%

        \[\leadsto \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      4. unpow261.7%

        \[\leadsto \frac{d \cdot d}{D \cdot D} \cdot \frac{\color{blue}{c0 \cdot c0}}{{w}^{2} \cdot h} \]
      5. unpow261.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D}} \]
      3. unpow261.7%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D} \]
      4. associate-*r/77.0%

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

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

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

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

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

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

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

    if 8.4000000000000007e-140 < h < 1.25000000000000006e-5

    1. Initial program 19.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. Taylor expanded in c0 around -inf 11.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def11.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*7.6%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*7.6%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, \color{blue}{\left(-1 \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)\right) \cdot c0}\right) \]
    4. Simplified31.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
    5. Taylor expanded in c0 around 0 51.0%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    6. Step-by-step derivation
      1. associate-/l*50.9%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}} \]
      2. *-commutative50.9%

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

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

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

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

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

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

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

        \[\leadsto 0.25 \cdot \left(\color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \]
    9. Applied egg-rr58.4%

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

    if 1.25000000000000006e-5 < h < 4.5e11

    1. Initial program 71.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-frac71.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-def71.4%

        \[\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. times-frac71.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{d}{D} \cdot \frac{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-squares71.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{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. Simplified71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}} \]
      2. unpow271.4%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      3. unpow271.4%

        \[\leadsto \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      4. unpow271.4%

        \[\leadsto \frac{d \cdot d}{D \cdot D} \cdot \frac{\color{blue}{c0 \cdot c0}}{{w}^{2} \cdot h} \]
      5. unpow271.4%

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

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

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

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

    if 5.2000000000000001e88 < h

    1. Initial program 45.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-frac44.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-def44.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. times-frac44.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{d}{D} \cdot \frac{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-squares56.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{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. Simplified56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}} \]
      2. unpow263.5%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      3. unpow263.5%

        \[\leadsto \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      4. unpow263.5%

        \[\leadsto \frac{d \cdot d}{D \cdot D} \cdot \frac{\color{blue}{c0 \cdot c0}}{{w}^{2} \cdot h} \]
      5. unpow263.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(d \cdot d\right) \cdot \left(\frac{c0}{w \cdot w} \cdot \frac{c0}{h}\right)}{D \cdot D}} \]
    13. Step-by-step derivation
      1. unpow260.0%

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D}} \]
      3. unpow267.3%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D} \]
      4. associate-*r/67.3%

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

      \[\leadsto \color{blue}{\left(d \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D}} \]
    15. Step-by-step derivation
      1. pow167.3%

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

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

        \[\leadsto {\left(d \cdot \left(\frac{d}{D} \cdot \color{blue}{\frac{\frac{c0}{w \cdot w}}{\frac{D}{\frac{c0}{h}}}}\right)\right)}^{1} \]
    16. Applied egg-rr67.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -1.8 \cdot 10^{-20}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{D}{\frac{d}{\frac{h}{\frac{d}{M \cdot M}}}}\right)\\ \mathbf{elif}\;h \leq -7 \cdot 10^{-223}:\\ \;\;\;\;\left(d \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{w} \cdot \frac{\frac{c0}{h}}{w}}{D}\\ \mathbf{elif}\;h \leq 9 \cdot 10^{-207}:\\ \;\;\;\;0.25 \cdot \frac{D}{\frac{d \cdot \frac{d}{h \cdot \left(M \cdot M\right)}}{D}}\\ \mathbf{elif}\;h \leq 8.4 \cdot 10^{-140}:\\ \;\;\;\;\left(d \cdot \frac{d}{D}\right) \cdot \frac{c0 \cdot c0}{D \cdot \left(w \cdot \left(w \cdot h\right)\right)}\\ \mathbf{elif}\;h \leq 1.25 \cdot 10^{-5}:\\ \;\;\;\;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{elif}\;h \leq 450000000000:\\ \;\;\;\;\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0 \cdot c0}{h \cdot \left(w \cdot w\right)}\\ \mathbf{elif}\;h \leq 5.2 \cdot 10^{+88}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{D}{\frac{d}{\frac{h}{\frac{d}{M \cdot M}}}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left(\frac{d}{D} \cdot \left(\frac{c0}{h} \cdot \frac{\frac{c0}{w \cdot w}}{D}\right)\right)\\ \end{array} \]

Alternative 4: 46.9% accurate, 6.0× speedup?

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

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

\mathbf{elif}\;w \leq -1.26 \cdot 10^{-222}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;w \leq 1.25 \cdot 10^{-275}:\\
\;\;\;\;\frac{\left(D \cdot D\right) \cdot 0.25}{t_0 \cdot \frac{d}{h}}\\

\mathbf{elif}\;w \leq 2.55 \cdot 10^{+16}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if w < -2.1999999999999999e-130 or 2.55e16 < w

    1. Initial program 13.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. Taylor expanded in c0 around -inf 6.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def6.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*5.3%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*5.3%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, \color{blue}{\left(-1 \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)\right) \cdot c0}\right) \]
    4. Simplified31.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
    5. Taylor expanded in c0 around 0 39.3%

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

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

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

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

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

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

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

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

        \[\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*46.0%

        \[\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) \]
      3. associate-/l*53.7%

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

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

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

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

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

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

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

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

    if -2.1999999999999999e-130 < w < -1.25999999999999997e-222 or 1.24999999999999996e-275 < w < 2.55e16

    1. Initial program 42.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-frac40.2%

        \[\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-def40.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. times-frac40.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{d}{D} \cdot \frac{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-squares46.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{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. Simplified46.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, 1 \cdot \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot \left(h \cdot D\right)}, d \cdot \frac{d}{D}, M\right) \cdot \left(\frac{c0}{w \cdot h} \cdot \color{blue}{{\left(\frac{d}{D}\right)}^{2}} - M\right)}\right) \]
    5. Applied egg-rr52.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{{D}^{2}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h}} \]
      2. unpow241.6%

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

        \[\leadsto \frac{d \cdot d}{\color{blue}{D \cdot D}} \cdot \frac{{c0}^{2}}{{w}^{2} \cdot h} \]
      4. unpow241.6%

        \[\leadsto \frac{d \cdot d}{D \cdot D} \cdot \frac{\color{blue}{c0 \cdot c0}}{{w}^{2} \cdot h} \]
      5. unpow241.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{{d}^{2}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D}} \]
      3. unpow253.8%

        \[\leadsto \frac{\color{blue}{d \cdot d}}{D} \cdot \frac{\frac{c0}{w \cdot w} \cdot \frac{c0}{h}}{D} \]
      4. associate-*r/55.8%

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

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

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

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

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

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

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

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

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

    if -1.25999999999999997e-222 < w < 1.24999999999999996e-275

    1. Initial program 20.2%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def2.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*2.5%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*2.5%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \sqrt[3]{\left(\left(\frac{D \cdot D}{c0 \cdot \left(d \cdot d\right)} \cdot \left(w \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot \left(\frac{D \cdot D}{c0 \cdot \left(d \cdot d\right)} \cdot \left(w \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)\right) \cdot \color{blue}{\left(\frac{D \cdot D}{\left(d \cdot d\right) \cdot c0} \cdot \left(w \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}}, c0 \cdot 0\right) \]
    6. Applied egg-rr22.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \color{blue}{\sqrt[3]{\left(\left(\frac{D \cdot D}{c0 \cdot \left(d \cdot d\right)} \cdot \left(w \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right) \cdot \left(\frac{D \cdot D}{c0 \cdot \left(d \cdot d\right)} \cdot \left(w \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)\right) \cdot \left(\frac{D \cdot D}{c0 \cdot \left(d \cdot d\right)} \cdot \left(w \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}}, c0 \cdot 0\right) \]
    7. Step-by-step derivation
      1. associate-*l*22.9%

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \sqrt[3]{{\color{blue}{\left(\left(w \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{D \cdot D}{c0 \cdot \left(d \cdot d\right)}\right)}}^{3}}, c0 \cdot 0\right) \]
      4. unpow222.9%

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \sqrt[3]{{\left(\left(w \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(\frac{D}{c0} \cdot \frac{D}{\color{blue}{d \cdot d}}\right)\right)}^{3}}, c0 \cdot 0\right) \]
    8. Simplified20.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \color{blue}{\sqrt[3]{{\left(\left(w \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(\frac{D}{c0} \cdot \frac{D}{d \cdot d}\right)\right)}^{3}}}, c0 \cdot 0\right) \]
    9. Taylor expanded in c0 around 0 43.4%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    10. Step-by-step derivation
      1. associate-/l*43.3%

        \[\leadsto 0.25 \cdot \color{blue}{\frac{{D}^{2}}{\frac{{d}^{2}}{h \cdot {M}^{2}}}} \]
      2. associate-*r/43.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -2.2 \cdot 10^{-130}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{D}{\frac{d}{\frac{h}{\frac{d}{M \cdot M}}}}\right)\\ \mathbf{elif}\;w \leq -1.26 \cdot 10^{-222}:\\ \;\;\;\;d \cdot \left(\frac{d}{D} \cdot \left(\frac{c0}{h} \cdot \frac{\frac{c0}{w \cdot w}}{D}\right)\right)\\ \mathbf{elif}\;w \leq 1.25 \cdot 10^{-275}:\\ \;\;\;\;\frac{\left(D \cdot D\right) \cdot 0.25}{\frac{d}{M \cdot M} \cdot \frac{d}{h}}\\ \mathbf{elif}\;w \leq 2.55 \cdot 10^{+16}:\\ \;\;\;\;d \cdot \left(\frac{d}{D} \cdot \left(\frac{c0}{h} \cdot \frac{\frac{c0}{w \cdot w}}{D}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{D}{\frac{d}{\frac{h}{\frac{d}{M \cdot M}}}}\right)\\ \end{array} \]

Alternative 5: 38.3% accurate, 8.8× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < 1.45e248

    1. Initial program 24.9%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def4.8%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*4.4%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*4.4%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
    5. Taylor expanded in c0 around 0 36.3%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    6. Step-by-step derivation
      1. associate-/l*36.5%

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

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

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

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

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

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

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

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

        \[\leadsto 0.25 \cdot \left(\color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right)} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \]
    9. Applied egg-rr42.0%

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

        \[\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)} \]
      2. associate-*l/42.0%

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

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

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

    if 1.45e248 < d

    1. Initial program 34.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-frac34.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-def34.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*34.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-squares43.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. Simplified48.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. Taylor expanded in c0 around -inf 0.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-1 \cdot \left(\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\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*0.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(-1 \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)\right) \cdot c0\right)} \]
      2. distribute-rgt1-in0.0%

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-1 \cdot \color{blue}{0}\right) \cdot c0\right) \]
      5. metadata-eval39.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{0} \cdot c0\right) \]
      6. mul0-lft0.0%

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(c0 \cdot \left(\color{blue}{0} \cdot \frac{{d}^{2} \cdot M}{{D}^{2} \cdot \left(w \cdot h\right)}\right)\right) \]
      12. mul0-lft39.9%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(c0 \cdot \color{blue}{0}\right) \]
    6. Simplified39.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
    7. Taylor expanded in c0 around 0 44.5%

      \[\leadsto \color{blue}{0} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.8%

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

Alternative 6: 42.4% accurate, 8.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;d \leq 9.5 \cdot 10^{+212}:\\
\;\;\;\;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\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < 9.4999999999999993e212

    1. Initial program 23.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. Taylor expanded in c0 around -inf 5.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
    3. Step-by-step derivation
      1. fma-def5.2%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
      2. associate-/l*4.7%

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
      7. associate-*r*4.7%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
    5. Taylor expanded in c0 around 0 36.5%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
    6. Step-by-step derivation
      1. associate-/l*36.6%

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

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

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

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

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

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

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

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

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

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

    if 9.4999999999999993e212 < d

    1. Initial program 36.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-frac36.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-def36.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*36.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-squares42.1%

        \[\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. Simplified47.5%

      \[\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 0.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-1 \cdot \left(\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\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*0.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(-1 \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)\right) \cdot c0\right)} \]
      2. distribute-rgt1-in0.0%

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-1 \cdot \color{blue}{0}\right) \cdot c0\right) \]
      5. metadata-eval35.0%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{0} \cdot c0\right) \]
      6. mul0-lft0.0%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(c0 \cdot \color{blue}{0}\right) \]
    6. Simplified35.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
    7. Taylor expanded in c0 around 0 43.1%

      \[\leadsto \color{blue}{0} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 9.5 \cdot 10^{+212}:\\ \;\;\;\;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\\ \end{array} \]

Alternative 7: 47.8% accurate, 10.1× speedup?

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

\\
0.25 \cdot \left(D \cdot \frac{D}{\frac{d}{\frac{h}{\frac{d}{M \cdot M}}}}\right)
\end{array}
Derivation
  1. Initial program 25.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. Taylor expanded in c0 around -inf 4.4%

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\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\right)\right)} \]
  3. Step-by-step derivation
    1. fma-def4.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\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\right)\right)} \]
    2. associate-/l*4.0%

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

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

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \color{blue}{\left(M \cdot M\right)}\right)}}, -1 \cdot \left(\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\right)\right) \]
    7. associate-*r*4.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, \color{blue}{\left(-1 \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)\right) \cdot c0}\right) \]
  4. Simplified26.8%

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{D \cdot D}{\frac{\left(d \cdot d\right) \cdot c0}{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}}, c0 \cdot 0\right)} \]
  5. Taylor expanded in c0 around 0 35.1%

    \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2}}} \]
  6. Step-by-step derivation
    1. associate-/l*35.2%

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

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

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

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

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

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

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

      \[\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*39.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) \]
    3. associate-/l*47.4%

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

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

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

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

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

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

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

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

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

Alternative 8: 33.6% accurate, 151.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (c0 w h D d M) :precision binary64 0.0)
double code(double c0, double w, double h, double D, double d, double M) {
	return 0.0;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = 0.0d0
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return 0.0;
}
def code(c0, w, h, D, d, M):
	return 0.0
function code(c0, w, h, D, d, M)
	return 0.0
end
function tmp = code(c0, w, h, D, d, M)
	tmp = 0.0;
end
code[c0_, w_, h_, D_, d_, M_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 25.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-frac25.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-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.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-squares31.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. Simplified37.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. Taylor expanded in c0 around -inf 3.0%

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-1 \cdot \left(\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\right)\right)} \]
  5. Step-by-step derivation
    1. associate-*r*3.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(-1 \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)\right) \cdot c0\right)} \]
    2. distribute-rgt1-in3.0%

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-1 \cdot \color{blue}{0}\right) \cdot c0\right) \]
    5. metadata-eval31.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{0} \cdot c0\right) \]
    6. mul0-lft2.9%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(\color{blue}{\left(-1 + 1\right)} \cdot \frac{{d}^{2} \cdot M}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot c0\right) \]
    8. distribute-lft1-in2.9%

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(c0 \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot \frac{{d}^{2} \cdot M}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}\right) \]
    11. metadata-eval2.9%

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(c0 \cdot \color{blue}{0}\right) \]
  6. Simplified31.3%

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
  7. Taylor expanded in c0 around 0 36.3%

    \[\leadsto \color{blue}{0} \]
  8. Final simplification36.3%

    \[\leadsto 0 \]

Reproduce

?
herbie shell --seed 2023242 
(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))))))