Henrywood and Agarwal, Equation (13)

Percentage Accurate: 24.3% → 54.6%
Time: 33.2s
Alternatives: 9
Speedup: 151.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 9 alternatives:

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

Initial Program: 24.3% accurate, 1.0× speedup?

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

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

Alternative 1: 54.6% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 78.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. +-commutative78.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr36.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{w \cdot 2} \cdot \left(2 \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}\right)\right)\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def39.3%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/81.3%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac86.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)\right)} \]
      2. expm1-udef36.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity36.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr36.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def41.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{c0}{w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)}{h}} \cdot \frac{c0}{w} \]
      4. clear-num89.0%

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

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

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

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

    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. +-commutative0.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-c0\right) \cdot \color{blue}{0}\right) \]
      6. distribute-lft-neg-in40.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-c0 \cdot 0\right)} \]
      7. distribute-rgt-neg-in40.4%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(c0 \cdot \left(-0\right)\right)} \]
      8. metadata-eval40.4%

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

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

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

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

Alternative 2: 41.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 9.5 \cdot 10^{-219}:\\ \;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\ \mathbf{elif}\;D \leq 1.12 \cdot 10^{-122}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \leq 1.55 \cdot 10^{-74}:\\ \;\;\;\;\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\\ \mathbf{elif}\;D \leq 2.4 \cdot 10^{-61}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= D 9.5e-219)
   (* (/ c0 w) (/ (* (/ c0 w) (* d (/ d D))) (* h D)))
   (if (<= D 1.12e-122)
     0.0
     (if (<= D 1.55e-74)
       (/ c0 (/ w (* (/ c0 w) (/ (pow (/ d D) 2.0) h))))
       (if (<= D 2.4e-61)
         0.0
         (* (/ c0 w) (* (/ c0 w) (/ (/ d (* D (/ D d))) h))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 9.5e-219) {
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
	} else if (D <= 1.12e-122) {
		tmp = 0.0;
	} else if (D <= 1.55e-74) {
		tmp = c0 / (w / ((c0 / w) * (pow((d / D), 2.0) / h)));
	} else if (D <= 2.4e-61) {
		tmp = 0.0;
	} else {
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if (d <= 9.5d-219) then
        tmp = (c0 / w) * (((c0 / w) * (d_1 * (d_1 / d))) / (h * d))
    else if (d <= 1.12d-122) then
        tmp = 0.0d0
    else if (d <= 1.55d-74) then
        tmp = c0 / (w / ((c0 / w) * (((d_1 / d) ** 2.0d0) / h)))
    else if (d <= 2.4d-61) then
        tmp = 0.0d0
    else
        tmp = (c0 / w) * ((c0 / w) * ((d_1 / (d * (d / d_1))) / h))
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 9.5e-219) {
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
	} else if (D <= 1.12e-122) {
		tmp = 0.0;
	} else if (D <= 1.55e-74) {
		tmp = c0 / (w / ((c0 / w) * (Math.pow((d / D), 2.0) / h)));
	} else if (D <= 2.4e-61) {
		tmp = 0.0;
	} else {
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if D <= 9.5e-219:
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D))
	elif D <= 1.12e-122:
		tmp = 0.0
	elif D <= 1.55e-74:
		tmp = c0 / (w / ((c0 / w) * (math.pow((d / D), 2.0) / h)))
	elif D <= 2.4e-61:
		tmp = 0.0
	else:
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (D <= 9.5e-219)
		tmp = Float64(Float64(c0 / w) * Float64(Float64(Float64(c0 / w) * Float64(d * Float64(d / D))) / Float64(h * D)));
	elseif (D <= 1.12e-122)
		tmp = 0.0;
	elseif (D <= 1.55e-74)
		tmp = Float64(c0 / Float64(w / Float64(Float64(c0 / w) * Float64((Float64(d / D) ^ 2.0) / h))));
	elseif (D <= 2.4e-61)
		tmp = 0.0;
	else
		tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(d / Float64(D * Float64(D / d))) / h)));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if (D <= 9.5e-219)
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
	elseif (D <= 1.12e-122)
		tmp = 0.0;
	elseif (D <= 1.55e-74)
		tmp = c0 / (w / ((c0 / w) * (((d / D) ^ 2.0) / h)));
	elseif (D <= 2.4e-61)
		tmp = 0.0;
	else
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 9.5e-219], N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(c0 / w), $MachinePrecision] * N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 1.12e-122], 0.0, If[LessEqual[D, 1.55e-74], N[(c0 / N[(w / N[(N[(c0 / w), $MachinePrecision] * N[(N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 2.4e-61], 0.0, N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \leq 9.5 \cdot 10^{-219}:\\
\;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\

\mathbf{elif}\;D \leq 1.12 \cdot 10^{-122}:\\
\;\;\;\;0\\

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

\mathbf{elif}\;D \leq 2.4 \cdot 10^{-61}:\\
\;\;\;\;0\\

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


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

    1. Initial program 23.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr15.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{w \cdot 2} \cdot \left(2 \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}\right)\right)\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def15.3%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/34.0%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac40.7%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity20.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr20.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def20.5%

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

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

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

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

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

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

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

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

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

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

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

    if 9.4999999999999997e-219 < D < 1.12e-122 or 1.5500000000000001e-74 < D < 2.4000000000000001e-61

    1. Initial program 10.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. +-commutative10.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-c0\right) \cdot \color{blue}{0}\right) \]
      6. distribute-lft-neg-in53.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-c0 \cdot 0\right)} \]
      7. distribute-rgt-neg-in53.1%

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

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

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

      \[\leadsto \color{blue}{0} \]

    if 1.12e-122 < D < 1.5500000000000001e-74

    1. Initial program 54.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. +-commutative54.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr31.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/69.5%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac69.7%

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

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

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

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

    if 2.4000000000000001e-61 < D

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr18.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/38.6%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac56.1%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity24.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr24.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def30.0%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\color{blue}{\frac{1 \cdot d}{\frac{D}{d} \cdot D}}}{h}\right) \]
      4. *-un-lft-identity60.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 9.5 \cdot 10^{-219}:\\ \;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\ \mathbf{elif}\;D \leq 1.12 \cdot 10^{-122}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \leq 1.55 \cdot 10^{-74}:\\ \;\;\;\;\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\\ \mathbf{elif}\;D \leq 2.4 \cdot 10^{-61}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 41.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 1.3 \cdot 10^{-218}:\\ \;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\ \mathbf{elif}\;D \leq 1.7 \cdot 10^{-131}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \leq 2.5 \cdot 10^{-74}:\\ \;\;\;\;\frac{c0}{\frac{w}{\frac{c0}{w \cdot \frac{h}{{\left(\frac{d}{D}\right)}^{2}}}}}\\ \mathbf{elif}\;D \leq 8 \cdot 10^{-62}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= D 1.3e-218)
   (* (/ c0 w) (/ (* (/ c0 w) (* d (/ d D))) (* h D)))
   (if (<= D 1.7e-131)
     0.0
     (if (<= D 2.5e-74)
       (/ c0 (/ w (/ c0 (* w (/ h (pow (/ d D) 2.0))))))
       (if (<= D 8e-62)
         0.0
         (* (/ c0 w) (* (/ c0 w) (/ (/ d (* D (/ D d))) h))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 1.3e-218) {
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
	} else if (D <= 1.7e-131) {
		tmp = 0.0;
	} else if (D <= 2.5e-74) {
		tmp = c0 / (w / (c0 / (w * (h / pow((d / D), 2.0)))));
	} else if (D <= 8e-62) {
		tmp = 0.0;
	} else {
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if (d <= 1.3d-218) then
        tmp = (c0 / w) * (((c0 / w) * (d_1 * (d_1 / d))) / (h * d))
    else if (d <= 1.7d-131) then
        tmp = 0.0d0
    else if (d <= 2.5d-74) then
        tmp = c0 / (w / (c0 / (w * (h / ((d_1 / d) ** 2.0d0)))))
    else if (d <= 8d-62) then
        tmp = 0.0d0
    else
        tmp = (c0 / w) * ((c0 / w) * ((d_1 / (d * (d / d_1))) / h))
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 1.3e-218) {
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
	} else if (D <= 1.7e-131) {
		tmp = 0.0;
	} else if (D <= 2.5e-74) {
		tmp = c0 / (w / (c0 / (w * (h / Math.pow((d / D), 2.0)))));
	} else if (D <= 8e-62) {
		tmp = 0.0;
	} else {
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if D <= 1.3e-218:
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D))
	elif D <= 1.7e-131:
		tmp = 0.0
	elif D <= 2.5e-74:
		tmp = c0 / (w / (c0 / (w * (h / math.pow((d / D), 2.0)))))
	elif D <= 8e-62:
		tmp = 0.0
	else:
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (D <= 1.3e-218)
		tmp = Float64(Float64(c0 / w) * Float64(Float64(Float64(c0 / w) * Float64(d * Float64(d / D))) / Float64(h * D)));
	elseif (D <= 1.7e-131)
		tmp = 0.0;
	elseif (D <= 2.5e-74)
		tmp = Float64(c0 / Float64(w / Float64(c0 / Float64(w * Float64(h / (Float64(d / D) ^ 2.0))))));
	elseif (D <= 8e-62)
		tmp = 0.0;
	else
		tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(d / Float64(D * Float64(D / d))) / h)));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if (D <= 1.3e-218)
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
	elseif (D <= 1.7e-131)
		tmp = 0.0;
	elseif (D <= 2.5e-74)
		tmp = c0 / (w / (c0 / (w * (h / ((d / D) ^ 2.0)))));
	elseif (D <= 8e-62)
		tmp = 0.0;
	else
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 1.3e-218], N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(c0 / w), $MachinePrecision] * N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 1.7e-131], 0.0, If[LessEqual[D, 2.5e-74], N[(c0 / N[(w / N[(c0 / N[(w * N[(h / N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 8e-62], 0.0, N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \leq 1.3 \cdot 10^{-218}:\\
\;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\

\mathbf{elif}\;D \leq 1.7 \cdot 10^{-131}:\\
\;\;\;\;0\\

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

\mathbf{elif}\;D \leq 8 \cdot 10^{-62}:\\
\;\;\;\;0\\

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


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

    1. Initial program 23.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr15.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{w \cdot 2} \cdot \left(2 \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}\right)\right)\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def15.3%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/34.0%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac40.7%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity20.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr20.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def20.5%

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

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

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

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

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

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

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

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

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

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

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

    if 1.29999999999999992e-218 < D < 1.69999999999999998e-131 or 2.49999999999999999e-74 < D < 8.0000000000000003e-62

    1. Initial program 10.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. +-commutative10.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-c0\right) \cdot \color{blue}{0}\right) \]
      6. distribute-lft-neg-in53.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-c0 \cdot 0\right)} \]
      7. distribute-rgt-neg-in53.1%

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

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

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

      \[\leadsto \color{blue}{0} \]

    if 1.69999999999999998e-131 < D < 2.49999999999999999e-74

    1. Initial program 54.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. +-commutative54.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr31.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/69.5%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac69.7%

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

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

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

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{\color{blue}{\frac{d}{D} \cdot \frac{d}{D}}}{h} \cdot \frac{c0}{w}}} \]
      3. clear-num61.9%

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\color{blue}{\frac{1}{\frac{h}{\frac{d}{D} \cdot \frac{d}{D}}}} \cdot \frac{c0}{w}}} \]
      4. frac-times62.1%

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\color{blue}{\frac{1 \cdot c0}{\frac{h}{\frac{d}{D} \cdot \frac{d}{D}} \cdot w}}}} \]
      5. *-un-lft-identity62.1%

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{\color{blue}{c0}}{\frac{h}{\frac{d}{D} \cdot \frac{d}{D}} \cdot w}}} \]
      6. pow262.1%

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

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

    if 8.0000000000000003e-62 < D

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr18.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/38.6%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac56.1%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity24.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr24.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def30.0%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\color{blue}{\frac{1 \cdot d}{\frac{D}{d} \cdot D}}}{h}\right) \]
      4. *-un-lft-identity60.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 1.3 \cdot 10^{-218}:\\ \;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\ \mathbf{elif}\;D \leq 1.7 \cdot 10^{-131}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \leq 2.5 \cdot 10^{-74}:\\ \;\;\;\;\frac{c0}{\frac{w}{\frac{c0}{w \cdot \frac{h}{{\left(\frac{d}{D}\right)}^{2}}}}}\\ \mathbf{elif}\;D \leq 8 \cdot 10^{-62}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 41.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 2.5 \cdot 10^{-218}:\\ \;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\ \mathbf{elif}\;D \leq 10^{-123}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \leq 1.35 \cdot 10^{-74}:\\ \;\;\;\;\frac{c0}{\frac{w}{\frac{\frac{c0}{w} \cdot {\left(\frac{d}{D}\right)}^{2}}{h}}}\\ \mathbf{elif}\;D \leq 7.5 \cdot 10^{-62}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= D 2.5e-218)
   (* (/ c0 w) (/ (* (/ c0 w) (* d (/ d D))) (* h D)))
   (if (<= D 1e-123)
     0.0
     (if (<= D 1.35e-74)
       (/ c0 (/ w (/ (* (/ c0 w) (pow (/ d D) 2.0)) h)))
       (if (<= D 7.5e-62)
         0.0
         (* (/ c0 w) (* (/ c0 w) (/ (/ d (* D (/ D d))) h))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 2.5e-218) {
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
	} else if (D <= 1e-123) {
		tmp = 0.0;
	} else if (D <= 1.35e-74) {
		tmp = c0 / (w / (((c0 / w) * pow((d / D), 2.0)) / h));
	} else if (D <= 7.5e-62) {
		tmp = 0.0;
	} else {
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if (d <= 2.5d-218) then
        tmp = (c0 / w) * (((c0 / w) * (d_1 * (d_1 / d))) / (h * d))
    else if (d <= 1d-123) then
        tmp = 0.0d0
    else if (d <= 1.35d-74) then
        tmp = c0 / (w / (((c0 / w) * ((d_1 / d) ** 2.0d0)) / h))
    else if (d <= 7.5d-62) then
        tmp = 0.0d0
    else
        tmp = (c0 / w) * ((c0 / w) * ((d_1 / (d * (d / d_1))) / h))
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 2.5e-218) {
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
	} else if (D <= 1e-123) {
		tmp = 0.0;
	} else if (D <= 1.35e-74) {
		tmp = c0 / (w / (((c0 / w) * Math.pow((d / D), 2.0)) / h));
	} else if (D <= 7.5e-62) {
		tmp = 0.0;
	} else {
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if D <= 2.5e-218:
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D))
	elif D <= 1e-123:
		tmp = 0.0
	elif D <= 1.35e-74:
		tmp = c0 / (w / (((c0 / w) * math.pow((d / D), 2.0)) / h))
	elif D <= 7.5e-62:
		tmp = 0.0
	else:
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (D <= 2.5e-218)
		tmp = Float64(Float64(c0 / w) * Float64(Float64(Float64(c0 / w) * Float64(d * Float64(d / D))) / Float64(h * D)));
	elseif (D <= 1e-123)
		tmp = 0.0;
	elseif (D <= 1.35e-74)
		tmp = Float64(c0 / Float64(w / Float64(Float64(Float64(c0 / w) * (Float64(d / D) ^ 2.0)) / h)));
	elseif (D <= 7.5e-62)
		tmp = 0.0;
	else
		tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(d / Float64(D * Float64(D / d))) / h)));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if (D <= 2.5e-218)
		tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
	elseif (D <= 1e-123)
		tmp = 0.0;
	elseif (D <= 1.35e-74)
		tmp = c0 / (w / (((c0 / w) * ((d / D) ^ 2.0)) / h));
	elseif (D <= 7.5e-62)
		tmp = 0.0;
	else
		tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 2.5e-218], N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(c0 / w), $MachinePrecision] * N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 1e-123], 0.0, If[LessEqual[D, 1.35e-74], N[(c0 / N[(w / N[(N[(N[(c0 / w), $MachinePrecision] * N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 7.5e-62], 0.0, N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \leq 2.5 \cdot 10^{-218}:\\
\;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\

\mathbf{elif}\;D \leq 10^{-123}:\\
\;\;\;\;0\\

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

\mathbf{elif}\;D \leq 7.5 \cdot 10^{-62}:\\
\;\;\;\;0\\

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


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

    1. Initial program 23.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr15.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{w \cdot 2} \cdot \left(2 \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}\right)\right)\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def15.3%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/34.0%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac40.7%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity20.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr20.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def20.5%

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

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

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

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

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

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

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

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

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

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

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

    if 2.50000000000000021e-218 < D < 1.0000000000000001e-123 or 1.35000000000000009e-74 < D < 7.5000000000000003e-62

    1. Initial program 10.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. +-commutative10.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-c0\right) \cdot \color{blue}{0}\right) \]
      6. distribute-lft-neg-in53.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-c0 \cdot 0\right)} \]
      7. distribute-rgt-neg-in53.1%

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

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

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

      \[\leadsto \color{blue}{0} \]

    if 1.0000000000000001e-123 < D < 1.35000000000000009e-74

    1. Initial program 54.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. +-commutative54.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr31.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/69.5%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac69.7%

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

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

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{\color{blue}{\frac{d}{D} \cdot \frac{d}{D}}}{h}}} \]
      2. frac-times69.7%

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

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

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

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

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

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

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

    if 7.5000000000000003e-62 < D

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr18.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/38.6%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac56.1%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity24.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr24.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def30.0%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\color{blue}{\frac{1 \cdot d}{\frac{D}{d} \cdot D}}}{h}\right) \]
      4. *-un-lft-identity60.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 2.5 \cdot 10^{-218}:\\ \;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\ \mathbf{elif}\;D \leq 10^{-123}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \leq 1.35 \cdot 10^{-74}:\\ \;\;\;\;\frac{c0}{\frac{w}{\frac{\frac{c0}{w} \cdot {\left(\frac{d}{D}\right)}^{2}}{h}}}\\ \mathbf{elif}\;D \leq 7.5 \cdot 10^{-62}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 40.6% accurate, 4.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;D \leq 4.8 \cdot 10^{-218}:\\
