Henrywood and Agarwal, Equation (13)

Percentage Accurate: 25.1% → 67.0%
Time: 58.0s
Alternatives: 13
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 13 alternatives:

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

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

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

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

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


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

    1. Initial program 77.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), h\right), 1\right), D\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right), w\right), D\right)\right) \]
      17. *-lowering-*.f6482.6%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6419.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified19.1%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 46.5% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;d \leq 2.3 \cdot 10^{+119}:\\
\;\;\;\;\frac{\frac{c0}{w \cdot h}}{D} \cdot \frac{\frac{c0}{\frac{w}{d \cdot d}}}{D}\\

\mathbf{elif}\;d \leq 1.6 \cdot 10^{+185}:\\
\;\;\;\;\frac{0.25}{d} \cdot \left(D \cdot \frac{t\_0}{d}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < 1.5999999999999999e-68 or 3e225 < d

    1. Initial program 21.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6413.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified13.7%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5999999999999999e-68 < d < 2.3000000000000001e119

    1. Initial program 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\frac{c0}{w} \cdot \frac{1}{2}}{h \cdot \frac{1}{2}} \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)}{D \cdot D} \]
      5. metadata-evalN/A

        \[\leadsto \frac{\frac{\frac{c0}{w} \cdot \frac{1}{2}}{h \cdot \frac{1}{2}} \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)}{D \cdot D} \]
      6. times-fracN/A

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

        \[\leadsto \frac{\left(\frac{\frac{c0}{w}}{h} \cdot 1\right) \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)}{D \cdot D} \]
      8. times-fracN/A

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{c0}{w \cdot h}}{D} \cdot \frac{\frac{c0}{\frac{w}{d \cdot d}}}{D}} \]

    if 2.3000000000000001e119 < d < 1.60000000000000003e185

    1. Initial program 5.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified35.4%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6429.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified29.5%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.60000000000000003e185 < d < 3e225

    1. Initial program 41.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{c0}{w} \cdot \frac{1}{2}}{h \cdot \frac{1}{2}} \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)\right), D\right), D\right) \]
      4. metadata-evalN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{\frac{c0}{w}}{h} \cdot \frac{\frac{1}{2}}{\frac{1}{2}}\right) \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)\right), D\right), D\right) \]
      6. metadata-evalN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\frac{\frac{c0}{w}}{h} \cdot 1\right) \cdot c0\right) \cdot d\right), \left(\frac{d}{w}\right)\right), D\right), D\right) \]
    13. Applied egg-rr64.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 1.6 \cdot 10^{-68}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+119}:\\ \;\;\;\;\frac{\frac{c0}{w \cdot h}}{D} \cdot \frac{\frac{c0}{\frac{w}{d \cdot d}}}{D}\\ \mathbf{elif}\;d \leq 1.6 \cdot 10^{+185}:\\ \;\;\;\;\frac{0.25}{d} \cdot \left(D \cdot \frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right)\\ \mathbf{elif}\;d \leq 3 \cdot 10^{+225}:\\ \;\;\;\;\frac{\frac{\left(d \cdot \frac{c0}{\frac{h}{\frac{c0}{w}}}\right) \cdot \frac{d}{w}}{D}}{D}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 44.7% accurate, 4.7× speedup?

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

\\
\begin{array}{l}
t_0 := D \cdot \left(h \cdot \left(M \cdot M\right)\right)\\
\mathbf{if}\;c0 \leq -5.2 \cdot 10^{+32}:\\
\;\;\;\;\frac{0.25}{d} \cdot \left(D \cdot \frac{t\_0}{d}\right)\\

\mathbf{elif}\;c0 \leq 6 \cdot 10^{+70}:\\
\;\;\;\;\frac{\frac{\frac{\frac{c0}{w \cdot h}}{\frac{\frac{w}{d}}{c0 \cdot d}}}{D}}{D}\\

\mathbf{elif}\;c0 \leq 1.06 \cdot 10^{+165}:\\
\;\;\;\;\frac{\frac{t\_0 \cdot \left(D \cdot 0.25\right)}{d}}{d}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\frac{c0}{w} \cdot \frac{c0}{\frac{w}{d \cdot d}}}{h}}{D}}{D}\\


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

    1. Initial program 14.8%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6418.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified18.6%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000004e32 < c0 < 5.99999999999999952e70

    1. Initial program 27.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{\frac{\frac{c0}{w \cdot h}}{\frac{\frac{w}{d}}{c0 \cdot d}}}{D}}}{D} \]

    if 5.99999999999999952e70 < c0 < 1.0600000000000001e165

    1. Initial program 0.4%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6426.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified26.5%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0600000000000001e165 < c0

    1. Initial program 32.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{c0}{w} \cdot \frac{1}{2}}{h \cdot \frac{1}{2}} \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)\right), D\right), D\right) \]
      4. metadata-evalN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{\frac{c0}{w}}{h} \cdot \frac{\frac{1}{2}}{\frac{1}{2}}\right) \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)\right), D\right), D\right) \]
      6. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, w\right), \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(w, \mathsf{*.f64}\left(d, d\right)\right)\right)\right), h\right), D\right), D\right) \]
    13. Applied egg-rr52.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c0 \leq -5.2 \cdot 10^{+32}:\\ \;\;\;\;\frac{0.25}{d} \cdot \left(D \cdot \frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right)\\ \mathbf{elif}\;c0 \leq 6 \cdot 10^{+70}:\\ \;\;\;\;\frac{\frac{\frac{\frac{c0}{w \cdot h}}{\frac{\frac{w}{d}}{c0 \cdot d}}}{D}}{D}\\ \mathbf{elif}\;c0 \leq 1.06 \cdot 10^{+165}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\frac{c0}{w} \cdot \frac{c0}{\frac{w}{d \cdot d}}}{h}}{D}}{D}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 42.4% accurate, 4.7× speedup?

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

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

