Henrywood and Agarwal, Equation (13)

Percentage Accurate: 24.5% → 60.8%
Time: 28.1s
Alternatives: 8
Speedup: 30.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 8 alternatives:

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

Initial Program: 24.5% 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: 60.8% accurate, 0.5× 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)}\\ t_1 := \frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right)\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{0}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (* c0 (* d d)) (* (* w h) (* D D))))
        (t_1 (* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))))
   (if (<= t_1 INFINITY)
     t_1
     (fma -0.5 (/ 0.0 w) (* 0.25 (* (/ D (/ d D)) (/ (* h (* M M)) d)))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
	double t_1 = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = fma(-0.5, (0.0 / w), (0.25 * ((D / (d / D)) * ((h * (M * M)) / d))));
	}
	return tmp;
}
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))
	t_1 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M)))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = fma(-0.5, Float64(0.0 / w), Float64(0.25 * Float64(Float64(D / Float64(d / D)) * Float64(Float64(h * Float64(M * M)) / d))));
	end
	return tmp
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(-0.5 * N[(0.0 / w), $MachinePrecision] + N[(0.25 * N[(N[(D / N[(d / D), $MachinePrecision]), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / d), $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)}\\
t_1 := \frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \frac{0}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\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 82.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) \]

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

    1. Initial program 0.0%

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. associate-*l*0.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{\left(c0 \cdot c0\right)} \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}{w}, 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right) \]
      4. distribute-rgt1-in1.8%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}}{w}, 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right) \]
      5. metadata-eval1.8%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot \left(\color{blue}{0} \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}{w}, 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right) \]
      6. mul0-lft30.9%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}}\right) \]
    6. Simplified31.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}\right)} \]
    7. Step-by-step derivation
      1. associate-/r/30.8%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \color{blue}{\left(\frac{D \cdot D}{d \cdot d} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}\right) \]
    8. Applied egg-rr30.8%

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

      \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}\right) \]
    10. Step-by-step derivation
      1. *-commutative30.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \left(\frac{\color{blue}{D \cdot D}}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
      6. associate-/l*39.2%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \left(\color{blue}{\frac{D}{\frac{d}{D}}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
    11. Simplified39.2%

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

      \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{0}}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.3%

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

Alternative 2: 44.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-0.5, \frac{0}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\\ \mathbf{if}\;c0 \leq -2.1 \cdot 10^{+214}:\\ \;\;\;\;\frac{c0}{\frac{w}{{\left(\frac{d}{D}\right)}^{2} \cdot \frac{\frac{c0}{h}}{w}}}\\ \mathbf{elif}\;c0 \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;c0 \leq 2.2 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{0 \cdot \left(c0 \cdot c0\right)}{w}, 0.25 \cdot \frac{D \cdot \frac{h}{\frac{d}{M \cdot M}}}{\frac{d}{D}}\right)\\ \mathbf{elif}\;c0 \leq 7.2 \cdot 10^{+154}:\\ \;\;\;\;\frac{c0 \cdot \left(\left(2 \cdot \frac{c0}{h}\right) \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{w}\right)}{2 \cdot w}\\ \mathbf{elif}\;c0 \leq 1.75 \cdot 10^{+226}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \frac{d \cdot \left(d \cdot \left(c0 \cdot c0\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)}}{2 \cdot w}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0
         (fma -0.5 (/ 0.0 w) (* 0.25 (* (/ D (/ d D)) (/ (* h (* M M)) d))))))
   (if (<= c0 -2.1e+214)
     (/ c0 (/ w (* (pow (/ d D) 2.0) (/ (/ c0 h) w))))
     (if (<= c0 -1.35e+154)
       t_0
       (if (<= c0 2.2e+44)
         (fma
          -0.5
          (/ (* 0.0 (* c0 c0)) w)
          (* 0.25 (/ (* D (/ h (/ d (* M M)))) (/ d D))))
         (if (<= c0 7.2e+154)
           (/ (* c0 (* (* 2.0 (/ c0 h)) (/ (* (/ d D) (/ d D)) w))) (* 2.0 w))
           (if (<= c0 1.75e+226)
             t_0
             (/
              (* 2.0 (/ (* d (* d (* c0 c0))) (* D (* (* w h) D))))
              (* 2.0 w)))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = fma(-0.5, (0.0 / w), (0.25 * ((D / (d / D)) * ((h * (M * M)) / d))));
	double tmp;
	if (c0 <= -2.1e+214) {
		tmp = c0 / (w / (pow((d / D), 2.0) * ((c0 / h) / w)));
	} else if (c0 <= -1.35e+154) {
		tmp = t_0;
	} else if (c0 <= 2.2e+44) {
		tmp = fma(-0.5, ((0.0 * (c0 * c0)) / w), (0.25 * ((D * (h / (d / (M * M)))) / (d / D))));
	} else if (c0 <= 7.2e+154) {
		tmp = (c0 * ((2.0 * (c0 / h)) * (((d / D) * (d / D)) / w))) / (2.0 * w);
	} else if (c0 <= 1.75e+226) {
		tmp = t_0;
	} else {
		tmp = (2.0 * ((d * (d * (c0 * c0))) / (D * ((w * h) * D)))) / (2.0 * w);
	}
	return tmp;
}
function code(c0, w, h, D, d, M)
	t_0 = fma(-0.5, Float64(0.0 / w), Float64(0.25 * Float64(Float64(D / Float64(d / D)) * Float64(Float64(h * Float64(M * M)) / d))))
	tmp = 0.0
	if (c0 <= -2.1e+214)
		tmp = Float64(c0 / Float64(w / Float64((Float64(d / D) ^ 2.0) * Float64(Float64(c0 / h) / w))));
	elseif (c0 <= -1.35e+154)
		tmp = t_0;
	elseif (c0 <= 2.2e+44)
		tmp = fma(-0.5, Float64(Float64(0.0 * Float64(c0 * c0)) / w), Float64(0.25 * Float64(Float64(D * Float64(h / Float64(d / Float64(M * M)))) / Float64(d / D))));
	elseif (c0 <= 7.2e+154)
		tmp = Float64(Float64(c0 * Float64(Float64(2.0 * Float64(c0 / h)) * Float64(Float64(Float64(d / D) * Float64(d / D)) / w))) / Float64(2.0 * w));
	elseif (c0 <= 1.75e+226)
		tmp = t_0;
	else
		tmp = Float64(Float64(2.0 * Float64(Float64(d * Float64(d * Float64(c0 * c0))) / Float64(D * Float64(Float64(w * h) * D)))) / Float64(2.0 * w));
	end
	return tmp
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(-0.5 * N[(0.0 / w), $MachinePrecision] + N[(0.25 * N[(N[(D / N[(d / D), $MachinePrecision]), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c0, -2.1e+214], N[(c0 / N[(w / N[(N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(c0 / h), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c0, -1.35e+154], t$95$0, If[LessEqual[c0, 2.2e+44], N[(-0.5 * N[(N[(0.0 * N[(c0 * c0), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision] + N[(0.25 * N[(N[(D * N[(h / N[(d / N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c0, 7.2e+154], N[(N[(c0 * N[(N[(2.0 * N[(c0 / h), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 * w), $MachinePrecision]), $MachinePrecision], If[LessEqual[c0, 1.75e+226], t$95$0, N[(N[(2.0 * N[(N[(d * N[(d * N[(c0 * c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(D * N[(N[(w * h), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(-0.5, \frac{0}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\\
\mathbf{if}\;c0 \leq -2.1 \cdot 10^{+214}:\\
\;\;\;\;\frac{c0}{\frac{w}{{\left(\frac{d}{D}\right)}^{2} \cdot \frac{\frac{c0}{h}}{w}}}\\

\mathbf{elif}\;c0 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;c0 \leq 2.2 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \frac{0 \cdot \left(c0 \cdot c0\right)}{w}, 0.25 \cdot \frac{D \cdot \frac{h}{\frac{d}{M \cdot M}}}{\frac{d}{D}}\right)\\

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

\mathbf{elif}\;c0 \leq 1.75 \cdot 10^{+226}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c0 < -2.1000000000000001e214

    1. Initial program 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    9. Step-by-step derivation
      1. associate-/r*34.3%

        \[\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. *-commutative34.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1000000000000001e214 < c0 < -1.35000000000000003e154 or 7.2000000000000001e154 < c0 < 1.7499999999999999e226

    1. Initial program 28.7%

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. associate-*l*23.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{\left(c0 \cdot c0\right)} \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}{w}, 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right) \]
      4. distribute-rgt1-in0.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}}\right) \]
    6. Simplified0.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}\right)} \]
    7. Step-by-step derivation
      1. associate-/r/0.0%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \color{blue}{\left(\frac{D \cdot D}{d \cdot d} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}\right) \]
    8. Applied egg-rr0.0%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \frac{{D}^{2} \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{d \cdot d}}\right) \]
      4. times-frac0.0%

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \left(\frac{\color{blue}{D \cdot D}}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
      6. associate-/l*0.0%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \left(\color{blue}{\frac{D}{\frac{d}{D}}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
    11. Simplified0.0%

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

      \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{0}}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]

    if -1.35000000000000003e154 < c0 < 2.19999999999999996e44

    1. Initial program 20.0%

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. associate-*l*18.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{\left(c0 \cdot c0\right)} \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}{w}, 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right) \]
      4. distribute-rgt1-in7.7%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}}{w}, 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right) \]
      5. metadata-eval7.7%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot \left(\color{blue}{0} \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}{w}, 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right) \]
      6. mul0-lft41.1%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}}\right) \]
    6. Simplified41.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}\right)} \]
    7. Step-by-step derivation
      1. associate-/r/41.0%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \color{blue}{\left(\frac{D \cdot D}{d \cdot d} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}\right) \]
    8. Applied egg-rr41.0%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \left(\frac{\color{blue}{D \cdot D}}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
      6. associate-/l*50.8%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \left(\color{blue}{\frac{D}{\frac{d}{D}}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
    11. Simplified50.8%

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \color{blue}{\frac{D \cdot \frac{h \cdot \left(M \cdot M\right)}{d}}{\frac{d}{D}}}\right) \]
      2. associate-/l*54.9%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \frac{D \cdot \color{blue}{\frac{h}{\frac{d}{M \cdot M}}}}{\frac{d}{D}}\right) \]
    13. Applied egg-rr54.9%

      \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \color{blue}{\frac{D \cdot \frac{h}{\frac{d}{M \cdot M}}}{\frac{d}{D}}}\right) \]

    if 2.19999999999999996e44 < c0 < 7.2000000000000001e154

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in M around 0 52.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)} \]
    9. Step-by-step derivation
      1. associate-/r*52.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. *-commutative52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7499999999999999e226 < c0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    9. Step-by-step derivation
      1. associate-/r*57.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c0 \leq -2.1 \cdot 10^{+214}:\\ \;\;\;\;\frac{c0}{\frac{w}{{\left(\frac{d}{D}\right)}^{2} \cdot \frac{\frac{c0}{h}}{w}}}\\ \mathbf{elif}\;c0 \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{0}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\\ \mathbf{elif}\;c0 \leq 2.2 \cdot 10^{+44}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{0 \cdot \left(c0 \cdot c0\right)}{w}, 0.25 \cdot \frac{D \cdot \frac{h}{\frac{d}{M \cdot M}}}{\frac{d}{D}}\right)\\ \mathbf{elif}\;c0 \leq 7.2 \cdot 10^{+154}:\\ \;\;\;\;\frac{c0 \cdot \left(\left(2 \cdot \frac{c0}{h}\right) \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{w}\right)}{2 \cdot w}\\ \mathbf{elif}\;c0 \leq 1.75 \cdot 10^{+226}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{0}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \frac{d \cdot \left(d \cdot \left(c0 \cdot c0\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)}}{2 \cdot w}\\ \end{array} \]

Alternative 3: 42.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-0.5, \frac{0}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\\ \mathbf{if}\;c0 \leq -4.2 \cdot 10^{+217}:\\ \;\;\;\;\frac{c0}{\frac{w}{{\left(\frac{d}{D}\right)}^{2} \cdot \frac{\frac{c0}{h}}{w}}}\\ \mathbf{elif}\;c0 \leq 1.35 \cdot 10^{+46}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;c0 \leq 1.9 \cdot 10^{+155}:\\ \;\;\;\;\frac{c0 \cdot \left(\left(2 \cdot \frac{c0}{h}\right) \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{w}\right)}{2 \cdot w}\\ \mathbf{elif}\;c0 \leq 1.35 \cdot 10^{+228}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \frac{d \cdot \left(d \cdot \left(c0 \cdot c0\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)}}{2 \cdot w}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0
         (fma -0.5 (/ 0.0 w) (* 0.25 (* (/ D (/ d D)) (/ (* h (* M M)) d))))))
   (if (<= c0 -4.2e+217)
     (/ c0 (/ w (* (pow (/ d D) 2.0) (/ (/ c0 h) w))))
     (if (<= c0 1.35e+46)
       t_0
       (if (<= c0 1.9e+155)
         (/ (* c0 (* (* 2.0 (/ c0 h)) (/ (* (/ d D) (/ d D)) w))) (* 2.0 w))
         (if (<= c0 1.35e+228)
           t_0
           (/
            (* 2.0 (/ (* d (* d (* c0 c0))) (* D (* (* w h) D))))
            (* 2.0 w))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = fma(-0.5, (0.0 / w), (0.25 * ((D / (d / D)) * ((h * (M * M)) / d))));
	double tmp;
	if (c0 <= -4.2e+217) {
		tmp = c0 / (w / (pow((d / D), 2.0) * ((c0 / h) / w)));
	} else if (c0 <= 1.35e+46) {
		tmp = t_0;
	} else if (c0 <= 1.9e+155) {
		tmp = (c0 * ((2.0 * (c0 / h)) * (((d / D) * (d / D)) / w))) / (2.0 * w);
	} else if (c0 <= 1.35e+228) {
		tmp = t_0;
	} else {
		tmp = (2.0 * ((d * (d * (c0 * c0))) / (D * ((w * h) * D)))) / (2.0 * w);
	}
	return tmp;
}
function code(c0, w, h, D, d, M)
	t_0 = fma(-0.5, Float64(0.0 / w), Float64(0.25 * Float64(Float64(D / Float64(d / D)) * Float64(Float64(h * Float64(M * M)) / d))))
	tmp = 0.0
	if (c0 <= -4.2e+217)
		tmp = Float64(c0 / Float64(w / Float64((Float64(d / D) ^ 2.0) * Float64(Float64(c0 / h) / w))));
	elseif (c0 <= 1.35e+46)
		tmp = t_0;
	elseif (c0 <= 1.9e+155)
		tmp = Float64(Float64(c0 * Float64(Float64(2.0 * Float64(c0 / h)) * Float64(Float64(Float64(d / D) * Float64(d / D)) / w))) / Float64(2.0 * w));
	elseif (c0 <= 1.35e+228)
		tmp = t_0;
	else
		tmp = Float64(Float64(2.0 * Float64(Float64(d * Float64(d * Float64(c0 * c0))) / Float64(D * Float64(Float64(w * h) * D)))) / Float64(2.0 * w));
	end
	return tmp
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(-0.5 * N[(0.0 / w), $MachinePrecision] + N[(0.25 * N[(N[(D / N[(d / D), $MachinePrecision]), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c0, -4.2e+217], N[(c0 / N[(w / N[(N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(c0 / h), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c0, 1.35e+46], t$95$0, If[LessEqual[c0, 1.9e+155], N[(N[(c0 * N[(N[(2.0 * N[(c0 / h), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 * w), $MachinePrecision]), $MachinePrecision], If[LessEqual[c0, 1.35e+228], t$95$0, N[(N[(2.0 * N[(N[(d * N[(d * N[(c0 * c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(D * N[(N[(w * h), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(-0.5, \frac{0}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\\
\mathbf{if}\;c0 \leq -4.2 \cdot 10^{+217}:\\
\;\;\;\;\frac{c0}{\frac{w}{{\left(\frac{d}{D}\right)}^{2} \cdot \frac{\frac{c0}{h}}{w}}}\\

\mathbf{elif}\;c0 \leq 1.35 \cdot 10^{+46}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;c0 \leq 1.35 \cdot 10^{+228}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c0 < -4.2000000000000002e217

    1. Initial program 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    9. Step-by-step derivation
      1. associate-/r*34.3%

        \[\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. *-commutative34.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000002e217 < c0 < 1.3500000000000001e46 or 1.9e155 < c0 < 1.3500000000000001e228

    1. Initial program 21.7%

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(d \cdot d, \frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}, \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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. associate-*l*19.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{\left(c0 \cdot c0\right)} \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}{w}, 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right) \]
      4. distribute-rgt1-in6.2%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}}{w}, 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right) \]
      5. metadata-eval6.2%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}}\right) \]
    6. Simplified33.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}\right)} \]
    7. Step-by-step derivation
      1. associate-/r/33.1%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \color{blue}{\left(\frac{D \cdot D}{d \cdot d} \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}\right) \]
    8. Applied egg-rr33.1%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \left(\frac{\color{blue}{D \cdot D}}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
      6. associate-/l*41.1%

        \[\leadsto \mathsf{fma}\left(-0.5, \frac{\left(c0 \cdot c0\right) \cdot 0}{w}, 0.25 \cdot \left(\color{blue}{\frac{D}{\frac{d}{D}}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
    11. Simplified41.1%

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

      \[\leadsto \mathsf{fma}\left(-0.5, \frac{\color{blue}{0}}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]

    if 1.3500000000000001e46 < c0 < 1.9e155

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{0 + M \cdot M}{\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \sqrt{{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)}^{2} - M \cdot M}}} \]
    8. Taylor expanded in M around 0 52.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)} \]
    9. Step-by-step derivation
      1. associate-/r*52.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. *-commutative52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3500000000000001e228 < c0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    9. Step-by-step derivation
      1. associate-/r*57.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c0 \leq -4.2 \cdot 10^{+217}:\\ \;\;\;\;\frac{c0}{\frac{w}{{\left(\frac{d}{D}\right)}^{2} \cdot \frac{\frac{c0}{h}}{w}}}\\ \mathbf{elif}\;c0 \leq 1.35 \cdot 10^{+46}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{0}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\\ \mathbf{elif}\;c0 \leq 1.9 \cdot 10^{+155}:\\ \;\;\;\;\frac{c0 \cdot \left(\left(2 \cdot \frac{c0}{h}\right) \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{w}\right)}{2 \cdot w}\\ \mathbf{elif}\;c0 \leq 1.35 \cdot 10^{+228}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{0}{w}, 0.25 \cdot \left(\frac{D}{\frac{d}{D}} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \frac{d \cdot \left(d \cdot \left(c0 \cdot c0\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)}}{2 \cdot w}\\ \end{array} \]

Alternative 4: 42.4% accurate, 4.5× speedup?

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

\\
\begin{array}{l}
t_0 := -0.5 \cdot \frac{0}{w}\\
\mathbf{if}\;M \cdot M \leq 2.7 \cdot 10^{-155}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;M \cdot M \leq 5 \cdot 10^{+130}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 M M) < 2.69999999999999981e-155 or 1.65e50 < (*.f64 M M) < 4.9999999999999996e130

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -0.5 \cdot \frac{\color{blue}{0}}{w} \]

    if 2.69999999999999981e-155 < (*.f64 M M) < 1.65e50

    1. Initial program 39.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    9. Step-by-step derivation
      1. associate-/r*44.6%

        \[\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. *-commutative44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999996e130 < (*.f64 M M)

    1. Initial program 14.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    9. Step-by-step derivation
      1. associate-/r*37.9%

        \[\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. *-commutative37.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \cdot M \leq 2.7 \cdot 10^{-155}:\\ \;\;\;\;-0.5 \cdot \frac{0}{w}\\ \mathbf{elif}\;M \cdot M \leq 1.65 \cdot 10^{+50}:\\ \;\;\;\;\frac{2 \cdot \frac{d \cdot \left(d \cdot \left(c0 \cdot c0\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)}}{2 \cdot w}\\ \mathbf{elif}\;M \cdot M \leq 5 \cdot 10^{+130}:\\ \;\;\;\;-0.5 \cdot \frac{0}{w}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot \left(\left(2 \cdot \frac{c0}{h}\right) \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{w}\right)}{2 \cdot w}\\ \end{array} \]

Alternative 5: 38.5% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \leq 2.6 \cdot 10^{-78} \lor \neg \left(M \leq 4.7 \cdot 10^{+38}\right) \land M \leq 2.7 \cdot 10^{+65}:\\ \;\;\;\;-0.5 \cdot \frac{0}{w}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{c0}{h} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{w}\right)\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (or (<= M 2.6e-78) (and (not (<= M 4.7e+38)) (<= M 2.7e+65)))
   (* -0.5 (/ 0.0 w))
   (* (/ c0 (* 2.0 w)) (* 2.0 (* (/ c0 h) (/ (* (/ d D) (/ d D)) w))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((M <= 2.6e-78) || (!(M <= 4.7e+38) && (M <= 2.7e+65))) {
		tmp = -0.5 * (0.0 / w);
	} else {
		tmp = (c0 / (2.0 * w)) * (2.0 * ((c0 / h) * (((d / D) * (d / D)) / w)));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if ((m <= 2.6d-78) .or. (.not. (m <= 4.7d+38)) .and. (m <= 2.7d+65)) then
        tmp = (-0.5d0) * (0.0d0 / w)
    else
        tmp = (c0 / (2.0d0 * w)) * (2.0d0 * ((c0 / h) * (((d_1 / d) * (d_1 / d)) / w)))
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((M <= 2.6e-78) || (!(M <= 4.7e+38) && (M <= 2.7e+65))) {
		tmp = -0.5 * (0.0 / w);
	} else {
		tmp = (c0 / (2.0 * w)) * (2.0 * ((c0 / h) * (((d / D) * (d / D)) / w)));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if (M <= 2.6e-78) or (not (M <= 4.7e+38) and (M <= 2.7e+65)):
		tmp = -0.5 * (0.0 / w)
	else:
		tmp = (c0 / (2.0 * w)) * (2.0 * ((c0 / h) * (((d / D) * (d / D)) / w)))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if ((M <= 2.6e-78) || (!(M <= 4.7e+38) && (M <= 2.7e+65)))
		tmp = Float64(-0.5 * Float64(0.0 / w));
	else
		tmp = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(2.0 * Float64(Float64(c0 / h) * Float64(Float64(Float64(d / D) * Float64(d / D)) / w))));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if ((M <= 2.6e-78) || (~((M <= 4.7e+38)) && (M <= 2.7e+65)))
		tmp = -0.5 * (0.0 / w);
	else
		tmp = (c0 / (2.0 * w)) * (2.0 * ((c0 / h) * (((d / D) * (d / D)) / w)));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[Or[LessEqual[M, 2.6e-78], And[N[Not[LessEqual[M, 4.7e+38]], $MachinePrecision], LessEqual[M, 2.7e+65]]], N[(-0.5 * N[(0.0 / w), $MachinePrecision]), $MachinePrecision], N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(c0 / h), $MachinePrecision] * N[(N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;M \leq 2.6 \cdot 10^{-78} \lor \neg \left(M \leq 4.7 \cdot 10^{+38}\right) \land M \leq 2.7 \cdot 10^{+65}:\\
\;\;\;\;-0.5 \cdot \frac{0}{w}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if M < 2.6000000000000001e-78 or 4.6999999999999999e38 < M < 2.70000000000000019e65

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

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

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

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

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

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

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

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

        \[\leadsto -0.5 \cdot \frac{\color{blue}{\left(c0 \cdot c0\right)} \cdot \left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)}{w} \]
      3. distribute-rgt1-in4.1%

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

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

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

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

      \[\leadsto -0.5 \cdot \frac{\color{blue}{0}}{w} \]

    if 2.6000000000000001e-78 < M < 4.6999999999999999e38 or 2.70000000000000019e65 < M

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. *-commutative40.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 2.6 \cdot 10^{-78} \lor \neg \left(M \leq 4.7 \cdot 10^{+38}\right) \land M \leq 2.7 \cdot 10^{+65}:\\ \;\;\;\;-0.5 \cdot \frac{0}{w}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{c0}{h} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{w}\right)\right)\\ \end{array} \]

Alternative 6: 38.1% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
t_0 := -0.5 \cdot \frac{0}{w}\\
\mathbf{if}\;M \leq 1.8 \cdot 10^{-80}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;M \leq 3.8 \cdot 10^{+64}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if M < 1.8e-80 or 1.2999999999999999e25 < M < 3.8000000000000001e64

    1. Initial program 27.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -0.5 \cdot \frac{\color{blue}{0}}{w} \]

    if 1.8e-80 < M < 1.2999999999999999e25

    1. Initial program 37.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    9. Step-by-step derivation
      1. associate-/r*42.3%

        \[\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. *-commutative42.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8000000000000001e64 < M

    1. Initial program 14.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    9. Step-by-step derivation
      1. associate-/r*36.9%

        \[\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. *-commutative36.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 1.8 \cdot 10^{-80}:\\ \;\;\;\;-0.5 \cdot \frac{0}{w}\\ \mathbf{elif}\;M \leq 1.3 \cdot 10^{+25}:\\ \;\;\;\;\frac{2 \cdot \frac{d \cdot \left(d \cdot \left(c0 \cdot c0\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)}}{2 \cdot w}\\ \mathbf{elif}\;M \leq 3.8 \cdot 10^{+64}:\\ \;\;\;\;-0.5 \cdot \frac{0}{w}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{c0}{h} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{w}\right)\right)\\ \end{array} \]

Alternative 7: 36.3% accurate, 6.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \leq 4 \cdot 10^{-78} \lor \neg \left(M \leq 1.9 \cdot 10^{+38}\right) \land M \leq 6.2 \cdot 10^{+91}:\\ \;\;\;\;-0.5 \cdot \frac{0}{w}\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot d}{D \cdot D} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{c0}{w}\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (or (<= M 4e-78) (and (not (<= M 1.9e+38)) (<= M 6.2e+91)))
   (* -0.5 (/ 0.0 w))
   (* (/ (* d d) (* D D)) (* (/ c0 (* w h)) (/ c0 w)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((M <= 4e-78) || (!(M <= 1.9e+38) && (M <= 6.2e+91))) {
		tmp = -0.5 * (0.0 / w);
	} else {
		tmp = ((d * d) / (D * D)) * ((c0 / (w * h)) * (c0 / w));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if ((m <= 4d-78) .or. (.not. (m <= 1.9d+38)) .and. (m <= 6.2d+91)) then
        tmp = (-0.5d0) * (0.0d0 / w)
    else
        tmp = ((d_1 * d_1) / (d * d)) * ((c0 / (w * h)) * (c0 / w))
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((M <= 4e-78) || (!(M <= 1.9e+38) && (M <= 6.2e+91))) {
		tmp = -0.5 * (0.0 / w);
	} else {
		tmp = ((d * d) / (D * D)) * ((c0 / (w * h)) * (c0 / w));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if (M <= 4e-78) or (not (M <= 1.9e+38) and (M <= 6.2e+91)):
		tmp = -0.5 * (0.0 / w)
	else:
		tmp = ((d * d) / (D * D)) * ((c0 / (w * h)) * (c0 / w))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if ((M <= 4e-78) || (!(M <= 1.9e+38) && (M <= 6.2e+91)))
		tmp = Float64(-0.5 * Float64(0.0 / w));
	else
		tmp = Float64(Float64(Float64(d * d) / Float64(D * D)) * Float64(Float64(c0 / Float64(w * h)) * Float64(c0 / w)));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if ((M <= 4e-78) || (~((M <= 1.9e+38)) && (M <= 6.2e+91)))
		tmp = -0.5 * (0.0 / w);
	else
		tmp = ((d * d) / (D * D)) * ((c0 / (w * h)) * (c0 / w));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[Or[LessEqual[M, 4e-78], And[N[Not[LessEqual[M, 1.9e+38]], $MachinePrecision], LessEqual[M, 6.2e+91]]], N[(-0.5 * N[(0.0 / w), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * d), $MachinePrecision] / N[(D * D), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 / N[(w * h), $MachinePrecision]), $MachinePrecision] * N[(c0 / w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;M \leq 4 \cdot 10^{-78} \lor \neg \left(M \leq 1.9 \cdot 10^{+38}\right) \land M \leq 6.2 \cdot 10^{+91}:\\
\;\;\;\;-0.5 \cdot \frac{0}{w}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if M < 4e-78 or 1.8999999999999999e38 < M < 6.19999999999999995e91

    1. Initial program 26.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -0.5 \cdot \frac{\color{blue}{0}}{w} \]

    if 4e-78 < M < 1.8999999999999999e38 or 6.19999999999999995e91 < M

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{d \cdot d}{D \cdot D} \cdot \color{blue}{\frac{{c0}^{2}}{{w}^{2} \cdot h}} \]
    8. Step-by-step derivation
      1. unpow231.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 4 \cdot 10^{-78} \lor \neg \left(M \leq 1.9 \cdot 10^{+38}\right) \land M \leq 6.2 \cdot 10^{+91}:\\ \;\;\;\;-0.5 \cdot \frac{0}{w}\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot d}{D \cdot D} \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{c0}{w}\right)\\ \end{array} \]

Alternative 8: 33.5% accurate, 30.2× speedup?

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

\\
-0.5 \cdot \frac{0}{w}
\end{array}
Derivation
  1. Initial program 26.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto -0.5 \cdot \frac{\color{blue}{0}}{w} \]
  8. Final simplification34.0%

    \[\leadsto -0.5 \cdot \frac{0}{w} \]

Reproduce

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