\;\;\;\;\frac{c0}{w} \cdot \frac{c0 \cdot \left(d \cdot \frac{d}{D}\right)}{\left(w \cdot h\right) \cdot D}\\

\mathbf{elif}\;D \leq 1.8 \cdot 10^{-124}:\\
\;\;\;\;0\\

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

\mathbf{elif}\;D \leq 7.5 \cdot 10^{-62}:\\
\;\;\;\;0\\

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


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

    1. Initial program 23.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr15.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{w \cdot 2} \cdot \left(2 \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}\right)\right)\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def15.3%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/34.0%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac40.7%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity20.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr20.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def20.5%

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000002e-218 < D < 1.80000000000000005e-124 or 1.8000000000000001e-74 < D < 7.5000000000000003e-62

    1. Initial program 10.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. +-commutative10.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-c0\right) \cdot \color{blue}{0}\right) \]
      6. distribute-lft-neg-in53.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-c0 \cdot 0\right)} \]
      7. distribute-rgt-neg-in53.1%

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

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

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

      \[\leadsto \color{blue}{0} \]

    if 1.80000000000000005e-124 < D < 1.8000000000000001e-74

    1. Initial program 54.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. +-commutative54.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr31.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/69.5%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac69.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)\right)} \]
      2. expm1-udef31.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity31.0%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr31.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def31.0%

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

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

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

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

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

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

    if 7.5000000000000003e-62 < D

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr18.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/38.6%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac56.1%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity24.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr24.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def30.0%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\color{blue}{\frac{1 \cdot d}{\frac{D}{d} \cdot D}}}{h}\right) \]
      4. *-un-lft-identity60.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 4.8 \cdot 10^{-218}:\\ \;\;\;\;\frac{c0}{w} \cdot \frac{c0 \cdot \left(d \cdot \frac{d}{D}\right)}{\left(w \cdot h\right) \cdot D}\\ \mathbf{elif}\;D \leq 1.8 \cdot 10^{-124}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \leq 1.8 \cdot 10^{-74}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{h}\right)\\ \mathbf{elif}\;D \leq 7.5 \cdot 10^{-62}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 41.6% accurate, 4.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;D \leq 7.2 \cdot 10^{-219}:\\