\mathbf{elif}\;D \leq 5.8 \cdot 10^{-61}:\\
\;\;\;\;\frac{\frac{t\_0 \cdot \left(D \cdot 0.25\right)}{d}}{d}\\

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

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


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

    1. Initial program 21.5%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified16.5%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6415.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified15.8%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.06000000000000001e-181 < D < 5.7999999999999999e-61

    1. Initial program 11.3%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified26.5%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6422.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified22.8%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.7999999999999999e-61 < D < 4.00000000000000008e95

    1. Initial program 52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000008e95 < D

    1. Initial program 6.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified20.0%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6420.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified20.1%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 1.06 \cdot 10^{-181}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(M \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;D \leq 5.8 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\ \mathbf{elif}\;D \leq 4 \cdot 10^{+95}:\\ \;\;\;\;c0 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(h \cdot \left(w \cdot w\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.25}{d} \cdot \left(D \cdot \frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 42.2% accurate, 5.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;D \cdot D \leq 10^{-298}:\\
\;\;\;\;0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 D D) < 9.99999999999999912e-299

    1. Initial program 18.5%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\color{blue}{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
      3. distribute-lft1-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\left(-1 + 1\right) \cdot \color{blue}{\frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}\right)\right)\right) \]
      4. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 + 1\right)\right)\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \color{blue}{\left(\mathsf{neg}\left(\left(-1 + 1\right)\right)\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot 0\right)\right) \]
      11. metadata-evalN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, \color{blue}{\left(-1 + 1\right)}\right)\right) \]
      13. metadata-eval39.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, 0\right)\right) \]
    7. Simplified39.0%

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

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

        \[\leadsto 0 \]
    9. Applied egg-rr45.7%

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

    if 9.99999999999999912e-299 < (*.f64 D D) < 1e308

    1. Initial program 31.0%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified18.3%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified17.4%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e308 < (*.f64 D D)

    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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified0.0%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f640.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified0.1%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \cdot D \leq 10^{-298}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \cdot D \leq 10^{+308}:\\ \;\;\;\;0.25 \cdot \left(\frac{D \cdot D}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(h \cdot \left(D \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 43.1% accurate, 5.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 d d) < 9.9999999999999997e-155

    1. Initial program 6.8%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified8.9%

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

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(D \cdot D\right), d\right), \left(\frac{\color{blue}{h \cdot \left(M \cdot M\right)}}{d}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \left(\frac{\color{blue}{h} \cdot \left(M \cdot M\right)}{d}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \color{blue}{d}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), d\right)\right)\right) \]
      8. *-lowering-*.f6444.6%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), d\right)\right)\right) \]
    15. Applied egg-rr44.6%

      \[\leadsto 0.25 \cdot \color{blue}{\left(\frac{D \cdot D}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)} \]

    if 9.9999999999999997e-155 < (*.f64 d d) < 4.9999999999999999e294

    1. Initial program 29.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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified24.6%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified21.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6420.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified20.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6442.6%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified42.6%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(\left(h \cdot M\right) \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(h \cdot M\right), M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      3. *-lowering-*.f6448.0%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
    15. Applied egg-rr48.0%

      \[\leadsto 0.25 \cdot \frac{D \cdot \left(D \cdot \color{blue}{\left(\left(h \cdot M\right) \cdot M\right)}\right)}{d \cdot d} \]

    if 4.9999999999999999e294 < (*.f64 d d)

    1. Initial program 24.1%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified24.1%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot c0\right) \cdot \color{blue}{\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\color{blue}{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
      3. distribute-lft1-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\left(-1 + 1\right) \cdot \color{blue}{\frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}\right)\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(0 \cdot \frac{\color{blue}{{d}^{2}}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
      5. mul0-lftN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 + 1\right)\right)\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \color{blue}{\left(\mathsf{neg}\left(\left(-1 + 1\right)\right)\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot 0\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, \color{blue}{\left(-1 + 1\right)}\right)\right) \]
      13. metadata-eval33.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, 0\right)\right) \]
    7. Simplified33.9%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{c0}{2 \cdot w} \cdot c0\right) \cdot \color{blue}{0} \]
      2. mul0-rgt40.0%

        \[\leadsto 0 \]
    9. Applied egg-rr40.0%

      \[\leadsto \color{blue}{0} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \cdot d \leq 10^{-154}:\\ \;\;\;\;0.25 \cdot \left(\frac{D \cdot D}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\\ \mathbf{elif}\;d \cdot d \leq 5 \cdot 10^{+294}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(D \cdot \left(M \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 42.1% accurate, 5.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := h \cdot \left(M \cdot M\right)\\ \mathbf{if}\;D \cdot D \leq 10^{-298}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \cdot D \leq 10^{+294}:\\ \;\;\;\;0.25 \cdot \left(\frac{D \cdot D}{d} \cdot \frac{t\_0}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\left(D \cdot t\_0\right) \cdot \frac{D}{d \cdot d}\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* h (* M M))))
   (if (<= (* D D) 1e-298)
     0.0
     (if (<= (* D D) 1e+294)
       (* 0.25 (* (/ (* D D) d) (/ t_0 d)))
       (* 0.25 (* (* D t_0) (/ D (* d d))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = h * (M * M);
	double tmp;
	if ((D * D) <= 1e-298) {
		tmp = 0.0;
	} else if ((D * D) <= 1e+294) {
		tmp = 0.25 * (((D * D) / d) * (t_0 / d));
	} else {
		tmp = 0.25 * ((D * t_0) * (D / (d * d)));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = h * (m * m)
    if ((d * d) <= 1d-298) then
        tmp = 0.0d0
    else if ((d * d) <= 1d+294) then
        tmp = 0.25d0 * (((d * d) / d_1) * (t_0 / d_1))
    else
        tmp = 0.25d0 * ((d * t_0) * (d / (d_1 * d_1)))
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = h * (M * M);
	double tmp;
	if ((D * D) <= 1e-298) {
		tmp = 0.0;
	} else if ((D * D) <= 1e+294) {
		tmp = 0.25 * (((D * D) / d) * (t_0 / d));
	} else {
		tmp = 0.25 * ((D * t_0) * (D / (d * d)));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = h * (M * M)
	tmp = 0
	if (D * D) <= 1e-298:
		tmp = 0.0
	elif (D * D) <= 1e+294:
		tmp = 0.25 * (((D * D) / d) * (t_0 / d))
	else:
		tmp = 0.25 * ((D * t_0) * (D / (d * d)))
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(h * Float64(M * M))
	tmp = 0.0
	if (Float64(D * D) <= 1e-298)
		tmp = 0.0;
	elseif (Float64(D * D) <= 1e+294)
		tmp = Float64(0.25 * Float64(Float64(Float64(D * D) / d) * Float64(t_0 / d)));
	else
		tmp = Float64(0.25 * Float64(Float64(D * t_0) * Float64(D / Float64(d * d))));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = h * (M * M);
	tmp = 0.0;
	if ((D * D) <= 1e-298)
		tmp = 0.0;
	elseif ((D * D) <= 1e+294)
		tmp = 0.25 * (((D * D) / d) * (t_0 / d));
	else
		tmp = 0.25 * ((D * t_0) * (D / (d * d)));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(D * D), $MachinePrecision], 1e-298], 0.0, If[LessEqual[N[(D * D), $MachinePrecision], 1e+294], N[(0.25 * N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(N[(D * t$95$0), $MachinePrecision] * N[(D / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := h \cdot \left(M \cdot M\right)\\
\mathbf{if}\;D \cdot D \leq 10^{-298}:\\
\;\;\;\;0\\

\mathbf{elif}\;D \cdot D \leq 10^{+294}:\\
\;\;\;\;0.25 \cdot \left(\frac{D \cdot D}{d} \cdot \frac{t\_0}{d}\right)\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(\left(D \cdot t\_0\right) \cdot \frac{D}{d \cdot d}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 D D) < 9.99999999999999912e-299

    1. Initial program 18.5%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified17.5%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot c0\right) \cdot \color{blue}{\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\color{blue}{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
      3. distribute-lft1-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\left(-1 + 1\right) \cdot \color{blue}{\frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}\right)\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(0 \cdot \frac{\color{blue}{{d}^{2}}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
      5. mul0-lftN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 + 1\right)\right)\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \color{blue}{\left(\mathsf{neg}\left(\left(-1 + 1\right)\right)\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot 0\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, \color{blue}{\left(-1 + 1\right)}\right)\right) \]
      13. metadata-eval39.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, 0\right)\right) \]
    7. Simplified39.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{c0}{2 \cdot w} \cdot c0\right) \cdot \color{blue}{0} \]
      2. mul0-rgt45.7%

        \[\leadsto 0 \]
    9. Applied egg-rr45.7%

      \[\leadsto \color{blue}{0} \]

    if 9.99999999999999912e-299 < (*.f64 D D) < 1.00000000000000007e294

    1. Initial program 31.3%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified27.0%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified18.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6417.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified17.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6434.7%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified34.7%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{d} \cdot d}\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\frac{D \cdot D}{d} \cdot \color{blue}{\frac{h \cdot \left(M \cdot M\right)}{d}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(\frac{D \cdot D}{d}\right), \color{blue}{\left(\frac{h \cdot \left(M \cdot M\right)}{d}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(D \cdot D\right), d\right), \left(\frac{\color{blue}{h \cdot \left(M \cdot M\right)}}{d}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \left(\frac{\color{blue}{h} \cdot \left(M \cdot M\right)}{d}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \color{blue}{d}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), d\right)\right)\right) \]
      8. *-lowering-*.f6443.8%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), d\right)\right)\right) \]
    15. Applied egg-rr43.8%

      \[\leadsto 0.25 \cdot \color{blue}{\left(\frac{D \cdot D}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)} \]

    if 1.00000000000000007e294 < (*.f64 D D)

    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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified0.0%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified0.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f640.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified0.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6430.9%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified30.9%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot D}{\color{blue}{d} \cdot d}\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \color{blue}{\frac{D}{d \cdot d}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right), \color{blue}{\left(\frac{D}{d \cdot d}\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot \left(M \cdot M\right)\right)\right), \left(\frac{\color{blue}{D}}{d \cdot d}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right), \left(\frac{D}{d \cdot d}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \left(\frac{D}{d \cdot d}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{/.f64}\left(D, \color{blue}{\left(d \cdot d\right)}\right)\right)\right) \]
      8. *-lowering-*.f6435.7%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{/.f64}\left(D, \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right)\right) \]
    15. Applied egg-rr35.7%

      \[\leadsto 0.25 \cdot \color{blue}{\left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{D}{d \cdot d}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 8: 46.5% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\ \mathbf{if}\;d \leq 1.4 \cdot 10^{-69}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;d \leq 3.1 \cdot 10^{+119}:\\ \;\;\;\;\frac{\frac{c0}{w \cdot h}}{D} \cdot \frac{\frac{c0}{\frac{w}{d \cdot d}}}{D}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (/ (* (* D (* h (* M M))) (* D 0.25)) d) d)))
   (if (<= d 1.4e-69)
     t_0
     (if (<= d 3.1e+119)
       (* (/ (/ c0 (* w h)) D) (/ (/ c0 (/ w (* d d))) D))
       t_0))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (((D * (h * (M * M))) * (D * 0.25)) / d) / d;
	double tmp;
	if (d <= 1.4e-69) {
		tmp = t_0;
	} else if (d <= 3.1e+119) {
		tmp = ((c0 / (w * h)) / D) * ((c0 / (w / (d * d))) / D);
	} else {
		tmp = t_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) :: t_0
    real(8) :: tmp
    t_0 = (((d * (h * (m * m))) * (d * 0.25d0)) / d_1) / d_1
    if (d_1 <= 1.4d-69) then
        tmp = t_0
    else if (d_1 <= 3.1d+119) then
        tmp = ((c0 / (w * h)) / d) * ((c0 / (w / (d_1 * d_1))) / d)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (((D * (h * (M * M))) * (D * 0.25)) / d) / d;
	double tmp;
	if (d <= 1.4e-69) {
		tmp = t_0;
	} else if (d <= 3.1e+119) {
		tmp = ((c0 / (w * h)) / D) * ((c0 / (w / (d * d))) / D);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (((D * (h * (M * M))) * (D * 0.25)) / d) / d
	tmp = 0
	if d <= 1.4e-69:
		tmp = t_0
	elif d <= 3.1e+119:
		tmp = ((c0 / (w * h)) / D) * ((c0 / (w / (d * d))) / D)
	else:
		tmp = t_0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(Float64(Float64(D * Float64(h * Float64(M * M))) * Float64(D * 0.25)) / d) / d)
	tmp = 0.0
	if (d <= 1.4e-69)
		tmp = t_0;
	elseif (d <= 3.1e+119)
		tmp = Float64(Float64(Float64(c0 / Float64(w * h)) / D) * Float64(Float64(c0 / Float64(w / Float64(d * d))) / D));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (((D * (h * (M * M))) * (D * 0.25)) / d) / d;
	tmp = 0.0;
	if (d <= 1.4e-69)
		tmp = t_0;
	elseif (d <= 3.1e+119)
		tmp = ((c0 / (w * h)) / D) * ((c0 / (w / (d * d))) / D);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(N[(N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(D * 0.25), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]}, If[LessEqual[d, 1.4e-69], t$95$0, If[LessEqual[d, 3.1e+119], N[(N[(N[(c0 / N[(w * h), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision] * N[(N[(c0 / N[(w / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\
\mathbf{if}\;d \leq 1.4 \cdot 10^{-69}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;d \leq 3.1 \cdot 10^{+119}:\\
\;\;\;\;\frac{\frac{c0}{w \cdot h}}{D} \cdot \frac{\frac{c0}{\frac{w}{d \cdot d}}}{D}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < 1.3999999999999999e-69 or 3.09999999999999995e119 < d

    1. Initial program 22.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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified20.4%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified15.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6415.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified15.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6433.8%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified33.8%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{\color{blue}{d \cdot d}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d}}{\color{blue}{d}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d}\right), \color{blue}{d}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)\right), d\right), d\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot D\right), \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right), d\right), d\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right), d\right), d\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(D, \left(h \cdot \left(M \cdot M\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f6446.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), d\right), d\right) \]
    15. Applied egg-rr46.8%

      \[\leadsto \color{blue}{\frac{\frac{\left(0.25 \cdot D\right) \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d}}{d}} \]

    if 1.3999999999999999e-69 < d < 3.09999999999999995e119

    1. Initial program 26.7%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified22.5%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{2 \cdot \left(c0 \cdot {d}^{2}\right)}{\color{blue}{{D}^{2} \cdot \left(h \cdot w\right)}}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{2 \cdot \left(c0 \cdot {d}^{2}\right)}{\left(h \cdot w\right) \cdot \color{blue}{{D}^{2}}}\right)\right) \]
      3. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\frac{2 \cdot \left(c0 \cdot {d}^{2}\right)}{h \cdot w}}{\color{blue}{{D}^{2}}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{2 \cdot \frac{c0 \cdot {d}^{2}}{h \cdot w}}{{\color{blue}{D}}^{2}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \frac{c0 \cdot {d}^{2}}{h \cdot w}\right), \color{blue}{\left({D}^{2}\right)}\right)\right) \]
      6. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{2 \cdot \left(c0 \cdot {d}^{2}\right)}{h \cdot w}\right), \left({\color{blue}{D}}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{2 \cdot \left(c0 \cdot {d}^{2}\right)}{w \cdot h}\right), \left({D}^{2}\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{\frac{2 \cdot \left(c0 \cdot {d}^{2}\right)}{w}}{h}\right), \left({\color{blue}{D}}^{2}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{2 \cdot \left(c0 \cdot {d}^{2}\right)}{w}\right), h\right), \left({\color{blue}{D}}^{2}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(c0 \cdot {d}^{2}\right)\right), w\right), h\right), \left({D}^{2}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot {d}^{2}\right)\right), w\right), h\right), \left({D}^{2}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right)\right), w\right), h\right), \left({D}^{2}\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right)\right), w\right), h\right), \left({D}^{2}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), w\right), h\right), \left({D}^{2}\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), w\right), h\right), \left(D \cdot \color{blue}{D}\right)\right)\right) \]
      16. *-lowering-*.f6434.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), w\right), h\right), \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right) \]
    7. Simplified34.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{\frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{w}}{h}}{D \cdot D}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{c0}{2 \cdot w} \cdot \frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{w}}{h}}{\color{blue}{D \cdot D}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{c0}{2 \cdot w} \cdot \frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{w}}{h}}{D}}{\color{blue}{D}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{c0}{2 \cdot w} \cdot \frac{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{w}}{h}}{D}\right), \color{blue}{D}\right) \]
    9. Applied egg-rr42.3%

      \[\leadsto \color{blue}{\frac{\frac{\frac{\frac{c0}{\frac{w}{0.5}}}{\frac{\frac{h}{2}}{\frac{c0 \cdot \left(d \cdot d\right)}{w}}}}{D}}{D}} \]
    10. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(w, \frac{1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 2\right), \left(\frac{\left(c0 \cdot d\right) \cdot d}{w}\right)\right)\right), D\right), D\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(w, \frac{1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 2\right), \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)\right)\right), D\right), D\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(w, \frac{1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 2\right), \mathsf{*.f64}\left(\left(c0 \cdot d\right), \left(\frac{d}{w}\right)\right)\right)\right), D\right), D\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(w, \frac{1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 2\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \left(\frac{d}{w}\right)\right)\right)\right), D\right), D\right) \]
      5. /-lowering-/.f6447.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(w, \frac{1}{2}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(h, 2\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{/.f64}\left(d, w\right)\right)\right)\right), D\right), D\right) \]
    11. Applied egg-rr47.0%

      \[\leadsto \frac{\frac{\frac{\frac{c0}{\frac{w}{0.5}}}{\frac{\frac{h}{2}}{\color{blue}{\left(c0 \cdot d\right) \cdot \frac{d}{w}}}}}{D}}{D} \]
    12. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \frac{\frac{\frac{c0}{\frac{w}{\frac{1}{2}}}}{\frac{\frac{h}{2}}{\left(c0 \cdot d\right) \cdot \frac{d}{w}}}}{\color{blue}{D \cdot D}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{\frac{\frac{c0}{\frac{w}{\frac{1}{2}}}}{\frac{h}{2}} \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)}{\color{blue}{D} \cdot D} \]
      3. associate-/r/N/A

        \[\leadsto \frac{\frac{\frac{c0}{w} \cdot \frac{1}{2}}{\frac{h}{2}} \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)}{D \cdot D} \]
      4. div-invN/A

        \[\leadsto \frac{\frac{\frac{c0}{w} \cdot \frac{1}{2}}{h \cdot \frac{1}{2}} \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)}{D \cdot D} \]
      5. metadata-evalN/A

        \[\leadsto \frac{\frac{\frac{c0}{w} \cdot \frac{1}{2}}{h \cdot \frac{1}{2}} \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)}{D \cdot D} \]
      6. times-fracN/A

        \[\leadsto \frac{\left(\frac{\frac{c0}{w}}{h} \cdot \frac{\frac{1}{2}}{\frac{1}{2}}\right) \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)}{D \cdot D} \]
      7. metadata-evalN/A

        \[\leadsto \frac{\left(\frac{\frac{c0}{w}}{h} \cdot 1\right) \cdot \left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right)}{D \cdot D} \]
      8. times-fracN/A

        \[\leadsto \frac{\frac{\frac{c0}{w}}{h} \cdot 1}{D} \cdot \color{blue}{\frac{\left(c0 \cdot d\right) \cdot \frac{d}{w}}{D}} \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\frac{c0}{w}}{h} \cdot 1}{D}\right), \color{blue}{\left(\frac{\left(c0 \cdot d\right) \cdot \frac{d}{w}}{D}\right)}\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{c0}{w}}{h} \cdot 1\right), D\right), \left(\frac{\color{blue}{\left(c0 \cdot d\right) \cdot \frac{d}{w}}}{D}\right)\right) \]
      11. *-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{c0}{w}}{h}\right), D\right), \left(\frac{\color{blue}{\left(c0 \cdot d\right)} \cdot \frac{d}{w}}{D}\right)\right) \]
      12. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0}{h \cdot w}\right), D\right), \left(\frac{\color{blue}{\left(c0 \cdot d\right)} \cdot \frac{d}{w}}{D}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \left(h \cdot w\right)\right), D\right), \left(\frac{\color{blue}{\left(c0 \cdot d\right)} \cdot \frac{d}{w}}{D}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \left(w \cdot h\right)\right), D\right), \left(\frac{\left(c0 \cdot \color{blue}{d}\right) \cdot \frac{d}{w}}{D}\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(w, h\right)\right), D\right), \left(\frac{\left(c0 \cdot \color{blue}{d}\right) \cdot \frac{d}{w}}{D}\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(w, h\right)\right), D\right), \mathsf{/.f64}\left(\left(\left(c0 \cdot d\right) \cdot \frac{d}{w}\right), \color{blue}{D}\right)\right) \]
    13. Applied egg-rr44.3%

      \[\leadsto \color{blue}{\frac{\frac{c0}{w \cdot h}}{D} \cdot \frac{\frac{c0}{\frac{w}{d \cdot d}}}{D}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 1.4 \cdot 10^{-69}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\ \mathbf{elif}\;d \leq 3.1 \cdot 10^{+119}:\\ \;\;\;\;\frac{\frac{c0}{w \cdot h}}{D} \cdot \frac{\frac{c0}{\frac{w}{d \cdot d}}}{D}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 43.1% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 2.5 \cdot 10^{-153}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(M \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;D \leq 2.25 \cdot 10^{+154}:\\ \;\;\;\;0.25 \cdot \left(\frac{D \cdot D}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(h \cdot \left(D \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= D 2.5e-153)
   (* 0.25 (/ (* D (* M (* D (* h M)))) (* d d)))
   (if (<= D 2.25e+154)
     (* 0.25 (* (/ (* D D) d) (/ (* h (* M M)) d)))
     (* 0.25 (/ (* D (* h (* D (* M M)))) (* d d))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 2.5e-153) {
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d));
	} else if (D <= 2.25e+154) {
		tmp = 0.25 * (((D * D) / d) * ((h * (M * M)) / d));
	} else {
		tmp = 0.25 * ((D * (h * (D * (M * M)))) / (d * d));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if (d <= 2.5d-153) then
        tmp = 0.25d0 * ((d * (m * (d * (h * m)))) / (d_1 * d_1))
    else if (d <= 2.25d+154) then
        tmp = 0.25d0 * (((d * d) / d_1) * ((h * (m * m)) / d_1))
    else
        tmp = 0.25d0 * ((d * (h * (d * (m * m)))) / (d_1 * d_1))
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 2.5e-153) {
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d));
	} else if (D <= 2.25e+154) {
		tmp = 0.25 * (((D * D) / d) * ((h * (M * M)) / d));
	} else {
		tmp = 0.25 * ((D * (h * (D * (M * M)))) / (d * d));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if D <= 2.5e-153:
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d))
	elif D <= 2.25e+154:
		tmp = 0.25 * (((D * D) / d) * ((h * (M * M)) / d))
	else:
		tmp = 0.25 * ((D * (h * (D * (M * M)))) / (d * d))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (D <= 2.5e-153)
		tmp = Float64(0.25 * Float64(Float64(D * Float64(M * Float64(D * Float64(h * M)))) / Float64(d * d)));
	elseif (D <= 2.25e+154)
		tmp = Float64(0.25 * Float64(Float64(Float64(D * D) / d) * Float64(Float64(h * Float64(M * M)) / d)));
	else
		tmp = Float64(0.25 * Float64(Float64(D * Float64(h * Float64(D * Float64(M * M)))) / Float64(d * d)));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if (D <= 2.5e-153)
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d));
	elseif (D <= 2.25e+154)
		tmp = 0.25 * (((D * D) / d) * ((h * (M * M)) / d));
	else
		tmp = 0.25 * ((D * (h * (D * (M * M)))) / (d * d));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 2.5e-153], N[(0.25 * N[(N[(D * N[(M * N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 2.25e+154], N[(0.25 * N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(N[(D * N[(h * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \leq 2.5 \cdot 10^{-153}:\\
\;\;\;\;0.25 \cdot \frac{D \cdot \left(M \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\

\mathbf{elif}\;D \leq 2.25 \cdot 10^{+154}:\\
\;\;\;\;0.25 \cdot \left(\frac{D \cdot D}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \frac{D \cdot \left(h \cdot \left(D \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if D < 2.50000000000000016e-153

    1. Initial program 20.8%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified18.8%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified17.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6416.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified16.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6437.5%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified37.5%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\left(h \cdot M\right) \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(D \cdot \left(h \cdot M\right)\right) \cdot M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(D \cdot \left(h \cdot M\right)\right), M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot M\right)\right), M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      5. *-lowering-*.f6444.6%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, M\right)\right), M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
    15. Applied egg-rr44.6%

      \[\leadsto 0.25 \cdot \frac{D \cdot \color{blue}{\left(\left(D \cdot \left(h \cdot M\right)\right) \cdot M\right)}}{d \cdot d} \]

    if 2.50000000000000016e-153 < D < 2.25000000000000005e154

    1. Initial program 37.1%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified31.9%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified16.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6416.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified16.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6430.9%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified30.9%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{d} \cdot d}\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\frac{D \cdot D}{d} \cdot \color{blue}{\frac{h \cdot \left(M \cdot M\right)}{d}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(\frac{D \cdot D}{d}\right), \color{blue}{\left(\frac{h \cdot \left(M \cdot M\right)}{d}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(D \cdot D\right), d\right), \left(\frac{\color{blue}{h \cdot \left(M \cdot M\right)}}{d}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \left(\frac{\color{blue}{h} \cdot \left(M \cdot M\right)}{d}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \color{blue}{d}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), d\right)\right)\right) \]
      8. *-lowering-*.f6433.2%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), d\right)\right)\right) \]
    15. Applied egg-rr33.2%

      \[\leadsto 0.25 \cdot \color{blue}{\left(\frac{D \cdot D}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)} \]

    if 2.25000000000000005e154 < D

    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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified0.0%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified0.0%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f640.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified0.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6423.0%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified23.0%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(D \cdot \left(M \cdot M\right)\right) \cdot h\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(D \cdot \left(M \cdot M\right)\right), h\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(M \cdot M\right)\right), h\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      5. *-lowering-*.f6433.0%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(M, M\right)\right), h\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
    15. Applied egg-rr33.0%

      \[\leadsto 0.25 \cdot \frac{D \cdot \color{blue}{\left(\left(D \cdot \left(M \cdot M\right)\right) \cdot h\right)}}{d \cdot d} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 2.5 \cdot 10^{-153}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(M \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;D \leq 2.25 \cdot 10^{+154}:\\ \;\;\;\;0.25 \cdot \left(\frac{D \cdot D}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(h \cdot \left(D \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 44.0% accurate, 7.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 9.5 \cdot 10^{-182}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(M \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= D 9.5e-182)
   (* 0.25 (/ (* D (* M (* D (* h M)))) (* d d)))
   (/ (/ (* (* D (* h (* M M))) (* D 0.25)) d) d)))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 9.5e-182) {
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d));
	} else {
		tmp = (((D * (h * (M * M))) * (D * 0.25)) / d) / d;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if (d <= 9.5d-182) then
        tmp = 0.25d0 * ((d * (m * (d * (h * m)))) / (d_1 * d_1))
    else
        tmp = (((d * (h * (m * m))) * (d * 0.25d0)) / d_1) / d_1
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 9.5e-182) {
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d));
	} else {
		tmp = (((D * (h * (M * M))) * (D * 0.25)) / d) / d;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if D <= 9.5e-182:
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d))
	else:
		tmp = (((D * (h * (M * M))) * (D * 0.25)) / d) / d
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (D <= 9.5e-182)
		tmp = Float64(0.25 * Float64(Float64(D * Float64(M * Float64(D * Float64(h * M)))) / Float64(d * d)));
	else
		tmp = Float64(Float64(Float64(Float64(D * Float64(h * Float64(M * M))) * Float64(D * 0.25)) / d) / d);
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if (D <= 9.5e-182)
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d));
	else
		tmp = (((D * (h * (M * M))) * (D * 0.25)) / d) / d;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 9.5e-182], N[(0.25 * N[(N[(D * N[(M * N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(D * 0.25), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] / d), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \leq 9.5 \cdot 10^{-182}:\\
\;\;\;\;0.25 \cdot \frac{D \cdot \left(M \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if D < 9.4999999999999994e-182

    1. Initial program 21.5%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified19.4%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified16.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6415.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified15.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6436.5%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified36.5%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\left(h \cdot M\right) \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(D \cdot \left(h \cdot M\right)\right) \cdot M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(D \cdot \left(h \cdot M\right)\right), M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot M\right)\right), M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      5. *-lowering-*.f6443.9%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, M\right)\right), M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
    15. Applied egg-rr43.9%

      \[\leadsto 0.25 \cdot \frac{D \cdot \color{blue}{\left(\left(D \cdot \left(h \cdot M\right)\right) \cdot M\right)}}{d \cdot d} \]

    if 9.4999999999999994e-182 < D

    1. Initial program 27.8%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified24.1%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified17.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6415.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified15.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6433.5%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified33.5%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{\color{blue}{d \cdot d}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d}}{\color{blue}{d}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d}\right), \color{blue}{d}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)\right), d\right), d\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{1}{4} \cdot D\right) \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right), d\right), d\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{1}{4} \cdot D\right), \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right), d\right), d\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right), d\right), d\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(D, \left(h \cdot \left(M \cdot M\right)\right)\right)\right), d\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), d\right), d\right) \]
      10. *-lowering-*.f6446.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), d\right), d\right) \]
    15. Applied egg-rr46.0%

      \[\leadsto \color{blue}{\frac{\frac{\left(0.25 \cdot D\right) \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d}}{d}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 9.5 \cdot 10^{-182}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(M \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \left(D \cdot 0.25\right)}{d}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 44.4% accurate, 7.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 1.35 \cdot 10^{-181}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(M \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.25}{d} \cdot \left(D \cdot \frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= D 1.35e-181)
   (* 0.25 (/ (* D (* M (* D (* h M)))) (* d d)))
   (* (/ 0.25 d) (* D (/ (* D (* h (* M M))) d)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 1.35e-181) {
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d));
	} else {
		tmp = (0.25 / d) * (D * ((D * (h * (M * M))) / d));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if (d <= 1.35d-181) then
        tmp = 0.25d0 * ((d * (m * (d * (h * m)))) / (d_1 * d_1))
    else
        tmp = (0.25d0 / d_1) * (d * ((d * (h * (m * m))) / d_1))
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 1.35e-181) {
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d));
	} else {
		tmp = (0.25 / d) * (D * ((D * (h * (M * M))) / d));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if D <= 1.35e-181:
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d))
	else:
		tmp = (0.25 / d) * (D * ((D * (h * (M * M))) / d))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (D <= 1.35e-181)
		tmp = Float64(0.25 * Float64(Float64(D * Float64(M * Float64(D * Float64(h * M)))) / Float64(d * d)));
	else
		tmp = Float64(Float64(0.25 / d) * Float64(D * Float64(Float64(D * Float64(h * Float64(M * M))) / d)));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if (D <= 1.35e-181)
		tmp = 0.25 * ((D * (M * (D * (h * M)))) / (d * d));
	else
		tmp = (0.25 / d) * (D * ((D * (h * (M * M))) / d));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 1.35e-181], N[(0.25 * N[(N[(D * N[(M * N[(D * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.25 / d), $MachinePrecision] * N[(D * N[(N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \leq 1.35 \cdot 10^{-181}:\\
\;\;\;\;0.25 \cdot \frac{D \cdot \left(M \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\

\mathbf{else}:\\
\;\;\;\;\frac{0.25}{d} \cdot \left(D \cdot \frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if D < 1.35e-181

    1. Initial program 21.5%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified19.4%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified16.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6415.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified15.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6436.5%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified36.5%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\left(h \cdot M\right) \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(D \cdot \left(h \cdot M\right)\right) \cdot M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(D \cdot \left(h \cdot M\right)\right), M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot M\right)\right), M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
      5. *-lowering-*.f6443.9%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, M\right)\right), M\right)\right), \mathsf{*.f64}\left(d, d\right)\right)\right) \]
    15. Applied egg-rr43.9%

      \[\leadsto 0.25 \cdot \frac{D \cdot \color{blue}{\left(\left(D \cdot \left(h \cdot M\right)\right) \cdot M\right)}}{d \cdot d} \]

    if 1.35e-181 < D

    1. Initial program 27.8%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified24.1%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified17.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6415.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified15.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6433.5%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified33.5%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{\color{blue}{d \cdot d}} \]
      2. times-fracN/A

        \[\leadsto \frac{\frac{1}{4}}{d} \cdot \color{blue}{\frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{4}}{d}\right), \color{blue}{\left(\frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{4}, d\right), \left(\frac{\color{blue}{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}}{d}\right)\right) \]
      5. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{4}, d\right), \left(D \cdot \color{blue}{\frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{4}, d\right), \mathsf{*.f64}\left(D, \color{blue}{\left(\frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{4}, d\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right), \color{blue}{d}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{4}, d\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot \left(M \cdot M\right)\right)\right), d\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{4}, d\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right), d\right)\right)\right) \]
      10. *-lowering-*.f6445.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{4}, d\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right)\right) \]
    15. Applied egg-rr45.8%

      \[\leadsto \color{blue}{\frac{0.25}{d} \cdot \left(D \cdot \frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 1.35 \cdot 10^{-181}:\\ \;\;\;\;0.25 \cdot \frac{D \cdot \left(M \cdot \left(D \cdot \left(h \cdot M\right)\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.25}{d} \cdot \left(D \cdot \frac{D \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 40.2% accurate, 7.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;d \leq 4.7 \cdot 10^{+148}:\\ \;\;\;\;0.25 \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{D}{d \cdot d}\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= d 4.7e+148) (* 0.25 (* (* D (* h (* M M))) (/ D (* d d)))) 0.0))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (d <= 4.7e+148) {
		tmp = 0.25 * ((D * (h * (M * M))) * (D / (d * d)));
	} else {
		tmp = 0.0;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if (d_1 <= 4.7d+148) then
        tmp = 0.25d0 * ((d * (h * (m * m))) * (d / (d_1 * d_1)))
    else
        tmp = 0.0d0
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (d <= 4.7e+148) {
		tmp = 0.25 * ((D * (h * (M * M))) * (D / (d * d)));
	} else {
		tmp = 0.0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if d <= 4.7e+148:
		tmp = 0.25 * ((D * (h * (M * M))) * (D / (d * d)))
	else:
		tmp = 0.0
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (d <= 4.7e+148)
		tmp = Float64(0.25 * Float64(Float64(D * Float64(h * Float64(M * M))) * Float64(D / Float64(d * d))));
	else
		tmp = 0.0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if (d <= 4.7e+148)
		tmp = 0.25 * ((D * (h * (M * M))) * (D / (d * d)));
	else
		tmp = 0.0;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[d, 4.7e+148], N[(0.25 * N[(N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(D / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;d \leq 4.7 \cdot 10^{+148}:\\
\;\;\;\;0.25 \cdot \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{D}{d \cdot d}\right)\\

\mathbf{else}:\\
\;\;\;\;0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < 4.6999999999999997e148

    1. Initial program 23.1%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified19.4%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot c0\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(c0\right)\right)}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right) \cdot \left(-1 \cdot \color{blue}{c0}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right), \color{blue}{\left(-1 \cdot c0\right)}\right)\right) \]
    7. Simplified16.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(d \cdot d\right) \cdot \left(c0 \cdot c0\right)} + 0\right) \cdot \left(-c0\right)\right)} \]
    8. Taylor expanded in D around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right)}, \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)}{{c0}^{2} \cdot {d}^{2}}\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(\color{blue}{c0}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left({D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot \left(h \cdot w\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(h \cdot w\right) \cdot {M}^{2}\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(h \cdot w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left({M}^{2}\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \left(M \cdot M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({c0}^{2} \cdot {d}^{2}\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left({c0}^{2}\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\left(c0 \cdot c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left({d}^{2}\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \left(d \cdot d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
      16. *-lowering-*.f6415.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, w\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{neg.f64}\left(c0\right)\right)\right) \]
    10. Simplified15.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{-0.5 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(h \cdot w\right) \cdot \left(M \cdot M\right)\right)\right)}{\left(c0 \cdot c0\right) \cdot \left(d \cdot d\right)}} \cdot \left(-c0\right)\right) \]
    11. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right), \left({d}^{2}\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      12. *-lowering-*.f6437.2%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    13. Simplified37.2%

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    14. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\frac{\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot D}{\color{blue}{d} \cdot d}\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \color{blue}{\frac{D}{d \cdot d}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right), \color{blue}{\left(\frac{D}{d \cdot d}\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot \left(M \cdot M\right)\right)\right), \left(\frac{\color{blue}{D}}{d \cdot d}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right), \left(\frac{D}{d \cdot d}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \left(\frac{D}{d \cdot d}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{/.f64}\left(D, \color{blue}{\left(d \cdot d\right)}\right)\right)\right) \]
      8. *-lowering-*.f6437.7%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{/.f64}\left(D, \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right)\right) \]
    15. Applied egg-rr37.7%

      \[\leadsto 0.25 \cdot \color{blue}{\left(\left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{D}{d \cdot d}\right)} \]

    if 4.6999999999999997e148 < d

    1. Initial program 23.8%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified25.6%

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot c0\right) \cdot \color{blue}{\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\color{blue}{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
      3. distribute-lft1-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\left(-1 + 1\right) \cdot \color{blue}{\frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}\right)\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(0 \cdot \frac{\color{blue}{{d}^{2}}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
      5. mul0-lftN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 + 1\right)\right)\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \color{blue}{\left(\mathsf{neg}\left(\left(-1 + 1\right)\right)\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot 0\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, \color{blue}{\left(-1 + 1\right)}\right)\right) \]
      13. metadata-eval38.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, 0\right)\right) \]
    7. Simplified38.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{c0}{2 \cdot w} \cdot c0\right) \cdot \color{blue}{0} \]
      2. mul0-rgt42.4%

        \[\leadsto 0 \]
    9. Applied egg-rr42.4%

      \[\leadsto \color{blue}{0} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 34.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.3%

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
  2. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
  3. Simplified20.8%

    \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)}}{h \cdot \left(w \cdot \left(D \cdot D\right)\right)} - M \cdot M}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in c0 around -inf

    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)}\right) \]
  6. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(-1 \cdot c0\right) \cdot \color{blue}{\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    2. mul-1-negN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\color{blue}{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
    3. distribute-lft1-inN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\left(-1 + 1\right) \cdot \color{blue}{\frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}\right)\right)\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(0 \cdot \frac{\color{blue}{{d}^{2}}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
    5. mul0-lftN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right) \]
    6. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
    7. distribute-lft-neg-inN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\mathsf{neg}\left(c0 \cdot \left(-1 + 1\right)\right)\right)\right) \]
    8. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \color{blue}{\left(\mathsf{neg}\left(\left(-1 + 1\right)\right)\right)}\right)\right) \]
    9. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right) \]
    10. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot 0\right)\right) \]
    11. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(c0 \cdot \left(-1 + \color{blue}{1}\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, \color{blue}{\left(-1 + 1\right)}\right)\right) \]
    13. metadata-eval29.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(c0, 0\right)\right) \]
  7. Simplified29.9%

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
  8. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(\frac{c0}{2 \cdot w} \cdot c0\right) \cdot \color{blue}{0} \]
    2. mul0-rgt36.1%

      \[\leadsto 0 \]
  9. Applied egg-rr36.1%

    \[\leadsto \color{blue}{0} \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2024141 
(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))))))