\;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\

\mathbf{elif}\;D \leq 2.05 \cdot 10^{-122}:\\
\;\;\;\;0\\

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

\mathbf{elif}\;D \leq 4.3 \cdot 10^{-61}:\\
\;\;\;\;0\\

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


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

    1. Initial program 23.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr15.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{w \cdot 2} \cdot \left(2 \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}\right)\right)\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def15.3%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/34.0%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac40.7%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity20.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr20.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def20.5%

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

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

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

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

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

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

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

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

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

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

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

    if 7.19999999999999947e-219 < D < 2.05e-122 or 1.45e-74 < D < 4.3000000000000003e-61

    1. Initial program 10.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. +-commutative10.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-c0\right) \cdot \color{blue}{0}\right) \]
      6. distribute-lft-neg-in53.1%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-c0 \cdot 0\right)} \]
      7. distribute-rgt-neg-in53.1%

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

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

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

      \[\leadsto \color{blue}{0} \]

    if 2.05e-122 < D < 1.45e-74

    1. Initial program 54.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. +-commutative54.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr31.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/69.5%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac69.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)\right)} \]
      2. expm1-udef31.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity31.0%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr31.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def31.0%

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

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

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

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

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

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

    if 4.3000000000000003e-61 < D

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr18.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/38.6%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac56.1%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity24.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr24.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def30.0%

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

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

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

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

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

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

        \[\leadsto \frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\color{blue}{\frac{1 \cdot d}{\frac{D}{d} \cdot D}}}{h}\right) \]
      4. *-un-lft-identity60.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 7.2 \cdot 10^{-219}:\\ \;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\ \mathbf{elif}\;D \leq 2.05 \cdot 10^{-122}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \leq 1.45 \cdot 10^{-74}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{h}\right)\\ \mathbf{elif}\;D \leq 4.3 \cdot 10^{-61}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 43.4% accurate, 4.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c0 \leq -4.5 \cdot 10^{+231}:\\
\;\;\;\;0\\

\mathbf{elif}\;c0 \leq -5 \cdot 10^{-127} \lor \neg \left(c0 \leq 1.2 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{h}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c0 < -4.49999999999999991e231 or -4.9999999999999997e-127 < c0 < 1.2000000000000001e-93

    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. +-commutative14.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-c0\right) \cdot \color{blue}{0}\right) \]
      6. distribute-lft-neg-in48.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-c0 \cdot 0\right)} \]
      7. distribute-rgt-neg-in48.5%

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

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

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

      \[\leadsto \color{blue}{0} \]

    if -4.49999999999999991e231 < c0 < -4.9999999999999997e-127 or 1.2000000000000001e-93 < c0

    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. +-commutative27.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr19.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/41.7%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac50.2%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity24.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr24.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def24.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c0 \leq -4.5 \cdot 10^{+231}:\\ \;\;\;\;0\\ \mathbf{elif}\;c0 \leq -5 \cdot 10^{-127} \lor \neg \left(c0 \leq 1.2 \cdot 10^{-93}\right):\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{h}\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 42.9% accurate, 4.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c0 \leq -3.6 \cdot 10^{+232}:\\
\;\;\;\;0\\

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

\mathbf{elif}\;c0 \leq 7.5 \cdot 10^{-95}:\\
\;\;\;\;0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c0 < -3.59999999999999993e232 or -3.39999999999999975e-128 < c0 < 7.5000000000000003e-95

    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. +-commutative14.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-c0\right) \cdot \color{blue}{0}\right) \]
      6. distribute-lft-neg-in48.5%

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-c0 \cdot 0\right)} \]
      7. distribute-rgt-neg-in48.5%

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

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

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

      \[\leadsto \color{blue}{0} \]

    if -3.59999999999999993e232 < c0 < -3.39999999999999975e-128

    1. Initial program 32.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr21.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/47.5%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac58.2%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity27.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr27.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def28.4%

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

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

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

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

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

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

    if 7.5000000000000003e-95 < c0

    1. Initial program 24.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)} - 1} \]
    7. Applied egg-rr17.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{1} \cdot \frac{w}{\frac{c0}{w \cdot h} \cdot \frac{{d}^{2}}{{D}^{2}}}} \]
      8. associate-*l/37.1%

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

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

        \[\leadsto \frac{c0}{1 \cdot \frac{w}{\frac{c0 \cdot \frac{d \cdot d}{\color{blue}{D \cdot D}}}{w \cdot h}}} \]
      11. times-frac44.0%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{1 \cdot \frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
      3. *-un-lft-identity21.6%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}}\right)} - 1 \]
    11. Applied egg-rr21.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def20.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c0 \leq -3.6 \cdot 10^{+232}:\\ \;\;\;\;0\\ \mathbf{elif}\;c0 \leq -3.4 \cdot 10^{-128}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{h}\right)\\ \mathbf{elif}\;c0 \leq 7.5 \cdot 10^{-95}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 33.3% accurate, 151.0× speedup?

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

\\
0
\end{array}
Derivation
  1. Initial program 23.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. +-commutative23.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\left(-c0\right) \cdot \color{blue}{0}\right) \]
    6. distribute-lft-neg-in30.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(-c0 \cdot 0\right)} \]
    7. distribute-rgt-neg-in30.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(c0 \cdot \left(-0\right)\right)} \]
    8. metadata-eval30.7%

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

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

    \[\leadsto \color{blue}{0} \]
  9. Final simplification34.9%

    \[\leadsto 0 \]
  10. Add Preprocessing

Reproduce

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